Commit Graph

50 Commits

Author SHA1 Message Date
Mikael Nordfeldth
9deff7afaf Email settings fix for the DB_DataObject bug for saving value 0 2015-03-07 21:57:43 +01:00
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
0590f2975e Merge branch 'utf8mb4' into nightly
Conflicts because of urlhash fixes:
	classes/File.php
	classes/File_redirection.php
	classes/File_thumbnail.php
2015-02-19 20:50:40 +01:00
Mikael Nordfeldth
44191ac81a Faves backed up properly to UAS 2015-02-13 11:52:29 +01:00
Mikael Nordfeldth
2f86cd8602 utf8mb4 conversion on database with index adjusts 2015-02-12 18:18:55 +01:00
Mikael Nordfeldth
7cce2e17ff FavoritePlugin uses getConfigPref for profile setting 2015-02-03 22:02:19 +01:00
Mikael Nordfeldth
3f7a305b2a $this out of context (use $rcpt) 2015-02-03 21:15:37 +01:00
Mikael Nordfeldth
9827e6ad84 The favorite activity is an activity. 2015-02-03 16:53:51 +01:00
Mikael Nordfeldth
adc4dfc081 Wrong variable name (s/fave/object/) 2015-02-03 16:43:56 +01:00
Mikael Nordfeldth
660e8c6efc Fave::addNew now calls Notice::saveActivity
as a bonus we've fixed several FIXME issues for favorite email notification
and updated parts of the codebase for these activities to a more modern style.
2015-02-03 16:34:11 +01:00
Mikael Nordfeldth
0bcecda177 more activity-like terminology in variable names 2015-02-03 15:12:29 +01:00
Mikael Nordfeldth
1104ea2a0e Fave insert logging directly in insert() 2015-02-03 14:58:22 +01:00
Mikael Nordfeldth
acd36698b4 A bunch of clientError that were called as serverError
Calling serverError with a clientError status code (4xx) means it will
automatically default to Internal Server Error (500) which is in the
server error status code range (5xx). That is undesirable.
2015-01-29 23:35:49 +01:00
Mikael Nordfeldth
99b1a6f576 user is a protected property in UAS/AtomUserNoticeFeed
The bug made it impossible to backup with Favorite ;)
Thanks postblue for reporting.
2015-01-23 11:58:42 +01:00
Mikael Nordfeldth
8749c470ca ArrayWrapper spookiness, must make sure it's a Notice there... 2015-01-12 12:06:19 +01:00
Mikael Nordfeldth
aca5ff1b23 Found some unreachable code in Favorite
The portion after StartAtomPubNewActivity would never be reached since
Favorite handles that activity through ActivityHandlerPlugin nowadays.
So I cleaned it up and followed a couple of paths, making stuff prettier.
2015-01-12 02:23:23 +01:00
Mikael Nordfeldth
51f97c7e84 section control over their notice lists + HTML id stuff 2015-01-09 15:46:35 +01:00
Mikael Nordfeldth
1b449ea705 scripts/upgrade.php would fail if Profile_prefs did not exist
A checkschema.php run would've done it, but that would require an
additional step to our upgrade procedure.
2014-11-27 14:46:10 +01:00
Mikael Nordfeldth
aedfb6a8dd FavoritePlugin calls CommandInterpreter::split_arg
The last commit found a bug that a previous move of the FavCommand
into a plugin called $this in FavoritePlugin instead of the instance
of a CommandInterpreter class. Now that call is statically defined in
CommandInterpreter and appropriately called in FavoritePlugin.
2014-11-07 16:24:14 +01:00
Mikael Nordfeldth
6ac2a5b8ff &$supported in CommandSupportedAPI event is boolean
not array as we specified here
2014-11-07 16:13:45 +01:00
Hannes Mannerheim
e3bb5e1df9 do favorites from default like in API
not quite sure about this, but the deleted code in this commit created
activity notices that we couldn't turn off in config.
2014-10-20 16:17:40 +02:00
Mikael Nordfeldth
78dc376f01 Moved some FAVORITE handling from Activity plugin to Favorite 2014-07-28 10:58:24 +02:00
Mikael Nordfeldth
509f31af0e Favorite plugin now "extends" Activity on NoticeAsActivity
Got this mainly from my patches to FreeSocial. The idea is to migrate
also the Note activity to a plugin and have everything be handled as
events, only filling out the basic "context" stuff in the Notice class.
2014-07-28 10:02:53 +02:00
Mikael Nordfeldth
d11ce2ef3b Consistently use "email-notify_fave" syntax for preference 2014-07-27 23:25:49 +02:00
Mikael Nordfeldth
ea8cb21e98 Allow exception to be thrown if saveActivityObject fails 2014-07-15 14:12:39 +02:00
Mikael Nordfeldth
c96f0aa30f More Activity-based reasoning for saveActivity in Notice
If we can, get the activity ID from the activity itself, instead of the
supplied $options array.
2014-07-14 23:54:58 +02:00
Mikael Nordfeldth
31d53ede91 Bad variable reference in Fave class 2014-07-14 23:37:28 +02:00
Mikael Nordfeldth
eb955fe629 "Notice posted" message in Ajax title for NewnoticeAction 2014-07-14 17:11:54 +02:00
Mikael Nordfeldth
b0c4a35940 Local favoriting fills out content to saveActivity 2014-07-14 14:05:47 +02:00
Mikael Nordfeldth
ac44695c44 Put text content into Favorite activities/activityobjects 2014-07-14 13:25:26 +02:00
Mikael Nordfeldth
5ebe01ba36 NoticeStream fixes regarding non-post verbs 2014-07-14 00:59:04 +02:00
Mikael Nordfeldth
0a20abf1d8 Email notify-on-fave moved to Profile_prefs (run upgrade.php) 2014-07-13 19:46:40 +02:00
Mikael Nordfeldth
a9bfa1979d Don't send favorite notifications unless the user wants it. 2014-07-13 12:58:52 +02:00
Mikael Nordfeldth
6f593a79d4 making more sense in mail_notify_fav
We should probably get rid of this function, at least storing everything in
lib/mail.php - but until then, at least let's make it more understandable.
2014-07-13 12:56:43 +02:00
Mikael Nordfeldth
2eea7a2d4b Do proper Activity-plugin based mention notification 2014-07-07 01:15:43 +02:00
Mikael Nordfeldth
fffacaa27c FavorAction now uses Notice::saveActivity 2014-07-06 01:37:03 +02:00
Mikael Nordfeldth
aa33b7f21c Fave does not carry a type
it did in FreeSocial, where I copied my code from.
2014-07-05 16:28:09 +02:00
Mikael Nordfeldth
57a2d7a0e2 Bad ActivityObject generation of Fave 2014-07-05 00:15:22 +02:00
Mikael Nordfeldth
ffb9d7ad3f Rewriting code for notice representation
Getting rid of NoticeListItemAdapter, putting more into ActivityHandlerPlugin
and relying on plugins to handle rendering code of the content. This gives us
a lot more structure and consistency in notice structure and allows activity
plugins to stop rendering certain kinds of notices more easily.

