Brion Vibber [Tue, 1 Mar 2011 23:16:39 +0000 (15:16 -0800)]
Alternate Inbox streaming function optimized for threaded paging (for /all stream, while things using the existing API inbox methods won't be affected)
Brion Vibber [Tue, 1 Mar 2011 21:30:38 +0000 (13:30 -0800)]
Hide context entries in threaded lists; it's redundant (and if there's more than a few messages, we have the context link still :D)
Also hides them via CSS for new ajax additions
Brion Vibber [Fri, 25 Feb 2011 21:22:13 +0000 (13:22 -0800)]
Workaround for reply timeline since_id issue: save the notice.created value into reply.modified, so we can key off it as expected.
As a hack this removes the mysql_timestamp bit from the field settings on reply.modified so that our value actually gets saved. This *should* work ok as long as system timezone is set correctly, which we now set to UTC to match when connecting.
Brion Vibber [Fri, 25 Feb 2011 19:04:57 +0000 (11:04 -0800)]
Scalability work on user backup stream generation.
UserActivityStream -- used to create a full activity stream including subscriptions, favorites, notices, etc -- normally buffers everything into memory at once. This is infeasible for accounts with long histories of serious usage; it can take tens of seconds just to pull all records from the database, and working with them all in memory is very likely to hit resource limits.
This commit adds an alternate mode for this class which avoids pulling notices until during the actual output. Instead of pre-sorting and buffering all the notices, empty spaces between the other activities are filled in with notices as we're making output. This means more smaller queries spread out during operations, and less stuff kept in memory.
Callers (backupaccount action, and backupuser.php) which can stream their output pass an $outputMode param of UserActivityStream::OUTPUT_RAW, and during getString() it'll send straight to output as well as slurping the notices in this extra funky fashion.
Other callers will let it default to the OUTPUT_STRING mode, which keeps the previous behavior.
There should be a better way to do this, swapping out the stringer output for raw output more consitently.
Brion Vibber [Thu, 24 Feb 2011 00:37:55 +0000 (16:37 -0800)]
Unicodize a couple regexes for tags: fixes linking & detection of non-ASCII tags that match the current regexes.
(Checks for 'letter' and 'number' characters, underscore, dash, and period.)
Brion Vibber [Tue, 22 Feb 2011 00:18:45 +0000 (16:18 -0800)]
Fix ticket #3057: apply HTML escaping on special characters in Twitter import
Changes the replacement of Twitter "entities" from in-place reverse ordering ('to preserve indices') to a forward-facing append-in-chunks that pulls in both the text and link portions, and escapes them all.
This unfortunately means first *de*-escaping the < and > that Twitter helpfully adds for us.... and any literal &blah;s that get written. This seems to match Twitter's web UI, however horrid it is.
Brion Vibber [Tue, 22 Feb 2011 00:10:07 +0000 (16:10 -0800)]
Partial implementation for ticket #2442: MobileProfile plugin should allow manual switching between regular and mobile rendering modes
http://status.net/open-source/issues/2442
Notes:
* Mapstraction causes JavaScript errors in XHTML mode, breaking our code if we're run later so the link doesn't work to get back to Desktop.
* not 100% sure how safe feature detection is here?
* Currently will be useless but visible links if no JS available; need to fall back to server-side for limited browsers
Brion Vibber [Mon, 21 Feb 2011 23:52:12 +0000 (15:52 -0800)]
Ticket #3011: Add attachments/uploads and attachments/file_quota to api/statusnet/config.(xml|json)
file_quota is adjusted from the defined value to take into account the maximum upload size limits in PHP, or cropped to 0 if uploads are disabled.
This can be used by client apps to determine maximum size for an attachment.
Brion Vibber [Mon, 21 Feb 2011 23:01:57 +0000 (15:01 -0800)]
Fix ticket #3001: Twitter bridge was replacing original form of @-mentions with canonical form unexpectedly
Now using the original text form of @-mentions and #-tags, as in Twitter's own HTMLification.
Canonical forms are still used in generating links, where it's polite to match the canonical form.
Brion Vibber [Mon, 21 Feb 2011 22:14:32 +0000 (14:14 -0800)]
Fix issue #3035: search highlighting broke URLs in some imported messages (Twitter)
Search highlighting was being done with a regex on raw HTML text, followed by a second regex undoing replacements within double-quoted attribute values.
This broke on imported Twitter messages, as the way we generate the markup uses single quotes on the attributes, which didn't get matched by the second regex.
I've replaced this do-then-undo cycle by dividing up the import HTML into freetext spans and tags; the freetext gets replaced, while the tags are left untouched.
Brion Vibber [Mon, 21 Feb 2011 19:42:32 +0000 (11:42 -0800)]
Fixes for ticket #3052: some commands started triggering when extra text is supposed to suppress them
Regressions caused by bad refactoring in commit 21feac3bea72b0ecd88a3.
Test cases in tests/CommandInterpreterTest.php were made against the pre-refactoring code, and now check out with the fixed code.
Failures were caused by not changing logic structure when moving from multiple exit points (each if point would return directly with a null or an object) to setting a result variable and then falling through to a common exit point. Without the if statements being restructured, the result variable would just get overridden by the next case.
Evan Prodromou [Mon, 21 Feb 2011 15:20:42 +0000 (10:20 -0500)]
Extend authorization framework to cover login and API use
I've extended the rights framework (centering on the Right class and Profile::hasRight()) to cover
Web login and API use. This will make it possible to prevent login and API use by users.
I added two new Right constants to the Right class: WEBLOGIN and API. I check these rights using
Profile::hasRight() when initializing users. If the rights check fails, I throw an exception.
I created a new AuthorizationException class for this particular
exception, in order to allow a different UI for these kinds of exceptions (or whatever).
Zach Copley [Fri, 18 Feb 2011 03:11:29 +0000 (19:11 -0800)]
Merge branch '0.9.x' into json-activities
* 0.9.x:
* update translator documentation. * remove superfluous whitespace. * tab to spaces. * add FIXME for undocumented class.
* update translator documentation. * remove superfluous whitespace. * L10n updates. * small refactoring in publicrss.php. * remove PHP4-isms
Localisation updates from http://translatewiki.net.
Double quotes to single quotes.
* improve L10n consistency for English. For example proper punctuation for all button and label titles. * fix some i18n bugs (in-message variables). * update/add translator documentation. * remove superfluous whitespace.
add path separators for Plugin::path()
argument to send email summary to all users on all sites
fix indentation in siteemailsummaryhandler
fix indentation in sendemailsummary.php
fix indentation in Email_summary_status.php
fix indentation in EmailSummaryPlugin.php
fix indentation in usermailsummaryhandler.php