Commit Graph

54 Commits

Author SHA1 Message Date
Mikael Nordfeldth
8fac7a9f6c StatusNet class renamed GNUsocial
also added backward compatible StatusNet class for the two calls I know
third party plugins use, isHTTPS and getActivePlugins
2015-02-27 12:44:15 +01:00
Mikael Nordfeldth
cbb7ec07a5 When called in offline queue, File::url was HTTP
Despite having the site configured "always" for HTTPS, File generated
thumbnails and such with HTTP urls.
2015-01-12 19:19:41 +01:00
Mikael Nordfeldth
cc5aff5de3 StatusNet::delPlugin($name) added to disable plugins
Instead of setting some weird $config['plugins']['disable-Blah'] yourself.
The class name, StatusNet, will probably change in the future to GNU social.
No global function added, as it exists for addPlugin().
2014-05-31 00:27:23 +02:00
Florian Hülsmann
58d1300745 fixed config for php >=5; see php.net/array_merge 2014-03-30 16:56:48 +02:00
Mikael Nordfeldth
450ae3043b Plugins should be initialized with an empty array, not null 2013-11-19 13:52:41 +01:00
Mikael Nordfeldth
c942bdcb43 Comment and typing improvements
To make the StatusNet::addPlugin() accept only arrays,
the lib/default.php had to be changed because all plugins
had 'null' as default value instead of an array.
2013-11-19 13:29:26 +01:00
Mikael Nordfeldth
06b068d43b Don't allow double plugin loading 2013-11-19 13:25:02 +01:00
Mikael Nordfeldth
e45edd6ae2 Use addPlugin! (esp. XMPP folks should do this)
If you're using XMPP by setting $config['xmpp'][*] then you should do:

    addPlugin('Xmpp', $config['xmpp']);

because setting it directly in $config[''] won't do anything.

Also, default resource for XMPP is now 'gnusocial'. If you want something
more random, set it in your addPlugin config array.
2013-10-30 12:28:39 +01:00
Mikael Nordfeldth
0398741956 Core plugin list would not merge into $config 2013-10-19 15:25:59 +02:00
Mikael Nordfeldth
2a5ba1f74b Core and Default plugins separated, now loads on install
_flow_ reported on IRC that install.php had stopped working. This was
because default plugins had been put into two separate lists, and the
list with AuthCrypt was never loaded when performing an installation.

Core plugins cannot be disabled.

I also removed the Memcache autodetection thing since it should be
solved in a more elegant manner.
2013-10-19 14:38:15 +02:00
Mikael Nordfeldth
9d3abc3600 $_PEAR now defined globally as new PEAR, so no static calls are made 2013-09-23 22:27:43 +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
923f16abe5 Properly definingStatusNet class static functions with 'static' 2013-08-18 20:37:33 +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
Evan Prodromou
0760c64264 log when including a file 2011-12-03 12:31:47 -05:00
Evan Prodromou
a818d5c61a use null for db/database config, check for it 2011-12-03 11:45:56 -05:00
Zach Copley
8e501584b4 Use array_merge instead of array_replace (same effect, and array_merge works with PHP versions < 5.3)
fixes http://status.net/open-source/issues/3393
2011-09-22 12:54:22 -07:00
Zach Copley
7f5080d5e3 * Allow setting single user site profile
* Fix site profile array munging
2011-08-27 14:25:12 -07:00
Zach Copley
af97bc896e Make site profiles work 2011-08-26 21:10:24 -07:00
Evan Prodromou
7c6399a51a Remove now-unused statusnet.ini 2011-08-22 18:03:05 -04:00
Zach Copley
36d619480a Rip out user, group and site design customization code
Squashed commit of the following:

commit 0bcfb6535115ec0a11669420f8689aeedc417bc8
Author: Zach Copley <zach@status.net>
Date:   Thu Jun 9 15:51:47 2011 -0400

    Remove design-related stuff from the API

commit 88da010256fbcaee1ff01d9507ea47d3225f2825
Author: Zach Copley <zach@status.net>
Date:   Thu Jun 9 15:40:16 2011 -0400

    Mop up misc design related code

commit 11958b064745b797b4c9f9f4b7e8f65e4c82ce83
Author: Zach Copley <zach@status.net>
Date:   Thu Jun 9 15:21:00 2011 -0400

    Remove Design DB_DataObject class and references to it in schema

