Commit Graph

3715 Commits

Author SHA1 Message Date
Mikael Nordfeldth
1c6f9df80e PHP5.5 fix: Better use of startXML for Action classes (mostly AJAX)
I had a problem with PHP5.5 that caused ajax responses to be empty. This
fixes it, as the problem was related to pretty inconsistent calling to
headers, XMLWriter::startDocument etc. etc.
2013-09-24 01:18:33 +02:00
Mikael Nordfeldth
8205c56e25 Stylesheet event now removed of StatusNet-remnants 2013-09-23 22:13:12 +02:00
Mikael Nordfeldth
5f1fea1488 FavorAction upgraded to extend FormAction
Includes some minor changes to other things as well, such as the session
token input element now having the same 'name' attribute as everyone else.
(it still retains a 'token-'+noticeid 'id' attribute for clientside JS)
2013-09-23 13:06:09 +02:00
Mikael Nordfeldth
f711f9ee75 Fixed regression in bookmark.js that caused double-submits (jquery 2.x stuff)
In 6de3fc0217 bookmark.js was patched to
jquery 2.x (removed '.die' call) but unfortunately the 'submit' event
was attached to an input element instead of a form element (which got
a 'click' event).
2013-09-23 12:07:37 +02:00
Mikael Nordfeldth
63306081bc Subscription "get by" functions now don't use ArrayWrappers
They were getting in the way of some strict-typing stuff.
2013-09-21 18:38:14 +02:00
Mikael Nordfeldth
93e878d7ca Make better use of Subscription class
removed lib/subs.php as it was essentially only a wrapper for Subscription
2013-09-19 17:29:05 +02:00
Mikael Nordfeldth
8935a2f866 Autocomplete migrated to jquery-ui autocomplete
No longer bundled with the library (as jquery-ui is bundled with the
main software, including the autocomplete part).

Rewrites had to be made to migrate, as several API things had changed
when jquery-ui took over the library.

Currently (like before, right?) this only autocompletes in the end of
the current textarea. So you can't jump back in the middle of a text
and autocomplete a user or group. This is a serious deficiency, though
not a regression.
2013-09-16 22:10:08 +02:00
Mikael Nordfeldth
83b852312a Events on user registrations now strictly typed 2013-09-14 18:37:05 +02:00
Mikael Nordfeldth
6de3fc0217 jquery 2.x update related fix (.die no longer defined) 2013-09-14 13:41:04 +02:00
Mikael Nordfeldth
dfa1b15dd6 Changing js .live calls to .on for jquery 2.x 2013-09-10 18:52:09 +02:00
Mikael Nordfeldth
a9c4bcd71f Removing unnecessary require_once lines (autoload!) 2013-09-09 23:06:56 +02:00
Mikael Nordfeldth
747fe9d59b Tidying up getUser calls to profiles and some events
getUser calls are much more strict, and one place where this was found was
in the (un)subscribe start/end event handlers, which resulted in making the
Subscription class a bit stricter, regarding ::start and ::cancel at least.
Several minor fixes in many files were made due to this.

This does NOT touch the Foreign_link function, which should also have a more
strict getUser call. That is a future project.
2013-09-09 23:03:34 +02:00
Mikael Nordfeldth
bd24ab6855 Fixed comment description in STS plugin 2013-08-29 16:20:43 +02:00
Mikael Nordfeldth
07ca304c65 Changes to GNUsocial plugins
These aren't ready for production use. Might be insecure, probably broken.
2013-08-29 16:18:56 +02:00
Mikael Nordfeldth
f042eea956 removing empty "planned" GNU Social plugins 2013-08-29 16:11:32 +02:00
Mikael Nordfeldth
79e3acf0f0 Moved multiGet into Managed_DataObject 2013-08-29 10:38:11 +02:00
Mikael Nordfeldth
cb94a29e84 Syntax error in XMPP config example 2013-08-28 18:00:23 +02:00
Mikael Nordfeldth
de55d8f83b plugins onAutoload now only overloads if necessary (extlibs etc.)
lib/plugin.php now has a parent onAutoload function that finds most common
files that are used in plugins (actions, dataobjects, forms, libs etc.) if
they are put in the standardised directories ('actions', 'classes', 'forms',
'lib' and perhaps some others in the future).
2013-08-28 16:10:30 +02:00
Mikael Nordfeldth
40fe10e002 Woops, forgot auto_increment (comes with 'serial')
There are still some classes not ported (like Yammer import)
2013-08-21 15:02:44 +02:00
Mikael Nordfeldth
4fab7a9d8b GNU Social extensions fixes (please read note)
These extensions are not considered secure nor stable right now, so don't
use them for a while.
2013-08-21 14:33:07 +02:00
Mikael Nordfeldth
0bbcfa7bdf IMPORTANT - fixed HubSub to properly fetch primary keys
In commit e95f77d34c HubSub lost the
'staticGet' function in a consolidation into the Managed_DataObject class.
This was done carelessly by me as HubSub::staticGet was actually taking
two arguments, none of which was a key and merging them in HubSub::hashkey()
(staticGet was renamed getKV 2a4dc77a63).