There should also be a property for an ActivityHandlerPlugin class to avoid
rendering notices in the ordinary stream, so we don't have to overload stuff.
2014-07-04 14:14:49 +02:00
Mikael Nordfeldth
b63f6e949c Converted all ActivityObject::fromProfile to $profile->asActivityObject 2014-07-03 10:51:36 +02:00
Mikael Nordfeldth
c44146d6f8 Favorites are now being stored from activities 2014-07-02 18:38:19 +02:00
Mikael Nordfeldth
2e6a32c7be Most of the activityobject-saving for Favorite implemented 2014-07-02 11:38:55 +02:00
Mikael Nordfeldth
b66ec247db Caching fixes for Fave class 2014-07-02 11:38:51 +02:00
Mikael Nordfeldth
687f8ab42c GET, HEAD, DELETE are strings not constants 2014-07-02 11:38:27 +02:00
Mikael Nordfeldth
38bea34562 Moved functions into ActivityHandlerPlugin from MicroAppPlugin
Dummy functions in Favorite plugin so far
2014-07-02 11:37:46 +02:00
Mikael Nordfeldth
138d26d488 Favorite "aside"-sections moved, also small fixes left from before
Action now has 'isAction' which compares the loaded Action with names
of classes in an array (added without the 'Action') to its own type.
2014-06-28 16:09:46 +02:00
Mikael Nordfeldth
7e597ea7cc More Favorite pluginification (favecount, cache, menus(favecount, cache, menus)) 2014-06-28 14:03:30 +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
Mikael Nordfeldth
c4037a7549 Moved Favorite EVENTS into plugin folder text file 2014-06-24 16:47:44 +02:00
Mikael Nordfeldth
db7cc7fa75 Favorite functionality put into plugin (not done yet)
Now we have to fix any code in the core which directly uses the Fave class
or any other favorite stuff, since it is pluginised and thus might not be
available on some installations.
2014-06-24 15:58:53 +02:00