Commit Graph

11848 Commits

Author SHA1 Message Date
Brion Vibber
9ec395b07a 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.
2011-02-25 13:22:13 -08:00
Evan Prodromou
1508193df4 fix layout of form with magic hoohaw 2011-02-25 13:18:28 -08:00
Evan Prodromou
62a5f270d6 Merge branch '0.9.x' of gitorious.org:statusnet/mainline into 0.9.x 2011-02-25 12:56:40 -08:00
Evan Prodromou
2b995c943f allow access to confirm first for not-logged-in users 2011-02-25 12:56:21 -08:00
Brion Vibber
880b1b666e Merge branch 'master' into 0.9.x 2011-02-25 12:24:18 -08:00
Brion Vibber
534bed9d74 Merge branch '0.9.x' of gitorious.org:statusnet/mainline into 0.9.x 2011-02-25 12:24:18 -08:00
Brion Vibber
55b1f3d84c 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.
2011-02-25 12:15:38 -08:00
Samantha Doherty
7f50315168 Quick fix for popular notices in cleaner theme. 2011-02-25 13:43:21 -05:00
Brion Vibber
052ae2d88a Test cases for Unicode hashtags 2011-02-25 10:25:13 -08:00
Brion Vibber
0291c6f7cd Merge branch 'unicode-tag' into 0.9.x 2011-02-25 10:17:03 -08:00
Brion Vibber
59a413cf5e Merge branch 'master' into 0.9.x 2011-02-25 10:16:00 -08:00
Samantha Doherty
09a3db628c First revision of new theme, cleaner. 2011-02-25 12:00:55 -05:00
Evan Prodromou
81bcdfe2be Merge branch '0.9.x' of gitorious.org:statusnet/mainline into 0.9.x 2011-02-25 08:02:26 -08:00
Evan Prodromou
7c192dabe2 Let users who aren't allowed to login confirm their email separately 2011-02-25 08:01:41 -08:00
Evan Prodromou
ecfb3b9288 allow passing an url to email confirmation function 2011-02-25 08:00:55 -08:00
Zach Copley
17176ee445 Merge branch 'json-activities' into 0.9.x 2011-02-25 00:15:26 -08:00
Zach Copley
77c280a48b Revert "FacebookBridge - Add lots of debug output (revert me)"
This reverts commit c44a622449.
2011-02-24 14:21:50 -08:00
Zach Copley
7d50189ec2 FacebookBridge - Don't hinder autoloading if the Facebook ID and secret aren't set 2011-02-24 13:57:21 -08:00
Zach Copley
de6d46ea4b FacebookBridge - dequeue messages that aren't bound for Facebook 2011-02-24 13:29:56 -08:00
Zach Copley
c44a622449 FacebookBridge - Add lots of debug output (revert me) 2011-02-24 12:59:37 -08:00
Zach Copley
65dbf485e4 FacebookBridge - make a huge fuss if we can't create a valid Facebookclient 2011-02-24 12:52:31 -08:00
Brion Vibber
295e2bde56 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.)
2011-02-23 16:37:55 -08:00
Brion Vibber
1be2226019 replace router regexes with tags with a fixed chunk that takes any non-/ char. This'll let other code decide what's a valid tag. 2011-02-23 16:32:56 -08:00
Brion Vibber
8eca1b8dac 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.
2011-02-21 16:36:39 -08:00
Brion Vibber
2a42dac72a 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
2011-02-21 16:10:07 -08:00
Brion Vibber
f3c822cc15 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.
2011-02-21 15:52:12 -08:00
Brion Vibber
3fb4b92cd6 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.
2011-02-21 15:01:57 -08:00
Brion Vibber
8e7c279c9e 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.
2011-02-21 14:14:32 -08:00
Evan Prodromou
f743a233ab Merge branch '0.9.x' of gitorious.org:statusnet/mainline into 0.9.x 2011-02-21 16:36:12 -05:00
Evan Prodromou
bf8a3c1931 disallow login for users without validated email 2011-02-21 16:20:10 -05:00
Brion Vibber
2e1c7c779d Merge branch 'master' into 0.9.x 2011-02-21 12:33:47 -08:00
Brion Vibber
eb7e3ee528 Fixes for ticket #3052: some commands started triggering when extra text is supposed to suppress them
Regressions caused by bad refactoring in commit 21feac3bea.
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.
2011-02-21 12:12:10 -08:00
Brion Vibber
11e033f05c CommandInterpreter test cases to guard against regressions 2011-02-21 12:12:10 -08:00
Brion Vibber
6b18f86e01 Issue #3049 - resync doc/im with the help command text (various additions since doc was last edited) 2011-02-21 11:23:07 -08:00
Evan Prodromou
a5154bf612 Merge branch '0.9.x' into reqemailprivate 2011-02-21 13:17:51 -05:00
Evan Prodromou
1525acdca1 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).
2011-02-21 10:20:42 -05:00
Zach Copley
93e3d49044 Activity Streams JSON: inReplyTo objects weren't being output. Fixed. 2011-02-18 18:52:49 -08:00
Zach Copley
b741184d9b Add provider to Activity Streams JSON 2011-02-18 18:10:21 -08:00
Zach Copley
0632d4f20c Merge branch '0.9.x' into json-activities
* 0.9.x:
  HTML and style cleanup for EmailSummary plugin.
2011-02-18 15:45:11 -08:00
Zach Copley
68017392ff Make other timeline API endpoints output Activity Streams JSON 2011-02-18 15:43:40 -08:00
Samantha Doherty
e9184dd775 HTML and style cleanup for EmailSummary plugin. 2011-02-18 13:49:29 -05:00
Zach Copley
da42d36d7f Activity Streams JSON - express to and in-reply-to stuff as person objects 2011-02-18 10:02:41 -08:00
Zach Copley
20e414665d Add tags to Activity Streams JSON 2011-02-18 09:29:49 -08:00
Zach Copley
60f62199a1 Add context to Activity Streams JSON 2011-02-18 00:51:08 -08:00
Zach Copley
11f77b2fca Add PoCo to Activity Streams JSON 2011-02-17 22:36:14 -08:00
Zach Copley
97af5e1954 Add geopoint (GeoJSON) extension to AS JSON output 2011-02-17 20:12:28 -08:00
Zach Copley
e84b01c76f avatars -> avatarLinks 2011-02-17 19:34:39 -08:00
Zach Copley
e98e443605 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
2011-02-17 19:11:29 -08:00
Zach Copley
29ce5dd19a Reinstate profile_info in author/actor 2011-02-17 19:02:57 -08:00
Brion Vibber
98b1fe07c6 Blow user:site_owner cache when granting/revoking 'owner' role 2011-02-17 16:46:08 -08:00