commit f8540594728ce6ba4697eb21657ccb897a9fc127
Author: Zach Copley <zach@status.net>
Date:   Thu Jun 9 13:15:54 2011 -0400

    Remove design-related actions and widgets

commit ddf7b4d425b88b58956b8be06047d2a3e0560bd2
Author: Zach Copley <zach@status.net>
Date:   Thu Jun 9 13:10:57 2011 -0400

    Remove navigation / routing to design settings actions

commit e3f280f8780d99168edf37ef766956f281e9c5da
Author: Zach Copley <zach@status.net>
Date:   Thu Jun 9 13:03:09 2011 -0400

    CurrentUserDesignAction -> Action

commit 6780b1a07e1375a7fa0fd48c8bf3109d9a12e33e
Author: Zach Copley <zach@status.net>
Date:   Thu Jun 9 12:54:22 2011 -0400

    * GroupDesignAction -> GroupAction (new base class for group actions)

commit 2136377e895db274709a1d486f377f13946ccfd6
Author: Zach Copley <zach@status.net>
Date:   Thu Jun 9 12:36:40 2011 -0400

    OwnerDesignAction -> Action
2011-06-09 16:20:19 -04:00
Evan Prodromou
c97048d01b merge 0.9.x into 1.0.x 2011-05-04 14:59:39 -07:00
Brion Vibber
02c2c3a6cc Provisional workaround for router inconsistencies in background processes that switch site configs.
Ensure that router is cleared when we do site setup; we can still fetch the data from cache, so it should stay fast, but should ensure that we don't end up with someone else's routes still set up, which may be an issue breaking some of the bookmark handling that needs routing with a rare plugin.
2011-03-30 14:18:29 -07:00
Evan Prodromou
0791d0034f return Ajax-y XML on exceptions 2011-03-16 18:53:46 -04:00
Brion Vibber
9df856e667 Merge branch '0.9.x' into merge
Conflicts:
	README
	actions/hostmeta.php
	classes/File_redirection.php
	lib/common.php
	lib/designsettings.php
	lib/router.php
	lib/util.php
	lib/xmppmanager.php
	plugins/OStatus/OStatusPlugin.php
2010-12-07 10:50:05 -08:00
Craig Andrews
cc0038d47c Fix isHTTPS to work correctly for Cherokee and IIS 2010-11-10 15:53:20 -05:00
Brion Vibber
edf8990aa9 fix notice on non-https views 2010-10-18 11:12:26 -07:00
Brion Vibber
fa50ab2a94 fix notice on non-https views 2010-10-15 15:01:55 -07:00
Brion Vibber
dcf0acd503 Make StatusNet::initDefaults() public so we can call it from the installer. 2010-10-15 13:34:35 -07:00
Craig Andrews
0721d8d3e2 Merge remote branch 'statusnet/0.9.x' into 1.0.x 2010-10-14 15:27:17 -04:00
Evan Prodromou
cef10c7167 add static method StatusNet::isHTTPS() 2010-10-14 00:16:23 -04:00
Brion Vibber
5f81f6119b Merge branch '0.9.x' into 1.0.x 2010-10-12 16:33:36 -07:00
Brion Vibber
9d9e80ea21 Followup to IIS installer tweaks in [9bb48c36]:
* skip 0-byte config files when initializing, go ahead and redirect to installer if no non-0-byte files
* tweak warning on installer.php to let you know if you have a 0-byte config.php that's not writable, as opposed to generally already having a config.php with data in it
2010-10-12 13:00:03 -07:00
Evan Prodromou
7183175429 Merge branch 'master' into 1.0.x 2010-08-13 14:33:41 -07:00
Brion Vibber
19e6b84050 StatusNet_network staticGet lookup fix 2010-08-10 17:22:26 -07:00
Craig Andrews
39392e03a7 Merge branch '0.9.x' into 1.0.x
Conflicts:
	actions/confirmaddress.php
	actions/imsettings.php
2010-04-18 19:21:15 -04:00
Brion Vibber
a05e674843 showplugins.php: dump list of activated plugins and their settings on this site 2010-04-12 11:49:59 -07:00
Brion Vibber
886e28aaa9 Stub plugins administration panel, allows for disabling/re-enabling plugins from the default plugins list. 2010-03-22 13:58:27 -07:00
Brion Vibber
e89908f261 Merge branch '0.9.x' of git@gitorious.org:statusnet/mainline into 1.0.x
Conflicts:
	lib/channel.php
	scripts/imdaemon.php
