Evan Prodromou [Tue, 8 Feb 2011 16:33:36 +0000 (11:33 -0500)]
Make ShowmessageAction not be a subclass of MailboxAction
The ShowmessageAction was using the MailboxAction to do its display of
a single direct message. Since we redid the nickname management, this
was breaking (MailboxAction requires a nickname argument,
ShowmessageAction does not, and nickname validation that used to
quietly fail now throws an exception).
I've moved the message list processing to its own widget class, so the
need to subclass MailboxAction has disappeared. I've rewritten this
action to use the MessageListItem widget, and it works fine now.
Evan Prodromou [Tue, 8 Feb 2011 16:11:21 +0000 (11:11 -0500)]
Create and use MessageList widget
Our mailbox actions (inbox and outbox) were doing their own display of
messages. This was causing issues with especially showmessage, which
since the more rigourous nickname checks were added, no longer works as
a mailbox subclass.
I've taken the time to rip out the message listing code from MailboxAction
and moved it to a MessageList widget. The different mailboxes now have their
own subclasses that show the correct profile in the list.
Brion Vibber [Mon, 7 Feb 2011 22:38:35 +0000 (14:38 -0800)]
Issue #3025: string -> boolean for profile_background_tile entry in JSON user results from Twitter-compat API
This entry was using the strings 'true' and 'false' instead of literal booleans, which could confuse clients expecting literal booleans as in other places and on Twitter in this place.
Brion Vibber [Mon, 7 Feb 2011 20:39:40 +0000 (12:39 -0800)]
Add a brief explanation of what group inbox is at the top of the page (instructions section), plus a message to show when there are no private messages in the inbox.
Brion Vibber [Mon, 7 Feb 2011 20:18:41 +0000 (12:18 -0800)]
Fix group regexes that got missed in Nickname::DISPLAY_FMT update: fixes bug where group linking happened, but not actual delivery, when using _underscores_ in the !group_name
Brion Vibber [Tue, 1 Feb 2011 22:35:42 +0000 (14:35 -0800)]
Ticket #3022: fix formatting output for ApiAction::clientError and ApiAction::serverError when caller doesn't explicitly pass the format.
Format's already available as a member variable, so use it!
Fixes some error reponses in api/statusnet/groups/leave.json which were coming through as XML.
May fix some others as well.
Zach Copley [Mon, 31 Jan 2011 23:42:43 +0000 (23:42 +0000)]
FacebookPlugin: Fix up FBML canvas app so it keeps working after
Facebook removed Profile Boxes and some API calls it relied upon.
See: http://developers.facebook.com/roadmap/deprecations
Zach Copley [Mon, 31 Jan 2011 23:42:43 +0000 (23:42 +0000)]
FacebookPlugin: Fix up FBML canvas app so it keeps working after
Facebook removed Profile Boxes and some API calls it relied upon.
See: http://developers.facebook.com/roadmap/deprecations
Brion Vibber [Mon, 31 Jan 2011 21:12:56 +0000 (13:12 -0800)]
Performance counters: records number of total and unique cache get/set/incr/deletes and queries, and logs to syslog.
$config['site']['logperf'] = true; // to record & dump total hits of each type and the runtime to syslog
$config['site']['logperf_detail'] = true; // very verbose -- dump the individual cache keys and queries as they get used (may contain private info in some queries)
Seeing 180 cache gets on a timeline page seems not unusual currently; since these run in serial, even relatively small roundtrip times can add up heavily.
We should consider ways to reduce the number of round trips, such as more frequently storing compound objects or the output of processing in memcached.
Doing parallel multi-key lookups could also help by collapsing round-trip times, but might not be easy to fit into SN's object model. (For things like streams this should actually work pretty well -- grab the list, then when it's returned go grab all the individual items in parallel and return the list)
Brion Vibber [Mon, 31 Jan 2011 20:22:50 +0000 (12:22 -0800)]
Use cachedQuery on File::getAttachments, plus other cleanups:
* dropped unnecessary join on notice table
* made the function actually static, since it makes no sense as an instance variable. The only caller (in AttachmentList) is updated.
Brion Vibber [Mon, 31 Jan 2011 19:45:19 +0000 (11:45 -0800)]
Fix for ticket #3020: set MySQL session time_zone variable to UTC ('+0:00') so TIMESTAMP column values are comparable against our other UTC timestamp values.
MySQL stores TIMESTAMP columns as UTC, but with a local time interface. (SRSLY?!) DATETIME columns are always bare and assumed to be local time, but we keep only UTC in them.
Forcing the session time_zone to UTC means we won't have to worry as much about what we're sending/receiving in there.
Brion Vibber [Thu, 27 Jan 2011 20:27:31 +0000 (12:27 -0800)]
Session GC fix: save session.modified field as UTC so our comparisons work.
Had to tweak statusnet.ini to remove the DB_DATAOBJECT_MYSQLTIMESTAMP bitfield constant on session.modified; while it sounds like a useful and legit setting, it actually just means that DB_DataObject silently fails to pass through any attempts to explicitly set the value. As a result, MySQL does its default behavior which is to insert the current *LOCAL* time, which is useless.
This was leading to early GC west of GMT, or late GC east of it. Early GC could at worst destroy all live sessions (whoever's session *triggered* GC is fine, as the session then gets saved right back.)
Brion Vibber [Wed, 26 Jan 2011 23:49:57 +0000 (15:49 -0800)]
Fix ticket #3013: MAX_FILE_SIZE hidden fields were incorrectly placed
In order to apply to PHP's POST processing, the MAX_FILE_SIZE field must appear *before* the file upload field. They were incorrectly placed after, where they had no effect on POST processing.
Brion Vibber [Wed, 26 Jan 2011 22:57:52 +0000 (14:57 -0800)]
Fix ticket #3016: when using non-AJAX form of the ostatus subscription initiation for non-local group joins, show the "group" field instead of a blank "user" field
Brion Vibber [Wed, 26 Jan 2011 22:57:52 +0000 (14:57 -0800)]
Fix ticket #3016: when using non-AJAX form of the ostatus subscription initiation for non-local group joins, show the "group" field instead of a blank "user" field