Commit Graph

733 Commits

Author SHA1 Message Date
Mikael Nordfeldth
c8c7f5b3fe Test against PHP_VERSION < 5.2.6, we don't support that low 2014-05-09 10:36:22 +02:00
Mikael Nordfeldth
1776c90cb9 Moved oEmbed stuff out to a plugin (Oembed). 2014-05-06 23:32:13 +02:00
Joshua Judson Rosen
15c0568d1b Make stopdaemons.sh work with on multi-instance servers. So: - Allow specifying a site on the command-line, just like startdaemons.sh. - If a site is specified, kill only its daemons--not all daemons with pid-files in the piddir. 2014-05-05 13:34:59 +02:00
Mikael Nordfeldth
e526909bd8 File width and height is now properly set for File 2014-04-22 12:09:24 +02:00
Mikael Nordfeldth
d59eb5e184 Dynamically generate thumbnails (see full text)
The File object now stores width and height of files that can
supply this kind of information. Formats which we can not read
natively in PHP do not currently benefit from this. However an
event hook will be introduced later.

The CreateFileImageThumbnail event is renamed to:
CreateFileImageThumbnailSource to clarify that the hooks should not
generate their own thumbnails but only the source image. Also it now
accepts File objects, not MediaFile objects.

The thumbnail generation is documented in the source code. For
developers, call 'getThumbnail' on a File object and hope for the best.

Default thumbnail sizes have increased to be more appealing.
2014-04-21 20:46:11 +02:00
Mikael Nordfeldth
0a4e1e0f1b Revert "Don't add redundant includedir INSTALLDIR.'/extlib/'"
This reverts commit 31d8069779.

I didn't notice any errors because I had php-pear installed. :]
2014-03-15 14:04:11 +01:00
Mikael Nordfeldth
31d8069779 Don't add redundant includedir INSTALLDIR.'/extlib/' 2014-03-09 22:11:08 +01:00
Mikael Nordfeldth
2272cc244d Removed Inbox from core (unused since 4b2a66ed29)
Added the following FIXME:
How should a Twitter user get their Inbox filled with foreign tweets?

Every imported Twitter user has a profile in the Profile table, so we
could setup a Subscription entry for each of those, meaning they get
collected in the InboxNoticeStream... But this would mean a lot of
unnecessary entries and listings that generally just point to the
locked down Twitter service.

Let's figure out a good relation so we can connect any profile to any
imported foreign notice, so it shows up in the "all" feed.
2014-03-06 04:46:29 +01:00
Mikael Nordfeldth
4b2a66ed29 New mechanism for "all" feed (InboxNoticeStream)
Also cleaned up and made typing stricter for the stream, so only
profiles can be submitted. This reasonably also means we can create
"inbox" or "all" streams for foreign profiles as well using the same
stream handler (but of course only for messages we already know about).

To avoid looking up posts for a long time in a large notice database,
the lookback period for the inbox is no longer than the profile creation
date. (this matches the behaviour of Inbox)

Inbox class can probably be removed now.
2014-03-06 04:18:54 +01:00
Jean Baptiste Favre
88c4630063 Dynamically enable scripts/queuedaemon.php into scripts/getvaliddaemons.php depending on common_config('queue', 'daemon') value. True = enabled, False=disabled. Default is false (see previous commit) 2014-03-01 12:16:38 +01:00
Mikael Nordfeldth
5487c596fc Remove callback sneakery by StatusNet 2014-02-23 14:57:12 +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
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
5308e04e83 Don't disable queuedaemons before Cron stuff is done 2013-11-18 00:50:12 +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
f110fc5c9a Using GNUSOCIAL_VERSION instead of STATUSNET_VERSION 2013-11-01 13:51:41 +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
fcba540a14 Removed legacy OMB. Use OStatus for remote profiles. 2013-10-28 16:22:09 +01:00
Mikael Nordfeldth
53b8412aae printv doesn't exist. Use echo to always print on errors. 2013-10-20 21:02:47 +02:00
Mikael Nordfeldth
352bef2374 Add support (and upgrade path) for group profiles 2013-10-15 11:12:50 +02:00
Mikael Nordfeldth
5da72e5aa2 Legacy fixup script from bad block/sub interaction 2013-10-15 11:00:11 +02:00
Mikael Nordfeldth
202f6ad7a9 Removing legacy code and fixup_* for Status_network tags 2013-10-15 10:54:03 +02:00
Mikael Nordfeldth
01935c7cd0 Legacy StatusNet <0.8 stuff, not needed anymore 2013-10-14 13:40:38 +02:00
Mikael Nordfeldth
a0e107f17f Implemented WebFinger and replaced our XRD with PEAR XML_XRD
New plugins:
* LRDD
    LRDD implements client-side RFC6415 and RFC7033 resource descriptor
    discovery procedures. I.e. LRDD, host-meta and WebFinger stuff.

    OStatus and OpenID now depend on the LRDD plugin (XML_XRD).

* WebFinger
    This plugin implements the server-side of RFC6415 and RFC7033. Note:
    WebFinger technically doesn't handle XRD, but we serve both that and
    JRD (JSON Resource Descriptor), depending on Accept header and one
    ugly hack to check for old StatusNet installations.

    WebFinger depends on LRDD.

We might make this even prettier by using Net_WebFinger, but it is not
currently RFC7033 compliant (no /.well-known/webfinger resource GETs).

Disabling the WebFinger plugin would effectively render your site non-
federated (which might be desired on a private site).

