summaryrefslogtreecommitdiff
path: root/classes
AgeCommit message (Collapse)Author
2010-04-26Give users more control over URL shorteningEvan Prodromou
Users and administrators can set how long an URL can be before it's shortened, and how long a notice can be before all its URLs are shortened. They can also turn off shortening altogether. Squashed commit of the following: commit d136b390115829c4391b3666bb1967f190a0de35 Author: Evan Prodromou <evan@status.net> Date: Mon Apr 26 02:39:00 2010 -0400 use site and user settings to determine when to shorten URLs commit 1e1c851ff3cb2da5e0dc3a0b06239a9d9c618488 Author: Evan Prodromou <evan@status.net> Date: Mon Apr 26 02:38:40 2010 -0400 add a method to force shortening URLs commit 4d29ca0b91201f6df42940297ed5b64b070efe49 Author: Evan Prodromou <evan@status.net> Date: Mon Apr 26 02:37:41 2010 -0400 static method for getting best URL shortening service commit a9c6a3bace0af44bcf38d1c790425a7be9c72147 Author: Evan Prodromou <evan@status.net> Date: Mon Apr 26 02:37:11 2010 -0400 allow 0 in numeric entries in othersettings commit 767ff2f7ecfd7e76e8418fc79d45e61898f09382 Author: Evan Prodromou <evan@status.net> Date: Mon Apr 26 02:36:46 2010 -0400 allow 0 or blank string in inputs commit 1e21af42a685f600f4a53f49a194013e78b12f20 Author: Evan Prodromou <evan@status.net> Date: Mon Apr 26 02:01:11 2010 -0400 add more URL-shortening options to othersettings commit 869a6be0f5779aff69018d02f9ac0273946040d9 Author: Evan Prodromou <evan@status.net> Date: Sat Apr 24 14:22:51 2010 -0400 move url shortener superclass to lib from plugin commit 9c0c9863d532942b99184f14e923fc3c050f8177 Author: Evan Prodromou <evan@status.net> Date: Sat Apr 24 14:20:28 2010 -0400 documentation and whitespace on UrlShortenerPlugin commit 7a1dd5798f0fcf2c03d1257a18ddcb9008879de0 Author: Evan Prodromou <evan@status.net> Date: Sat Apr 24 14:05:46 2010 -0400 add defaults for URL shortening commit d259c37ad231ca0010c60e5cfd397bb1732874a4 Author: Evan Prodromou <evan@status.net> Date: Sat Apr 24 13:40:10 2010 -0400 Add User_urlshortener_prefs Add a table for URL shortener prefs, a corresponding class, and the correct mumbo-jumbo in statusnet.ini to make everything work.
2010-04-07Merge branch '0.9.x' into 1.0.xEvan Prodromou
2010-04-07Merge branch 'master' into 0.9.xEvan Prodromou
2010-04-07show PEAR_Error message, not the objectEvan Prodromou
2010-04-02Merge branch '0.9.x' into 1.0.xBrion Vibber
Conflicts: actions/imsettings.php lib/jabber.php Made a quick attempt to merge the new JID validation into the XmppPlugin, have not had a chance to test that version live yet. Should also move over the test cases.
2010-04-02Merge branch 'testing' into 0.9.xBrion Vibber
2010-04-02Don't save duplicate messages into a user's packed inbox. We've already got ↵Brion Vibber
the packed box loaded at insert time, so we can simply unpack it and check before doing the update query. Should help with dupes that come in when inbox distrib jobs die and get restarted, etc. Conflicts: classes/Inbox.php Looks like this was implemented on master recently and not copied up to testing. Merging to my version on testing as I've added some doc comments and extracted a couple functions for future ease of use.
2010-04-02Don't save duplicate messages into a user's packed inbox. We've already got ↵Brion Vibber
the packed box loaded at insert time, so we can simply unpack it and check before doing the update query. Should help with dupes that come in when inbox distrib jobs die and get restarted, etc.
2010-04-01Merge branch 'testing' of git@gitorious.org:statusnet/mainline into 0.9.xBrion Vibber
2010-04-01Temporary hack until notice_profile_id_idx is updatedBrion Vibber
to (profile_id, id) instead of (profile_id, created, id). It's been falling back to PRIMARY instead, which is really very inefficient for a profile that hasn't posted in a few months. Even though forcing the index will cause a filesort, it's usually going to be better. Even for large profiles it seems much faster than the badly-indexed query.
2010-04-01Temporary hack until notice_profile_id_idx is updatedBrion Vibber
to (profile_id, id) instead of (profile_id, created, id). It's been falling back to PRIMARY instead, which is really very inefficient for a profile that hasn't posted in a few months. Even though forcing the index will cause a filesort, it's usually going to be better. Even for large profiles it seems much faster than the badly-indexed query.
2010-04-01Revert "Revert "don't insert the same notice twice into an inbox""Evan Prodromou
This reverts commit a09b27ff41df41a86fdb0abae14239907d5ee6ec.
2010-04-01Revert "don't insert the same notice twice into an inbox"Evan Prodromou
This reverts commit 650074c648d98f81674c6e2b0ebf052c473ada6e.
2010-03-31don't insert the same notice twice into an inboxEvan Prodromou
2010-03-31Merge branch 'testing' of git@gitorious.org:statusnet/mainline into 0.9.xBrion Vibber
2010-03-31Merge branch 'master' of git@gitorious.org:statusnet/mainline into testingBrion Vibber
2010-03-31use Subscription::cancel() to cancel all subscriptions on blockEvan Prodromou
2010-03-31do complete unsubscribe process when deleting a userEvan Prodromou
2010-03-29Merge branch '0.9.x' into 1.0.xBrion Vibber
2010-03-29Merge branch 'testing' into 0.9.xBrion Vibber
2010-03-29Merge branch 'master' into testingBrion Vibber
Conflicts: plugins/Blacklist/BlacklistPlugin.php
2010-03-29Add $config['db']['annotate_queries'] option to include caller ID comments ↵Brion Vibber
into queries. Comment can then be seen in process list, slow query logs on the server, aiding in tracking down unexpected slow queries. SELECT /* queuedaemon.php Ostatus_profile->processPost */ * FROM notice WHERE ( notice.uri = 'http://stormcloud.local/mublog2/notice/479' ) INSERT /* POST Notice::saveNew */ INTO notice (profile_id , content ....
2010-03-28Merge branch 'master' into 0.9.xEvan Prodromou
Conflicts: lib/attachmentlist.php
2010-03-28continue deleting even if user profile record is missingEvan Prodromou
2010-03-26Fixes problem with IRC URLs showing as attachmentsNick Holliday
2010-03-24Avoid notice when reporting DB errors for objects that don't have an 'id' fieldBrion Vibber
2010-03-24Merge branch '0.9.x' of git@gitorious.org:statusnet/mainline into 1.0.xBrion Vibber
2010-03-24Merge branch 'testing' of git@gitorious.org:statusnet/mainline into 0.9.xBrion Vibber
2010-03-23fixup_deletions.php script to look for notices posted by now-deleted ↵Brion Vibber
profiles and remove them.
2010-03-23Merge branch 'master' of git@gitorious.org:statusnet/mainline into testingBrion Vibber
2010-03-23Consistently send Profiles into Fave::addNew()Brion Vibber
2010-03-23Consistently send Profiles into Fave::addNew()Brion Vibber
2010-03-23Don't add PHPSESSID parameter onto notice and conversation URIs if we save a ↵Brion Vibber
notice during a session override. This was being triggered by welcomebot messages created at account creation time, then propagated through replies.
2010-03-23Don't add PHPSESSID parameter onto notice and conversation URIs if we save a ↵Brion Vibber
notice during a session override. This was being triggered by welcomebot messages created at account creation time, then propagated through replies.
2010-03-22Merge branch '0.9.x' of git@gitorious.org:statusnet/mainline into 1.0.xBrion Vibber
Conflicts: lib/channel.php scripts/imdaemon.php
2010-03-22blowSubscriberCount and blowSubscriptionCount - no 's'Craig Andrews
2010-03-19Throw an exception when an undefined method is called on one of our ↵Brion Vibber
DB_DataObjects, instead of failing silently. The magic __call() method is used to implement a getter and setter interface, and simply didn't bother to throw an error for things it didn't recognize. This may expose a number of existing errors where mistyped method names are called and we're not noticing that they're failing.
2010-03-19Drop result ID from data objects on clone(). This keeps the original object ↵Brion Vibber
working if it was in the middle of a query loop, even if the cloned object falls out of scope and triggers its destructor. This bug was hitting a number of places where we had the pattern: $db->find(); while($dbo->fetch()) { $x = clone($dbo); // do anything with $x other than storing it in an array } The cloned object's destructor would trigger on the second run through the loop, freeing the database result set -- not really what we wanted. (Loops that stored the clones into an array were fine, since the clones stay in scope in the array longer than the original does.) Detaching the database result from the clone lets us work with its data without interfering with the rest of the query. In the unlikely even that somebody is making clones in the middle of a query, then trying to continue the query with the clone instead of the original object, well they're gonna be broken now.
2010-03-18OStatus discover fixes:Brion Vibber
* Subscription::start was sometimes passing users instead of profiles to hooks, which broke OStatus subscription notifications; now normalizing to profiles for processing. * H-card parsing would trigger a lot of PHP warnings and notices in hKit. Now suppressing warnings and notices for the duration of the call to keep them out of output when display_errors is on. * H-card parsing would trigger a PHP fatal error if the source page was not well-formed XML and Tidy was not present on the system. Switched normalization to use the PHP DOM module which is always present, as we have no need for Tidy's extra features here. * Trying to fetch avatars from Google profiles failed and triggered a PHP warning due to the relative URL not being resolved during h-card parsing. Now passing profile page URL into hKit by sneaking a <base> tag in while we normalize the HTML source. * Profile pages without a "Link" header could trigger PHP notices due to a bad NULL -> array(NULL) conversion in LinkHeader::getLink(). Now checking that there was a return value before converting single return value into array.
2010-03-18Fix for xmpp/sms notification options appearing to be disabled on new ↵Brion Vibber
subscriptions. Base problem is that our caching-on-insert interferes with relying on column default values; the cached object is missing those fields, so they appear to be empty (null) when the object is retrieved from cache. Now explicitly setting them when inserting subscriptions, and cleaned up some code that had alternate code paths. May also have made auto-subscription work for remote OStatus subscribers, but can't test until magic sigs are working again.
2010-03-18Merge branch 'master' of git@gitorious.org:statusnet/mainline into testingBrion Vibber
2010-03-18Ensure that DB connection is active at start of User::updateKeys() and ↵Brion Vibber
Foreign_user::updateKeys(); calls to $this->_quote() require a live connection object and don't lazy-initialize themselves. May fix WSOD when changing incoming email address.
2010-03-18add exception on inconsistent db to User::getProfile()Evan Prodromou
2010-03-17Merge branch 'master' into testingBrion Vibber
2010-03-17Fix to regression for auto-subscribe - was backwards.Brion Vibber
2010-03-15Background deletion of user accounts. Notices are deleted in chunks, then ↵Brion Vibber
the user itself when they're all gone. While deletion is in progress, the account is locked with the 'deleted' role, which disables all actions with rights control. Todo: * Pretty up the notice on the profile page about the pending delete. Show status? * Possibly more thorough account disabling, such as disallowing all use for login and access. * Improve error recovery; worst case is that an account gets left locked in 'deleted' state but the queue jobs have gotten dropped out. This would leave the username in use and any undeleted notices in place.
2010-03-15Drop result ID from data objects on clone(). This keeps the original object ↵Brion Vibber
working if it was in the middle of a query loop, even if the cloned object falls out of scope and triggers its destructor. This bug was hitting a number of places where we had the pattern: $db->find(); while($dbo->fetch()) { $x = clone($dbo); // do anything with $x other than storing it in an array } The cloned object's destructor would trigger on the second run through the loop, freeing the database result set -- not really what we wanted. (Loops that stored the clones into an array were fine, since the clones stay in scope in the array longer than the original does.) Detaching the database result from the clone lets us work with its data without interfering with the rest of the query. In the unlikely even that somebody is making clones in the middle of a query, then trying to continue the query with the clone instead of the original object, well they're gonna be broken now.
2010-03-15Blow more timeline caches on notice delete. Fixes paging on public and ↵Brion Vibber
profile timelines after deleting something from the first page.
2010-03-12Merge commit 'origin/testing' into 0.9.xBrion Vibber
2010-03-12Scrub all atom output with common_xml_safe_str()Zach Copley