2010-03-22 13:56:16 -07:00
Brion Vibber
b9fc4c24b4 Pulling the stub plugin panel back out; we'll flesh it out more for 1.0.x and see if we can make it easier to disable through the config file for now.
Revert "Stub plugins administration panel, allows for disabling/re-enabling plugins from the default plugins list."

This reverts commit d9a9fd3779.
2010-03-17 08:55:16 -07:00
Brion Vibber
d9a9fd3779 Stub plugins administration panel, allows for disabling/re-enabling plugins from the default plugins list. 2010-03-16 16:01:00 -07:00
Brion Vibber
b1d90a835f Don't switch people from the Memcache to Memcached plugin without their knowledge when using back-compatibility $config['memcached']['enabled']. Performance characteristics for Memcached version on large-scale sites not tested yet.
New installations should be using addPlugin explicitly.
2010-03-11 18:10:41 -08:00
Craig Andrews
714d920fae Merge branch '0.9.x' into 1.0.x
Conflicts:
	classes/statusnet.ini
	db/statusnet.sql
	lib/jabber.php
	lib/xmppmanager.php
2010-03-08 17:22:23 -05:00
Craig Andrews
51a245f18c Added Memcached plugin (using pecl/memcached versus pecl/memcache) 2010-03-08 17:17:37 -05:00
Zach Copley
37b106d49c Fix variable name in NoConfigException 2010-03-04 00:00:46 -08:00
Craig Andrews
20d6a7caed Merge branch '0.9.x' into 1.0.x
Conflicts:
	lib/queuemanager.php
	lib/xmppmanager.php
	plugins/Xmpp/Fake_XMPP.php
	scripts/imdaemon.php
2010-02-16 13:15:09 -05:00
Brion Vibber
81b6b58e33 Merge branch 'master' into testing
Conflicts:
	lib/stompqueuemanager.php
2010-02-16 09:22:02 -08:00
Brion Vibber
c74aea589d Stomp queue restructuring for mass scalability:
- Multiplexing queues into groups and for multiple sites.
- Sharing vs breakout configurable per site and per queue via $config['queue']['breakout']
- Detect how many times a message is redelivered, discard if it's killed too many daemons
 - count configurable with $config['queue']['max_retries']
 - can dump the items to files in $config['queue']['dead_letter_dir']

Queue daemon memory & resource leak fixes:
- avoid unnecessary reconnections to memcached server (switch persistent connections back in on second initialization, assuming it's child process)
- monkey-patch for leaky .ini loads in DB_DataObject::databaseStructure() - was leaking 200k per active switch
- applied leak fixes to Status_network as well, using intermediate base Safe_DataObject for both it and Memcache_DataObject

Misc queue fixes:
- correct handling of child processes exiting due to signal termination instead of regular exit
- shutdown instead of infinite respawn loop if we're already past the soft memory limit at startup
- Added --all option for xmppdaemon... still opens one xmpp connection per site that has xmpp active

Cache updates:
- add Cache::increment() method with native support for memcached atomic increment
2010-02-16 09:16:51 -08:00
Craig Andrews
32084e33a2 Merge branch '0.9.x' into 1.0.x
Conflicts:
	lib/queuemanager.php
2010-02-16 10:25:57 -05:00
Brion Vibber
dc09453a77 First steps on converting FeedSub into the pub/sub basis for OStatus communications:
* renamed FeedSub plugin to OStatus
* now setting avatar on subscriptions
* general fixes for subscription
* integrated PuSH hub to handle only user timelines on canonical ID url; sends updates directly
* set $config['feedsub']['nohub'] = true to test w/ foreign feeds that don't have hubs (won't actually receive updates though)
* a few bits of code documentation
* HMAC support for verified distributions (safest if sub setup is on HTTPS)

And a couple core changes:
* minimizing HTML output for exceptions in API requests to aid in debugging
* fix for rel=self link in apitimelineuser when id given

This does not not yet include any of the individual subscription management (Salmon notifications for sub/unsub, etc) nor a nice UI for user subscriptions.
Needs some further cleanup to treat posts as status updates instead of link references.
2010-02-08 11:15:29 -08:00