Commit Graph

5037 Commits

Author SHA1 Message Date
Mikael Nordfeldth
02cbafb987 slightly less confusing inline if 2014-02-23 14:47:41 +01:00
Mikael Nordfeldth
4759365293 Merge commit 'refs/merge-requests/6' of git://gitorious.org/statusnet/gnu-social into merge-requests/6 2014-01-04 21:27:28 +01:00
Mikael Nordfeldth
9edde007b1 instanceof checks for better typing 2014-01-01 20:30:57 +01:00
root
95222df899 check local/plugins before plugins in Plugin::onAutoload 2013-12-31 23:56:56 +00:00
Mikael Nordfeldth
09e06bbc19 Queues should be enabled by default (thanks postblue) 2013-12-02 13:51:55 +01:00
Mikael Nordfeldth
7e638cb8da OpportunisticQM can't run as subsystem qm 2013-11-20 21:46:16 +01:00
Mikael Nordfeldth
9400795a5f Cron split into Cronish and OpportunisticQM
/main/cron changed to /main/runqueue

The key-required functionality is not throughly tested yet.
2013-11-20 21:20:42 +01:00
Mikael Nordfeldth
0cd93c2761 Cron plugin added and now default queue handler
Generally the Cron plugin will run if there's still execution time for
1 second since starting the Action processing. If you want to change
this (such as disabling, 0 seconds, or maybe running bigger chunks,
for like 4 seconds) you can do this, where 'n' is time in seconds.

   addPlugin('Cron', array('secs_per_action', n));

Add 'rel_to_pageload'=>false to the array if you want to run the queue
for a certain amount of seconds _despite_ maybe already having run that
long in the previous parts of Action processing.

Perhaps you want to run the cron script remotely, using a machine capable
of background processing (or locally, to avoid running daemon processes),
simply do an HTTP GET request to the route /main/cron of your GNU social.
Setting secs_per_action to 0 in the plugin config will imply that you run
all your queue handling by calling /main/cron (which runs as long as it can).