NOTE: This complements commit 7e4718a4eb which
fixed a similar issue for the Magicsig class.
2013-08-21 11:25:08 +02:00
Mikael Nordfeldth
66997f2bec OStatus classes now has modern schemaDef 2013-08-21 11:01:31 +02:00
Mikael Nordfeldth
3a7261f70a IMPORTANT: Making prev. Memcached_DataObject working again with schemaDef
Lots of the Memcached_DataObject classes stopped working when upgraded to
Managed_DataObject because they lacked schemaDef().

I have _hopefully_ made it so that all the references to the table uses
each class' schemaDef, rather than the more manual ColumnDef stuff. Not
all plugins have been tested thoroughly yet.

NOTE: This is applied with getKV calls instead of staticGet, as it was
important for PHP Strict Standards compliance to avoid calling the non-
static functions statically. (unfortunately DB and DB_DataObject still do
this within themselves...)
2013-08-21 09:48:42 +02:00
Mikael Nordfeldth
6f4c572389 Unnecessary UTF-8 declaration for database 2013-08-20 09:43:23 +02:00
Mikael Nordfeldth
e40044e2fa Further static declarations of functions
Validate could probably be replaced with filter_var if desired (PHP>=5.2.0)
2013-08-19 14:26:44 +02:00
Mikael Nordfeldth
d5f82bb051 Class wasn't used anywhere, and file contained wrong class 2013-08-19 14:09:57 +02:00
Mikael Nordfeldth
7e4718a4eb IMPORTANT - fixed Magicsig to properly overload getKV (prev. staticGet)
In commit e95f77d34c Magicsig lost the 'staticGet' function (later renamed to getKV in 2a4dc77a63 ), which was important to properly initialize the Magicsig object (fromString)
2013-08-18 19:07:18 +02:00
Mikael Nordfeldth
861e838add pkeyGet is now static and more similar to getKV
Memcached_DataObject now defines
   * pkeyGetClass to avoid collision with Managed_DataObject pkeyGet
   * getClassKV to avoid collision with Managed_DataObject getKV
