diff options
author | Evan Prodromou <evan@status.net> | 2010-03-09 10:57:38 -0500 |
---|---|---|
committer | Evan Prodromou <evan@status.net> | 2010-03-09 10:57:38 -0500 |
commit | 3f1a9443d9fc8c6f519913b6014eec814248eea4 (patch) | |
tree | fe2f561d302ad60e507d789c3f782a514f13ce77 | |
parent | 61434ebaa291ebd11cd1423ec36bb66073d55a74 (diff) | |
parent | d644f4148b5856c55ecc3770552c330d5f33348c (diff) |
Merge branch 'master' of git@gitorious.org:statusnet/mainline
-rw-r--r-- | plugins/OStatus/classes/HubSub.php | 2 | ||||
-rw-r--r-- | plugins/RSSCloud/RSSCloudNotifier.php | 2 | ||||
-rw-r--r-- | plugins/RSSCloud/RSSCloudRequestNotify.php | 7 |
3 files changed, 6 insertions, 5 deletions
diff --git a/plugins/OStatus/classes/HubSub.php b/plugins/OStatus/classes/HubSub.php index 3120a70f9..c420b3eef 100644 --- a/plugins/OStatus/classes/HubSub.php +++ b/plugins/OStatus/classes/HubSub.php @@ -192,7 +192,7 @@ class HubSub extends Memcached_DataObject // Any existing query string parameters must be preserved $url = $this->callback; - if (strpos('?', $url) !== false) { + if (strpos($url, '?') !== false) { $url .= '&'; } else { $url .= '?'; diff --git a/plugins/RSSCloud/RSSCloudNotifier.php b/plugins/RSSCloud/RSSCloudNotifier.php index d454691c8..9e7b53680 100644 --- a/plugins/RSSCloud/RSSCloudNotifier.php +++ b/plugins/RSSCloud/RSSCloudNotifier.php @@ -152,7 +152,7 @@ class RSSCloudNotifier function notify($profile) { $feed = common_path('api/statuses/user_timeline/') . - $profile->nickname . '.rss'; + $profile->id . '.rss'; $cloudSub = new RSSCloudSubscription(); diff --git a/plugins/RSSCloud/RSSCloudRequestNotify.php b/plugins/RSSCloud/RSSCloudRequestNotify.php index d76c08d37..030529534 100644 --- a/plugins/RSSCloud/RSSCloudRequestNotify.php +++ b/plugins/RSSCloud/RSSCloudRequestNotify.php @@ -270,13 +270,14 @@ class RSSCloudRequestNotifyAction extends Action function userFromFeed($feed) { - // We only do profile feeds + // We only do canonical RSS2 profile feeds (specified by ID), e.g.: + // http://www.example.com/api/statuses/user_timeline/2.rss $path = common_path('api/statuses/user_timeline/'); - $valid = '%^' . $path . '(?<nickname>.*)\.rss$%'; + $valid = '%^' . $path . '(?<id>.*)\.rss$%'; if (preg_match($valid, $feed, $matches)) { - $user = User::staticGet('nickname', $matches['nickname']); + $user = User::staticGet('id', $matches['id']); if (!empty($user)) { return $user; } |