Disabling the LRDD plugin would make your site unable to do modern web
URI lookups (making life just a little bit harder).
2013-09-30 22:04:52 +02:00
Mikael Nordfeldth
633191d808 Making sure scripts and tests check for GNUSOCIAL defined (instead of STATUSNET)
Orbited plugin may not work at all anymore, I had no means to try it.
But there's a check whether 'LACONICA' is defined there, which is a
very unlikely thing in the future. So far only tests and scripts have
been migrated consistently, though.
2013-09-28 15:20:10 +02:00
Mikael Nordfeldth
4ca1c10fb8 IMPORTANT: 'GNUSOCIAL' defined, or daemons wouldn't work
Apparently I forgot scripts/commandline.inc in the commit for 'GNUSOCIAL'
definition 4c6803a054.

define('GNUSOCIAL', true); indicates that we're running GNUSOCIAL, and that
one should be aware of this if applying patches.
2013-09-23 22:10:26 +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
f00949946b minor fixes and cleanups in the scripts directory 2013-09-18 00:25:11 +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
0cb5b6fba7 No need for newline when running 'echo' 2013-08-12 15:22:23 +02:00
Mikael Nordfeldth
542f00f735 printf tries to evaluate "%" in paths, echo does not 2013-08-12 13:18:40 +02:00
Mikael Nordfeldth
20bad68845 Added SSL option to web and cli installers 2013-08-12 13:08:14 +02:00
Evan Prodromou
3fc1d245a1 Merge 1.1.x into master 2013-07-16 10:57:06 -07:00
Evan Prodromou
66f4a39105 Squashed commit of the following:
commit bd23a7da105d635414643dfcedd9c8f710d565b8
Author: Evan Prodromou <evan@e14n.com>
Date:   Sat Jun 29 07:49:03 2013 -0400

    Make the after flag work correctly

commit 5c5845a2f866f0bbffedd8e2e5d1f512f87d5329
Author: Evan Prodromou <evan@e14n.com>
Date:   Sat Jun 29 06:14:43 2013 -0400

    Add an 'after' flag for backup script
2013-06-29 07:52:09 -04:00
Evan Prodromou
4092ee1bd1 Squashed commit of the following:
commit bd23a7da105d635414643dfcedd9c8f710d565b8
Author: Evan Prodromou <evan@e14n.com>
Date:   Sat Jun 29 07:49:03 2013 -0400

    Make the after flag work correctly

commit 5c5845a2f866f0bbffedd8e2e5d1f512f87d5329
Author: Evan Prodromou <evan@e14n.com>
Date:   Sat Jun 29 06:14:43 2013 -0400

    Add an 'after' flag for backup script
2013-06-29 07:49:43 -04:00
Evan Prodromou
0a23946e6b Add messages, directed notices to sim 2013-06-17 20:16:49 -07:00
Evan Prodromou
fb3981bb04 Set the site profile on install 2013-06-17 20:16:31 -07:00
Evan Prodromou
faf4e7e535 Make favorites in createsim 2013-06-16 02:18:19 +00:00
Jean Baptiste Favre
f175512748 Remove static definition of imdaemon.php as valid daemon. 2013-06-15 18:59:17 +02:00
Evan Prodromou
1c1bcd7cc6 Add JSON output for backups
Conflicts:
	lib/useractivitystream.php
2013-05-24 13:51:57 -04:00
Evan Prodromou
4f818c5c81 Add JSON output for backups 2013-05-24 13:50:24 -04:00
Evan Prodromou
4b7a91bb81 Squashed commit of the following:
commit cd43ac412c90722e3b83ec750d9232a2ac2f12c9
Merge: dad72cc adaf175
Author: Evan Prodromou <evan@status.net>
Date:   Mon Jul 9 09:41:05 2012 -0400

    Merge commit 'refs/merge-requests/196' of git://gitorious.org/statusnet/mainline into merge-requests/196

commit adaf17552d3ab35d451c00cdb32d87a107e0e56a
Author: Jeremy Pope <jpope@jpope.org>
Date:   Thu Jul 5 12:33:06 2012 -0500

    fix for XMPP high CPU usage - issue no 3232

commit e573e8ee6690af94259ff8793a84652a139d0662
Author: Jeremy Pope <jpope@jpope.org>
Date:   Thu Jul 5 12:30:34 2012 -0500

    fix for queuedaemon and imdaemon not being stopped by stopdaemons.sh
2012-07-09 09:43:40 -04:00
Evan Prodromou
4a95a0bb60 scripts to join and leave groups 2012-02-07 16:26:51 +01:00
Evan Prodromou
6793616521 Success exit from settag.php if desired state already exists
If you're adding a tag that already exists, or deleting a tag that
doesn't exist, using settag.php, the exit value is 0 instead of
previous -1. This makes scripting around tags a wee bit easier.
2011-10-24 20:13:10 -04:00
Evan Prodromou
b42cc773ed Script to move a statusnetwork from one db server to another
This script helps move a statusnetwork from one DB server to
another. It's for use with multi-site installations (like status.net).
2011-10-16 04:44:08 -04:00
Evan Prodromou
841c71f37d Add profile lists for all tags on upgrade 2011-09-27 11:16:14 -04:00
Evan Prodromou
b0667ea6d4 correct source for createsim notices 2011-09-18 12:37:14 -04:00
Evan Prodromou
73afcad34c add hooks for upgrades 2011-09-15 17:05:32 -04:00