Commit Graph

3698 Commits

Author SHA1 Message Date
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
Jean Baptiste Favre d36f443666 Bookmark plugin enhancement: display Bookmark's list. Integration of @chimo's work (http://http://sn.chromic.org/) from https://github.com/chimo/BookmarkList into official plugin. 2013-06-15 18:31:05 +02:00
Jean Baptiste Favre 246e840dd3 Fix INSTALLDIR constant definition. 2013-06-15 15:20:19 +02:00
Jean Baptiste Favre dfafab6c4f Fix for #3463. Make InfiniteScroll plugin use config['plugins']['server'] if defined to build ajax-loader.gif URL 2013-06-15 13:13:15 +02:00
Jean Baptiste Favre b05130bfb8 Fix missing variable in InfiniteScrollPlugin class. Fix issue #3525 2013-06-15 13:12:19 +02:00
Jean Baptiste Favre d211348dae Makes ClientSideShorten loading shorten.js from config['plugins']['server'] if setted. Fix #3528 2013-06-15 12:34:25 +02:00
Jean Baptiste Favre 80da81ba14 Get rid of t.co links for notice's text version. Usefull for client using API. Complements merge-request #205 by @mmn 2013-06-15 11:30:17 +02:00
Jean Baptiste Favre 108aa5c467 Replace t.co links with expanded one provided by Twitter. Can still be a shortened one & will be done only for HTML view, but still a start. Backport of merge_requests/205. 2013-06-15 11:29:09 +02:00
Jean Baptiste Favre f18b516c7a Get rid of t.co links for notice's text version. Usefull for client using API. Complements merge-request #205 by @mmn 2013-06-14 23:28:44 +02:00
Jean Baptiste Favre f726c6b23f Makes TwitterBridge plugin use Twitter API 1.1 instead of API 1 which is deprecated and will be switched off soon 2013-02-18 23:22:45 +01:00
Jean Baptiste Favre a10a34a3cf Make TwitterBridge plugin use Queueing system 2013-02-18 23:22:08 +01:00
Jean Baptiste Favre dd97468c72 Add Twitter mention import support 2013-02-18 23:16:06 +01:00
Evan Prodromou 0c694e16a5 Check that it's spam! 2013-02-13 10:55:32 -05:00
Evan Prodromou cc98a0b76f show percentage in output 2013-02-13 10:04:43 -05:00
Evan Prodromou bcba3e68a3 Updates to silencespammer from production 2013-02-13 10:01:09 -05:00
Evan Prodromou 0362ba7e32 Script to silence spammers 2013-02-13 09:50:53 -05:00
Evan Prodromou 35499a9952 Add a flag to not deliver poll responses to home timeline
Some people really hate getting poll responses in their home timeline,
so there's now a flag to disable that.
2012-11-06 10:25:39 -05:00
Jean Baptiste Favre ae3eaee6cd Merge commit 'refs/merge-requests/182' of gitorious.org:statusnet/mainline into 1.1.x 2012-09-19 09:58:14 +02:00