forked from GNUsocial/gnu-social
Merge branch 'master' of git@gitorious.org:statusnet/mainline
This commit is contained in:
commit
3f1a9443d9
@ -192,7 +192,7 @@ class HubSub extends Memcached_DataObject
|
|||||||
|
|
||||||
// Any existing query string parameters must be preserved
|
// Any existing query string parameters must be preserved
|
||||||
$url = $this->callback;
|
$url = $this->callback;
|
||||||
if (strpos('?', $url) !== false) {
|
if (strpos($url, '?') !== false) {
|
||||||
$url .= '&';
|
$url .= '&';
|
||||||
} else {
|
} else {
|
||||||
$url .= '?';
|
$url .= '?';
|
||||||
|
@ -152,7 +152,7 @@ class RSSCloudNotifier
|
|||||||
function notify($profile)
|
function notify($profile)
|
||||||
{
|
{
|
||||||
$feed = common_path('api/statuses/user_timeline/') .
|
$feed = common_path('api/statuses/user_timeline/') .
|
||||||
$profile->nickname . '.rss';
|
$profile->id . '.rss';
|
||||||
|
|
||||||
$cloudSub = new RSSCloudSubscription();
|
$cloudSub = new RSSCloudSubscription();
|
||||||
|
|
||||||
|
@ -270,13 +270,14 @@ class RSSCloudRequestNotifyAction extends Action
|
|||||||
|
|
||||||
function userFromFeed($feed)
|
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/');
|
$path = common_path('api/statuses/user_timeline/');
|
||||||
$valid = '%^' . $path . '(?<nickname>.*)\.rss$%';
|
$valid = '%^' . $path . '(?<id>.*)\.rss$%';
|
||||||
|
|
||||||
if (preg_match($valid, $feed, $matches)) {
|
if (preg_match($valid, $feed, $matches)) {
|
||||||
$user = User::staticGet('nickname', $matches['nickname']);
|
$user = User::staticGet('id', $matches['id']);
|
||||||
if (!empty($user)) {
|
if (!empty($user)) {
|
||||||
return $user;
|
return $user;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user