diff options
author | Brion Vibber <brion@pobox.com> | 2010-05-05 17:07:50 -0700 |
---|---|---|
committer | Brion Vibber <brion@pobox.com> | 2010-05-05 17:07:50 -0700 |
commit | e05415f621890bbaf42752577249ecdc22c161fc (patch) | |
tree | 9291f0eb1b6c0a57ffeaa7279d4316ab6041206d | |
parent | 94190e77f664c06c76e650fdebd23720fe26bf6e (diff) | |
parent | b50f300566143837aba3739d62caf679ec19727e (diff) |
Merge branch 'testing' of gitorious.org:statusnet/mainline into 0.9.x
Conflicts:
locale/ca/LC_MESSAGES/statusnet.po
locale/de/LC_MESSAGES/statusnet.po
locale/statusnet.pot
-rw-r--r-- | README | 29 | ||||
-rw-r--r-- | actions/apitimelinefavorites.php | 10 | ||||
-rw-r--r-- | actions/favoritesrss.php | 2 | ||||
-rw-r--r-- | actions/showfavorites.php | 8 | ||||
-rw-r--r-- | classes/Fave.php | 4 | ||||
-rw-r--r-- | classes/User.php | 4 | ||||
-rw-r--r-- | lib/default.php | 3 | ||||
-rw-r--r-- | lib/ping.php | 10 | ||||
-rw-r--r-- | lib/xmppmanager.php | 4 | ||||
-rw-r--r-- | plugins/DirectionDetector/DirectionDetectorPlugin.php | 6 | ||||
-rw-r--r-- | plugins/OStatus/lib/feeddiscovery.php | 2 |
11 files changed, 53 insertions, 29 deletions
@@ -3,7 +3,7 @@ README ------ StatusNet 0.9.2 ("King of Birds") -21 Apr 2010 +3 May 2010 This is the README file for StatusNet, the Open Source microblogging platform. It includes installation instructions, descriptions of @@ -85,18 +85,27 @@ public sites upgrade to the new version immediately. Notable changes this version: +- Installer no longer fails with a PHP fatal error when trying to set up the + subscription to update@status.net - Fixed email notifications for @-replies that come in via OStatus -- OStatus related Fixes to the cloudy theme -- Pass geo locations over Twitter bridge (will only be used if enabled on the Twitter side) -- scripts/showplugins.php - script to dump the list of activated plugins and their settings -- scripts/fixup_blocks.php - script to finds any stray subscriptions in violation of blocks, and removes them -- Allow blocking someone who's not currently subscribed to you (prevents seeing @-replies from them, or them subbing to you in future) -- Default 2-second timeout on Geonames web service lookups +- OStatus related Fixes to the cloudy theme +- Pass geo locations over Twitter bridge (will only be used if enabled on the + Twitter side) +- scripts/showplugins.php - script to dump the list of activated plugins and + their settings +- scripts/fixup_blocks.php - script to finds any stray subscriptions in + violation of blocks, and removes them +- Allow blocking someone who's not currently subscribed to you (prevents + seeing @-replies from them, or them subbing to you in future) +- Default 2-second timeout on Geonames web service lookups - Improved localization for plugins -- New anti-spam measures: added nofollow rels to group members list, subscribers list -- Shared cache key option for Geonames plugin (lets multi-instance sites share their cached geoname lookups) +- New anti-spam measures: added nofollow rels to group members list, + subscribers list +- Shared cache key option for Geonames plugin (lets multi-instance sites + share their cached geoname lookups) - Stability fixes to the TwitterStatusFetcher -- If user allows location sharing but turned off browser location use profile location +- If user allows location sharing but turned off browser location use profile + location - Improved group listing via the API - Improved FOAF output - Several other bugfixes diff --git a/actions/apitimelinefavorites.php b/actions/apitimelinefavorites.php index 8cb2e808d..79632447e 100644 --- a/actions/apitimelinefavorites.php +++ b/actions/apitimelinefavorites.php @@ -185,17 +185,23 @@ class ApiTimelineFavoritesAction extends ApiBareAuthAction { $notices = array(); + common_debug("since id = " . $this->since_id . " max id = " . $this->max_id); + if (!empty($this->auth_user) && $this->auth_user->id == $this->user->id) { $notice = $this->user->favoriteNotices( + true, ($this->page-1) * $this->count, $this->count, - true + $this->since_id, + $this->max_id ); } else { $notice = $this->user->favoriteNotices( + false, ($this->page-1) * $this->count, $this->count, - false + $this->since_id, + $this->max_id ); } diff --git a/actions/favoritesrss.php b/actions/favoritesrss.php index 62f06e841..51c92af93 100644 --- a/actions/favoritesrss.php +++ b/actions/favoritesrss.php @@ -89,7 +89,7 @@ class FavoritesrssAction extends Rss10Action function getNotices($limit=0) { $user = $this->user; - $notice = $user->favoriteNotices(0, $limit); + $notice = $user->favoriteNotices(false, 0, $limit); $notices = array(); while ($notice->fetch()) { $notices[] = clone($notice); diff --git a/actions/showfavorites.php b/actions/showfavorites.php index 4d776ef04..7f3c77ee2 100644 --- a/actions/showfavorites.php +++ b/actions/showfavorites.php @@ -121,11 +121,11 @@ class ShowfavoritesAction extends OwnerDesignAction // Show imported/gateway notices as well as local if // the user is looking at his own favorites - $this->notice = $this->user->favoriteNotices(($this->page-1)*NOTICES_PER_PAGE, - NOTICES_PER_PAGE + 1, true); + $this->notice = $this->user->favoriteNotices(true, ($this->page-1)*NOTICES_PER_PAGE, + NOTICES_PER_PAGE + 1); } else { - $this->notice = $this->user->favoriteNotices(($this->page-1)*NOTICES_PER_PAGE, - NOTICES_PER_PAGE + 1, false); + $this->notice = $this->user->favoriteNotices(false, ($this->page-1)*NOTICES_PER_PAGE, + NOTICES_PER_PAGE + 1); } if (empty($this->notice)) { diff --git a/classes/Fave.php b/classes/Fave.php index 7ca9ade7f..ed4f56aee 100644 --- a/classes/Fave.php +++ b/classes/Fave.php @@ -75,13 +75,13 @@ class Fave extends Memcached_DataObject return Memcached_DataObject::pkeyGet('Fave', $kv); } - function stream($user_id, $offset=0, $limit=NOTICES_PER_PAGE, $own=false) + function stream($user_id, $offset=0, $limit=NOTICES_PER_PAGE, $own=false, $since_id=0, $max_id=0) { $ids = Notice::stream(array('Fave', '_streamDirect'), array($user_id, $own), ($own) ? 'fave:ids_by_user_own:'.$user_id : 'fave:ids_by_user:'.$user_id, - $offset, $limit); + $offset, $limit, $since_id, $max_id); return $ids; } diff --git a/classes/User.php b/classes/User.php index 1928a3c62..2abb7eeb6 100644 --- a/classes/User.php +++ b/classes/User.php @@ -464,9 +464,9 @@ class User extends Memcached_DataObject return $profile->getNotices($offset, $limit, $since_id, $before_id); } - function favoriteNotices($offset=0, $limit=NOTICES_PER_PAGE, $own=false) + function favoriteNotices($own=false, $offset=0, $limit=NOTICES_PER_PAGE, $since_id=0, $max_id=0) { - $ids = Fave::stream($this->id, $offset, $limit, $own); + $ids = Fave::stream($this->id, $offset, $limit, $own, $since_id, $max_id); return Notice::getStreamByIds($ids); } diff --git a/lib/default.php b/lib/default.php index fa4ece10a..ab5f294de 100644 --- a/lib/default.php +++ b/lib/default.php @@ -188,7 +188,8 @@ $default = 'cache' => array('base' => null), 'ping' => - array('notify' => array()), + array('notify' => array(), + 'timeout' => 2), 'inboxes' => array('enabled' => true), # ignored after 0.9.x 'newuser' => diff --git a/lib/ping.php b/lib/ping.php index 735af9ef1..be2933ae3 100644 --- a/lib/ping.php +++ b/lib/ping.php @@ -45,7 +45,15 @@ function ping_broadcast_notice($notice) { $tags)); $request = HTTPClient::start(); - $httpResponse = $request->post($notify_url, array('Content-Type: text/xml'), $req); + $request->setConfig('connect_timeout', common_config('ping', 'timeout')); + $request->setConfig('timeout', common_config('ping', 'timeout')); + try { + $httpResponse = $request->post($notify_url, array('Content-Type: text/xml'), $req); + } catch (Exception $e) { + common_log(LOG_ERR, + "Exception pinging $notify_url: " . $e->getMessage()); + continue; + } if (!$httpResponse || mb_strlen($httpResponse->getBody()) == 0) { common_log(LOG_WARNING, diff --git a/lib/xmppmanager.php b/lib/xmppmanager.php index cca54db08..829eaa36c 100644 --- a/lib/xmppmanager.php +++ b/lib/xmppmanager.php @@ -253,12 +253,12 @@ class XmppManager extends IoManager $from = jabber_normalize_jid($pl['from']); if ($pl['type'] != 'chat') { - $this->log(LOG_WARNING, "Ignoring message of type ".$pl['type']." from $from."); + $this->log(LOG_WARNING, "Ignoring message of type ".$pl['type']." from $from: " . $pl['xml']->toString()); return; } if (mb_strlen($pl['body']) == 0) { - $this->log(LOG_WARNING, "Ignoring message with empty body from $from."); + $this->log(LOG_WARNING, "Ignoring message with empty body from $from: " . $pl['xml']->toString()); return; } diff --git a/plugins/DirectionDetector/DirectionDetectorPlugin.php b/plugins/DirectionDetector/DirectionDetectorPlugin.php index 303e60d5f..34c511e21 100644 --- a/plugins/DirectionDetector/DirectionDetectorPlugin.php +++ b/plugins/DirectionDetector/DirectionDetectorPlugin.php @@ -38,7 +38,7 @@ class DirectionDetectorPlugin extends Plugin { * @param object $notice notice is going to be saved */ public function onStartNoticeSave(&$notice){ - if(self::isRTL($notice->content)) + if(!preg_match('/<span class="rtl">/', $notice->rendered) && self::isRTL($notice->content)) $notice->rendered = '<span class="rtl">'.$notice->rendered.'</span>'; return true; } @@ -48,7 +48,7 @@ class DirectionDetectorPlugin extends Plugin { * * @param */ - public function onEndShowStatusNetStyles(&$xml){ + public function onEndShowStatusNetStyles($xml){ $xml->element('style', array('type' => 'text/css'), 'span.rtl {display:block;direction:rtl;text-align:right;float:right;width:490px;} .notice .author {float:left}'); } /** @@ -102,7 +102,7 @@ class DirectionDetectorPlugin extends Plugin { * * Returns false if the input string isn't a valid UTF-8 octet sequence. */ - private static function utf8ToUnicode(&$str){ + private static function utf8ToUnicode($str){ $mState = 0; // cached expected number of octets after the current octet // until the beginning of the next UTF8 character sequence $mUcs4 = 0; // cached Unicode character diff --git a/plugins/OStatus/lib/feeddiscovery.php b/plugins/OStatus/lib/feeddiscovery.php index 4809f9d35..4ac243832 100644 --- a/plugins/OStatus/lib/feeddiscovery.php +++ b/plugins/OStatus/lib/feeddiscovery.php @@ -104,7 +104,7 @@ class FeedDiscovery $response = $client->get($url); } catch (HTTP_Request2_Exception $e) { common_log(LOG_ERR, __METHOD__ . " Failure for $url - " . $e->getMessage()); - throw new FeedSubBadURLException($e); + throw new FeedSubBadURLException($e->getMessage()); } if ($htmlOk) { |