2013-08-18 15:42:51 +02:00
Mikael Nordfeldth
1710a619a8 Magicsig class now Managed_DataObject with nicer schemaDef 2013-08-18 15:31:18 +02:00
Mikael Nordfeldth
ade2bdc31b Bookmark class now has schemaDef (for Managed_DataObject) 2013-08-18 15:03:06 +02:00
Mikael Nordfeldth
2a4dc77a63 The overloaded DB_DataObject function staticGet is now called getKV
I used this hacky sed-command (run it from your GNU Social root, or change the first grep's path to where it actually lies) to do a rough fix on all ::staticGet calls and rename them to ::getKV

   sed -i -s -e '/DataObject::staticGet/I!s/::staticGet/::getKV/Ig' $(grep -R ::staticGet `pwd`/* | grep -v -e '^extlib' | grep -v DataObject:: |grep -v "function staticGet"|cut -d: -f1 |sort |uniq)

If you're applying this, remember to change the Managed_DataObject and Memcached_DataObject function definitions of staticGet to getKV!

This might of course take some getting used to, or modification fo StatusNet plugins, but the result is that all the static calls (to staticGet) are now properly made without breaking PHP Strict Standards. Standards are there to be followed (and they caused some very bad confusion when used with get_called_class)

Reasonably any plugin or code that tests for the definition of 'GNUSOCIAL' or similar will take this change into consideration.
2013-08-18 13:13:56 +02:00
Mikael Nordfeldth
e95f77d34c Updating all Memcached_DataObject extended classes to Managed_DataObject
In some brief tests, this causes no problems.

In this state however, you would need to modify DB_DataObject to have a static declaration of staticget (and probably pkeyGet). The next commit will change the staticGet overload to a unique function name (like getKV for getKeyValue), which means we can properly call the function by PHP Strict Standards.
2013-08-18 12:32:32 +02:00
Mikael Nordfeldth
c36608b233 Some statically called functions in plugins now declared statically 2013-08-18 11:18:45 +02:00
Mikael Nordfeldth
6c4c4319ef Plugins with classes that extend Managed_DataObject get better code reuse
The switch to having a function in Managed_DataObject is now being applied
to plugins which can use this as well.

There are some plugins that still use Memcached_DataObject, but these will
be taken care of later.
2013-08-12 20:00:01 +02:00
Mikael Nordfeldth
f11d157b8b visual presentation of group's homepage href was its local stream url 2013-08-12 13:04:44 +02:00
Mikael Nordfeldth
e47d9ad50d Added author name to modified file 2013-08-12 12:57:47 +02:00
Mikael Nordfeldth
7eecd93473 _m function for translation seems to be what we use 2013-08-12 12:56:44 +02:00
Mikael Nordfeldth
2e8b729503 Issue 3636 request clarity for users without validated emails on instances with RequireValidatedEmail active 2013-08-12 12:56:40 +02:00
Mikael Nordfeldth
1095f7a935 new plugin to check, store and migrate password hashes to crypt() 2013-08-12 12:54:51 +02:00
Mikael Nordfeldth
3ad3535cd8 Merge commit 'refs/merge-requests/230' of git://gitorious.org/statusnet/mainline into merge-requests/230 2013-08-12 12:37:46 +02:00
Mikael Nordfeldth
f79aec36fe Merge remote-tracking branch 'statusnet/master'
This merges GNU Social with current development of StatusNet. The only conflicts were some documentation, where GNU Social's versions were retained.

Conflicts:
	doc-src/about
	doc-src/faq
	plugins/OpenID/doc-src/openid
2013-08-12 12:23:17 +02:00
Evan Prodromou
3fc1d245a1 Merge 1.1.x into master 2013-07-16 10:57:06 -07:00
Jean Baptiste Favre
f1a3d5a386 PHP 5.4 Fix GetValidDaemons function definition for Xmpp & TwitterBridge plugins 2013-06-19 13:25:28 +02:00
Jean Baptiste Favre
c23efdbdb0 PHP 5.4 compatibility: remove call-time pass by reference 2013-06-19 11:16:05 +02:00
Jean Baptiste Favre
707dd44f6b Merge commit 'merge-requests/192' into statusnet_1.1.x 2013-06-15 20:11:24 +02:00
Jean Baptiste Favre
1b39f89b96 Add configuration check. Need 'server', 'port', 'user' and 'password' to be defined (not valid, just defined). 2013-06-15 18:59:17 +02:00
Jean Baptiste Favre
b8a69d023b Add basic support for GetValidDaemon event. Shall be extended with configuration check. 2013-06-15 18:59:16 +02:00
Jean Baptiste Favre
93c8969a27 Remove alone 'groups' link on the left side. Useless I guess. 2013-06-15 18:41:04 +02:00
Jean Baptiste Favre
5a0f17933b Display notices for remote profile. Would like to hide avatar like in local profile but did not found how to do it. 2013-06-15 18:41:04 +02:00
Jean Baptiste Favre
d48076253b Fix error 'No matches for action subscriptions with arguments nickname...' when displaying remote profile. 2013-06-15 18:41:04 +02:00