/main/cron will output "0" if it has finished processing, "1" if it should
be called again to complete processing (because it ran out of time due to
PHP's max_execution_time INI setting).

The Cron plugin also runs events as close to hourly, daily and weekly
as you get, based on the opportunistic method of running whenever a user
visits the site. This means of course that the cron events should be as
fast as possible, not only to avoid delaying page load for users but
also to minimize the risk of running into PHP's max_execution_time. One
suggestion is to only use the events to add new queue items for later processing.

These events are called CronHourly, CronDaily, CronWeekly - however there
is no guarantee that all events will execute, so some kind of failsafe,
transaction-ish method must be implemented in the future.
2013-11-19 14:13:33 +01:00
Mikael Nordfeldth
5998825458 We haven't added the cron plugin yet 2013-11-19 14:02:53 +01: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
048a435a5e GNUSOCIAL, not STATUSNET. Too many changes to be backwards compatible 2013-11-19 13:21:09 +01:00
Mikael Nordfeldth
1a0e17fea6 Minor queue fixes, probably not very important. Preparing for cron 2013-11-13 18:15:21 +01:00
Mikael Nordfeldth
0a93fa68f3 Slightly better indication that notice section shows incomplete text
Must still be improved somehow.
2013-11-11 13:18:23 +01:00
Mikael Nordfeldth
a987db2c55 Section notices should not take up too much space.
No configuration options for the max amount of characters yet.
2013-11-11 00:47:41 +01:00
Mikael Nordfeldth
1349eb349a curly braces to pick a character in string is not recommended 2013-11-11 00:45:30 +01:00
Mikael Nordfeldth
a480ff5605 Group mentions got the wrong class. Now lists get their own too! 2013-11-07 08:20:41 +01:00
Mikael Nordfeldth
5176f19f7d Cache key lead is 'gnusocial' now (restart daemons!) 2013-11-04 17:38:09 +01:00
Mikael Nordfeldth
413f040673 Profile->getGroupCount() should be used for groupcounts
This was found in the PHP error log as:
    "Trying to get property of non-object in %HTDOCS%/lib/profileaction.php on line 270"
2013-11-02 20:17:14 +01:00
Mikael Nordfeldth
2cecfe8f82 We can only handle Memcached_DataObject in NoResultException 2013-11-02 18:48:28 +01:00
Mikael Nordfeldth
5e054bfdb3 Minor typing stuff and syntax fixes 2013-11-02 17:28:11 +01:00
Mikael Nordfeldth
d289ccb7f2 Minor PHP stylistic features and typing stuff 2013-11-02 13:05:08 +01:00
Mikael Nordfeldth
25e61916f9 There are no LaconicaScripts left 2013-11-02 00:35:59 +01:00
Mikael Nordfeldth
bd86519d50 Minor labeling things for StatusNet to GNU social migration 2013-11-01 14:04:40 +01:00
Mikael Nordfeldth
6bc11b63e3 What was that NewMenu plugin doing there anyway? 2013-11-01 13:57:31 +01:00
Mikael Nordfeldth
f110fc5c9a Using GNUSOCIAL_VERSION instead of STATUSNET_VERSION 2013-11-01 13:51:41 +01:00
Mikael Nordfeldth
255943d78f User agents and generators changed to GNU social 2013-11-01 13:46:05 +01:00
Mikael Nordfeldth
ca66860a4f Better typing and minor fixes to OStatus related stuff 2013-11-01 13:20:45 +01:00
Mikael Nordfeldth
810495708d Version name strings updated, StatusNet only retained for copyright 2013-10-30 16:37:13 +01:00
Mikael Nordfeldth
58717fa6c5 Forgot to catch no-parent-exception
Unfortunately not a specific Exception right now, but we're getting to that.
2013-10-30 14:56:27 +01:00
Mikael Nordfeldth
20bd0c1136 getStreamName will now return nick/fullname based on current user's preferred representation 2013-10-30 13:05:04 +01:00
Mikael Nordfeldth
09ef1fff69 NoticeListItem attentions showed double for User_group
...because they each have their own Profile now! Whiie!
2013-10-30 12:56:17 +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
8dafce34c3 LoginAction somewhat converted to FormAction 2013-10-30 12:23:10 +01:00
Mikael Nordfeldth
f7c6dd4f6e mentioned was an array, not a single object 2013-10-29 15:06:02 +01:00
Mikael Nordfeldth
c5f6937f5e User_group->permalink() is a function, not a variable. 2013-10-29 13:42:21 +01:00
Mikael Nordfeldth
9b6633698c Group discovery from text functions polished
Also removed the entirely unused saveGroups function.

Now avoiding multiGet and using listFind in Profile->getGroups()
so we don't have to deal with ArrayWrapper.
2013-10-29 13:40:14 +01:00
Mikael Nordfeldth
f8b49e69d0 Protected function prepare with array $args defaulting to array() 2013-10-29 10:26:46 +01:00
Mikael Nordfeldth
23a6b4595f Reworked the ActivityContext->attention structure
Removing Evan's obscure attentionType solution and directly using the attention array
2013-10-28 22:21:14 +01:00
Mikael Nordfeldth
f99c4b7f07 More OOP-ish tests using instanceof 2013-10-28 22:18:00 +01:00
Mikael Nordfeldth
fa91bc7132 Some getStaticProperty calls to PEAR globalized 2013-10-28 19:03:09 +01:00
Mikael Nordfeldth
9ea57e5cb2 getAcctUri function added with related exception
Used in ActivityObject for Atom Title generation.

New events:
    * StartGetProfileAcctUri
    * EndGetProfileAcctUri
2013-10-28 18:21:10 +01:00
Mikael Nordfeldth
addd84aa22 Make Atom titles a bit more verbose 2013-10-28 17:54:34 +01:00
Mikael Nordfeldth
fcba540a14 Removed legacy OMB. Use OStatus for remote profiles. 2013-10-28 16:22:09 +01:00
Mikael Nordfeldth
e7a4ccb7b5 Enable json-specified objects in queue_item frames 2013-10-28 12:44:06 +01:00
Mikael Nordfeldth
2ef9beb4b1 defines changed to GNU social names instead of StatusNet 2013-10-27 11:27:12 +01:00
Mikael Nordfeldth
c423e84776 No need to know what DBQueueManager got if not debugging 2013-10-22 17:43:17 +02:00
Mikael Nordfeldth
aa36fecd0a Geonames now not a default plugin
In the name of privacy, let's not by default call a bunch of third
party services with our (users') geographical position.
2013-10-22 17:32:06 +02:00
Mikael Nordfeldth
b46c1746f2 Daisychaining bug with exceptions in PHP 2013-10-22 15:36:02 +02:00