Commit Graph

769 Commits

Author SHA1 Message Date
Mikael Nordfeldth
b01484a0a3 Managed_DataObject::newUri was called improperly 2015-11-23 00:39:49 +01:00
Mikael Nordfeldth
88f7bb1ed5 Some work on ActivityModeration with notice deletion
Let's now create an event called DeleteNotice and also make sure we
handle the onNoticeDeleteRelated properly in ActivityModeration to
avoid possible endless loops etc.
2015-10-03 02:02:37 +02:00
Mikael Nordfeldth
7c4e550e31 Merge branch 'master' into nightly 2015-07-10 16:02:55 +02:00
Bhuvan Krishna
1ab4c9998a Add executable permission to script missing it 2015-07-10 14:46:08 +05:30
Mikael Nordfeldth
2103075ffa Delete notice script added. Give an ID or URI. 2015-07-08 12:30:21 +02:00
Mikael Nordfeldth
b4b8cb57b3 slugify console.php prompt name
since PHP thought it was fun to crash on Quitter España and I
couldn't be bothered messing with readline
2015-05-30 16:40:00 +02:00
Mikael Nordfeldth
3294d704a4 scripts/nukefile.php for blasting crap from the server
Deletes notices and the locally stored file based on File id, as
you may want to just get rid of shit sometimes.
2015-05-30 15:41:04 +02:00
Mikael Nordfeldth
529b2f6613 deleteuser script changed to deleteprofile
Delete remote profiles by providing their ID if known, or you can
provide their profile URI with --uri=https://...

Useful for cleaning up old, long gone and no longer desired profiles
and their notices.
2015-04-21 23:47:55 +02:00
Mikael Nordfeldth
a55d1df585 Clearer warning message on non-existing file 2015-04-16 00:22:09 +02:00
Mikael Nordfeldth
0337a7b866 file_redirection duplicates are removed too in maintenance script 2015-04-15 23:56:23 +02:00
Mikael Nordfeldth
5f1e9e80c2 remove duplicate file URLs script 2015-04-15 23:26:24 +02:00
Mikael Nordfeldth
cbabab273f ImPlugin classes generally require background daemons in CLI
If someone designs an ImPlugin which _doesn't_ require the queues to be
handled in background daemons then they can set the requires_cli property
to false in their class.
2015-04-09 12:17:31 +02:00
Mikael Nordfeldth
325e784ccd Don't store duplicates of files.
If a new file is uploaded, it will be matched with a previously uploaded
file so we don't have to store duplicates. SHA256 is random enough and
also unlikely enough to cause collisions.
2015-02-24 21:11:25 +01:00
Mikael Nordfeldth
0d577584c3 Script to delete file table entries which have disappeared locally 2015-02-24 19:29:28 +01:00
Mikael Nordfeldth
45dc76de26 File and File_redirection adhoc storage methods updated for urlhash 2015-02-19 19:05:24 +01:00
Mikael Nordfeldth
27480d8e8e File_redirection also got urlhash column 2015-02-19 18:34:48 +01:00
Mikael Nordfeldth
176bde269f Merge branch 'nightly' into file_urlhash 2015-02-19 18:13:09 +01:00
Mikael Nordfeldth
0acf3e0e30 Profile table cleaning script. 2015-02-18 14:01:35 +01:00
Mikael Nordfeldth
5a8f24eb46 urlhash first steps, including scripts/upgrade.php 2015-02-17 18:55:12 +01:00
Mikael Nordfeldth
ff004c5912 Avoid CLI printing some PEAR::DB deprecated stuff
We should get rid of PEAR::DB and reenable these logs. Upstream
doesn't seem to update.
2015-02-03 21:27:25 +01:00
Mikael Nordfeldth
12058c30b4 Managed_DataObject->updateWithKeys throws its own exception 2015-01-25 12:54:08 +01:00
Mikael Nordfeldth
4917a422a1 updateKeys -> updateWithKeys (w/ functionality) 2015-01-25 12:07:26 +01:00
Mikael Nordfeldth
8e6ea2056d Usage documentation in the stopdaemons script 2014-12-10 21:17:57 +01:00
Joshua Judson Rosen
20599d2964 stopdaemons.sh: pass site-specifier args through to getvaliddaemons.php 2014-12-06 18:54:15 -05:00
Mikael Nordfeldth
d02f3c4648 Conversation URIs could be NULL on upgrade 2014-11-27 18:56:57 +01:00
Mikael Nordfeldth
f1d7555ccc Simulation does not support plugins yet 2014-11-07 16:00:08 +01:00
Mikael Nordfeldth
d1f5baa982 Let's not avoid error reporting completely in getvaliddaemons 2014-08-24 13:20:05 +02:00
Roland Haeder
ea53233f17 Fixed CHMOD + set error_reporting(0) in getvaliddaemons.php to avoid strict warnings in PHP +5.5
Signed-off-by: Roland Haeder <roland@mxchange.org>
2014-08-24 13:12:44 +02:00
Mikael Nordfeldth
1ee79dc379 Merge request from chimo adding getvaliddaemons to stopdaemons.php
Source: https://gitorious.org/statusnet/gnu-social/merge_requests/15
2014-07-14 23:53:55 +02:00
Mikael Nordfeldth
04f60fd1d9 Favorites not part of simulation, must implement plugin support 2014-06-28 11:22:07 +02:00
Mikael Nordfeldth
fcdd061b4f pluginified most of hasFave, getFaves and related calls
The code is now more event-driven when it comes to rendering notices
and their related HTML elements, since we can't have direct calls from
core to a plugin.

lib/activitymover.php has a function to move a Favorite activity which
will not happen now. The move must be pluginified and performed as an
event which plugins can catch on to.
2014-06-27 14:09:02 +02:00
chimo
6d9681d398 stopdaemons.sh: dynamic daemons list
Use getvaliddaemons.php instead of the hardcoded list of daemons
2014-06-07 10:34:51 -04:00
Mikael Nordfeldth
fb82c75b49 adminUpdates setting not available now
We don't run a service similar to update.status.net yet. Maybe we should,
but that's for the future to decide. Currently I view it as a callback
that we want to avoid.
2014-05-19 14:53:52 +02:00
Mikael Nordfeldth
37e57610fb Minor script fixes 2014-05-19 14:46:35 +02:00
Mikael Nordfeldth
bf8c26f835 Thumbnail cleaning script, for missing files and File entries
Should be safe to run at any time, since thumbnails are regenerated on demand.
2014-05-12 14:41:12 +02:00
Mikael Nordfeldth
214a10ddec File_thumbnail fixes (run scripts/upgrade.php)
We're now capable of doing image rotation for thumbnails based on
EXIF orientation data. Also, thumbnails are tracked by filenames and
thus we can delete them from storage when we feel like it.
2014-05-12 14:33:41 +02:00
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