We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

Commit 3f1a9443 authored by Evan Prodromou's avatar Evan Prodromou

Merge branch 'master' of git@gitorious.org:statusnet/mainline

parents 61434eba d644f414
......@@ -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 .= '?';
......
......@@ -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();
......
......@@ -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;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment