Merge commit 'mainline/0.9.x' into 0.9.x
This commit is contained in:
commit
4892073c84
@ -99,19 +99,17 @@ class AllAction extends ProfileAction
|
||||
sprintf(_('Feed for friends of %s (RSS 1.0)'), $this->user->nickname)),
|
||||
new Feed(Feed::RSS2,
|
||||
common_local_url(
|
||||
'api', array(
|
||||
'apiaction' => 'statuses',
|
||||
'method' => 'friends_timeline',
|
||||
'argument' => $this->user->nickname.'.rss'
|
||||
'ApiTimelineFriends', array(
|
||||
'format' => 'rss',
|
||||
'id' => $this->user->nickname
|
||||
)
|
||||
),
|
||||
sprintf(_('Feed for friends of %s (RSS 2.0)'), $this->user->nickname)),
|
||||
new Feed(Feed::ATOM,
|
||||
common_local_url(
|
||||
'api', array(
|
||||
'apiaction' => 'statuses',
|
||||
'method' => 'friends_timeline',
|
||||
'argument' => $this->user->nickname.'.atom'
|
||||
'ApiTimelineFriends', array(
|
||||
'format' => 'atom',
|
||||
'id' => $this->user->nickname
|
||||
)
|
||||
),
|
||||
sprintf(_('Feed for friends of %s (Atom)'), $this->user->nickname))
|
||||
|
@ -150,14 +150,12 @@ class PublicAction extends Action
|
||||
return array(new Feed(Feed::RSS1, common_local_url('publicrss'),
|
||||
_('Public Stream Feed (RSS 1.0)')),
|
||||
new Feed(Feed::RSS2,
|
||||
common_local_url('api',
|
||||
array('apiaction' => 'statuses',
|
||||
'method' => 'public_timeline.rss')),
|
||||
common_local_url('ApiTimelinePublic',
|
||||
array('format' => 'rss')),
|
||||
_('Public Stream Feed (RSS 2.0)')),
|
||||
new Feed(Feed::ATOM,
|
||||
common_local_url('api',
|
||||
array('apiaction' => 'statuses',
|
||||
'method' => 'public_timeline.atom')),
|
||||
common_local_url('ApiTimelinePublic',
|
||||
array('format' => 'atom')),
|
||||
_('Public Stream Feed (Atom)')));
|
||||
}
|
||||
|
||||
|
@ -138,11 +138,25 @@ class RepliesAction extends OwnerDesignAction
|
||||
|
||||
function getFeeds()
|
||||
{
|
||||
$rssurl = common_local_url('repliesrss',
|
||||
array('nickname' => $this->user->nickname));
|
||||
$rsstitle = sprintf(_('Feed for replies to %s'), $this->user->nickname);
|
||||
|
||||
return array(new Feed(Feed::RSS1, $rssurl, $rsstitle));
|
||||
return array(new Feed(Feed::RSS1,
|
||||
common_local_url('repliesrss',
|
||||
array('nickname' => $this->user->nickname)),
|
||||
sprintf(_('Replies feed for %s (RSS 1.0)'),
|
||||
$this->user->nickname)),
|
||||
new Feed(Feed::RSS2,
|
||||
common_local_url('ApiTimelineMentions',
|
||||
array(
|
||||
'id' => $this->user->nickname,
|
||||
'format' => 'rss')),
|
||||
sprintf(_('Replies feed for %s (RSS 2.0)'),
|
||||
$this->user->nickname)),
|
||||
new Feed(Feed::ATOM,
|
||||
common_local_url('ApiTimelineMentions',
|
||||
array(
|
||||
'id' => $this->user->nickname,
|
||||
'format' => 'atom')),
|
||||
sprintf(_('Replies feed for %s (Atom)'),
|
||||
$this->user->nickname)));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -164,13 +164,25 @@ class ShowfavoritesAction extends OwnerDesignAction
|
||||
|
||||
function getFeeds()
|
||||
{
|
||||
$feedurl = common_local_url('favoritesrss',
|
||||
array('nickname' =>
|
||||
$this->user->nickname));
|
||||
$feedtitle = sprintf(_('Feed for favorites of %s'),
|
||||
$this->user->nickname);
|
||||
|
||||
return array(new Feed(Feed::RSS1, $feedurl, $feedtitle));
|
||||
return array(new Feed(Feed::RSS1,
|
||||
common_local_url('favoritesrss',
|
||||
array('nickname' => $this->user->nickname)),
|
||||
sprintf(_('Feed for favorites of %s (RSS 1.0)'),
|
||||
$this->user->nickname)),
|
||||
new Feed(Feed::RSS2,
|
||||
common_local_url('ApiTimelineFavorites',
|
||||
array(
|
||||
'id' => $this->user->nickname,
|
||||
'format' => 'rss')),
|
||||
sprintf(_('Feed for favorites of %s (RSS 2.0)'),
|
||||
$this->user->nickname)),
|
||||
new Feed(Feed::ATOM,
|
||||
common_local_url('ApiTimelineFavorites',
|
||||
array(
|
||||
'id' => $this->user->nickname,
|
||||
'format' => 'atom')),
|
||||
sprintf(_('Feed for favorites of %s (Atom)'),
|
||||
$this->user->nickname)));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -328,17 +328,15 @@ class ShowgroupAction extends GroupDesignAction
|
||||
sprintf(_('Notice feed for %s group (RSS 1.0)'),
|
||||
$this->group->nickname)),
|
||||
new Feed(Feed::RSS2,
|
||||
common_local_url('api',
|
||||
array('apiaction' => 'groups',
|
||||
'method' => 'timeline',
|
||||
'argument' => $this->group->nickname.'.rss')),
|
||||
common_local_url('ApiTimelineGroup',
|
||||
array('format' => 'rss',
|
||||
'id' => $this->group->nickname)),
|
||||
sprintf(_('Notice feed for %s group (RSS 2.0)'),
|
||||
$this->group->nickname)),
|
||||
new Feed(Feed::ATOM,
|
||||
common_local_url('api',
|
||||
array('apiaction' => 'groups',
|
||||
'method' => 'timeline',
|
||||
'argument' => $this->group->nickname.'.atom')),
|
||||
common_local_url('ApiTimelineGroup',
|
||||
array('format' => 'atom',
|
||||
'id' => $this->group->nickname)),
|
||||
sprintf(_('Notice feed for %s group (Atom)'),
|
||||
$this->group->nickname)),
|
||||
new Feed(Feed::FOAF,
|
||||
|
@ -128,17 +128,17 @@ class ShowstreamAction extends ProfileAction
|
||||
sprintf(_('Notice feed for %s (RSS 1.0)'),
|
||||
$this->user->nickname)),
|
||||
new Feed(Feed::RSS2,
|
||||
common_local_url('api',
|
||||
array('apiaction' => 'statuses',
|
||||
'method' => 'user_timeline',
|
||||
'argument' => $this->user->nickname.'.rss')),
|
||||
common_local_url('ApiTimelineUser',
|
||||
array(
|
||||
'id' => $this->user->nickname,
|
||||
'format' => 'rss')),
|
||||
sprintf(_('Notice feed for %s (RSS 2.0)'),
|
||||
$this->user->nickname)),
|
||||
new Feed(Feed::ATOM,
|
||||
common_local_url('api',
|
||||
array('apiaction' => 'statuses',
|
||||
'method' => 'user_timeline',
|
||||
'argument' => $this->user->nickname.'.atom')),
|
||||
common_local_url('ApiTimelineUser',
|
||||
array(
|
||||
'id' => $this->user->nickname,
|
||||
'format' => 'atom')),
|
||||
sprintf(_('Notice feed for %s (Atom)'),
|
||||
$this->user->nickname)),
|
||||
new Feed(Feed::FOAF,
|
||||
|
@ -86,17 +86,15 @@ class TagAction extends Action
|
||||
sprintf(_('Notice feed for tag %s (RSS 1.0)'),
|
||||
$this->tag)),
|
||||
new Feed(Feed::RSS2,
|
||||
common_local_url('api',
|
||||
array('apiaction' => 'tags',
|
||||
'method' => 'timeline',
|
||||
'argument' => $this->tag.'.rss')),
|
||||
sprintf(_('Notice feed for %s group (RSS 2.0)'),
|
||||
common_local_url('ApiTimelineTag',
|
||||
array('format' => 'rss',
|
||||
'tag' => $this->tag)),
|
||||
sprintf(_('Notice feed for tag %s (RSS 2.0)'),
|
||||
$this->tag)),
|
||||
new Feed(Feed::ATOM,
|
||||
common_local_url('api',
|
||||
array('apiaction' => 'tags',
|
||||
'method' => 'timeline',
|
||||
'argument' => $this->tag.'.atom')),
|
||||
common_local_url('ApiTimelineTag',
|
||||
array('format' => 'atom',
|
||||
'tag' => $this->tag)),
|
||||
sprintf(_('Notice feed for tag %s (Atom)'),
|
||||
$this->tag)));
|
||||
}
|
||||
|
@ -1181,10 +1181,9 @@ class Notice extends Memcached_DataObject
|
||||
$xs->element('link', array('href' => $profile->profileurl));
|
||||
$user = User::staticGet('id', $profile->id);
|
||||
if (!empty($user)) {
|
||||
$atom_feed = common_local_url('api',
|
||||
array('apiaction' => 'statuses',
|
||||
'method' => 'user_timeline',
|
||||
'argument' => $profile->nickname.'.atom'));
|
||||
$atom_feed = common_local_url('ApiTimelineUser',
|
||||
array('format' => 'atom',
|
||||
'id' => $profile->nickname));
|
||||
$xs->element('link', array('rel' => 'self',
|
||||
'type' => 'application/atom+xml',
|
||||
'href' => $profile->profileurl));
|
||||
|
@ -20,7 +20,7 @@
|
||||
/**
|
||||
* The library version string
|
||||
*/
|
||||
define('Auth_OpenID_VERSION', '2.1.2');
|
||||
define('Auth_OpenID_VERSION', '2.1.3');
|
||||
|
||||
/**
|
||||
* Require the fetcher code.
|
||||
|
@ -376,7 +376,7 @@ function Auth_OpenID_detectMathLibrary($exts)
|
||||
// Try to load dynamic modules.
|
||||
if (!$loaded) {
|
||||
foreach ($extension['modules'] as $module) {
|
||||
if (function_exists('dl') && ini_get('enable_dl') && !ini_get('safe_mode') && @dl($module . "." . PHP_SHLIB_SUFFIX)) {
|
||||
if (@dl($module . "." . PHP_SHLIB_SUFFIX)) {
|
||||
$loaded = true;
|
||||
break;
|
||||
}
|
||||
|
@ -1295,7 +1295,8 @@ class Auth_OpenID_GenericConsumer {
|
||||
Auth_OpenID_OPENID2_NS => array_merge($basic_sig_fields,
|
||||
array('response_nonce',
|
||||
'claimed_id',
|
||||
'assoc_handle')),
|
||||
'assoc_handle',
|
||||
'op_endpoint')),
|
||||
Auth_OpenID_OPENID1_NS => array_merge($basic_sig_fields,
|
||||
array('nonce'))
|
||||
);
|
||||
|
@ -887,6 +887,11 @@ class Auth_OpenID_Message {
|
||||
|
||||
function getAliasedArg($aliased_key, $default = null)
|
||||
{
|
||||
if ($aliased_key == 'ns') {
|
||||
// Return the namespace URI for the OpenID namespace
|
||||
return $this->getOpenIDNamespace();
|
||||
}
|
||||
|
||||
$parts = explode('.', $aliased_key, 2);
|
||||
|
||||
if (count($parts) != 2) {
|
||||
|
@ -138,7 +138,7 @@ class Auth_Yadis_HTTPFetcher {
|
||||
* pass the URLHasAllowedScheme check or if the server's response
|
||||
* is malformed.
|
||||
*/
|
||||
function get($url, $headers)
|
||||
function get($url, $headers = null)
|
||||
{
|
||||
trigger_error("not implemented", E_USER_ERROR);
|
||||
}
|
||||
|
@ -127,8 +127,6 @@ class Auth_Yadis_ParanoidHTTPFetcher extends Auth_Yadis_HTTPFetcher {
|
||||
Auth_OpenID_USER_AGENT.' '.$curl_user_agent);
|
||||
curl_setopt($c, CURLOPT_TIMEOUT, $off);
|
||||
curl_setopt($c, CURLOPT_URL, $url);
|
||||
curl_setopt($c, CURLOPT_RANGE,
|
||||
"0-".(1024 * Auth_OpenID_FETCHER_MAX_RESPONSE_KB));
|
||||
|
||||
curl_exec($c);
|
||||
|
||||
|
@ -83,8 +83,6 @@ class Auth_Yadis_PlainHTTPFetcher extends Auth_Yadis_HTTPFetcher {
|
||||
"User-Agent: $user_agent",
|
||||
"Host: ".$parts['host'].
|
||||
($specify_port ? ":".$parts['port'] : ""),
|
||||
"Range: 0-".
|
||||
(1024*Auth_OpenID_FETCHER_MAX_RESPONSE_KB),
|
||||
"Port: ".$parts['port']);
|
||||
|
||||
$errno = 0;
|
||||
|
@ -91,7 +91,7 @@ class Auth_Yadis_XMLParser {
|
||||
* @return array $node_list An array of matching opaque node
|
||||
* objects to be used with other methods of this parser class.
|
||||
*/
|
||||
function evalXPath($xpath, $node = null)
|
||||
function &evalXPath($xpath, $node = null)
|
||||
{
|
||||
// Not implemented.
|
||||
}
|
||||
@ -349,7 +349,7 @@ function &Auth_Yadis_getXMLParser()
|
||||
foreach ($extensions as $name => $params) {
|
||||
if (!extension_loaded($name)) {
|
||||
foreach ($params['libname'] as $libname) {
|
||||
if (function_exists('dl') && ini_get('enable_dl') && !ini_get('safe_mode') && @dl($libname)) {
|
||||
if (@dl($libname)) {
|
||||
$classname = $params['classname'];
|
||||
}
|
||||
}
|
||||
|
@ -65,21 +65,21 @@ class PubSubHubBubPlugin extends Plugin
|
||||
$feeds = array();
|
||||
|
||||
//public timeline feeds
|
||||
$feeds[]=common_local_url('api',array('apiaction' => 'statuses','method' => 'public_timeline.rss'));
|
||||
$feeds[]=common_local_url('api',array('apiaction' => 'statuses','method' => 'public_timeline.atom'));
|
||||
$feeds[]=common_local_url('ApiTimelinePublic',array('format' => 'rss'));
|
||||
$feeds[]=common_local_url('ApiTimelinePublic',array('format' => 'atom'));
|
||||
|
||||
//author's own feeds
|
||||
$user = User::staticGet('id',$notice->profile_id);
|
||||
$feeds[]=common_local_url('api',array('apiaction' => 'statuses','method' => 'user_timeline','argument' => $user->nickname.'.rss'));
|
||||
$feeds[]=common_local_url('api',array('apiaction' => 'statuses','method' => 'user_timeline','argument' => $user->nickname.'.atom'));
|
||||
$feeds[]=common_local_url('ApiTimelineUser',array('id' => $user->nickname, 'format'=>'rss'));
|
||||
$feeds[]=common_local_url('ApiTimelineUser',array('id' => $user->nickname, 'format'=>'atom'));
|
||||
|
||||
//tag feeds
|
||||
$tag = new Notice_tag();
|
||||
$tag->notice_id = $notice->id;
|
||||
if ($tag->find()) {
|
||||
while ($tag->fetch()) {
|
||||
$feeds[]=common_local_url('api',array('apiaction' => 'tags','method' => 'timeline', 'argument'=>$tag->tag.'.atom'));
|
||||
$feeds[]=common_local_url('api',array('apiaction' => 'tags','method' => 'timeline', 'argument'=>$tag->tag.'.rss'));
|
||||
$feeds[]=common_local_url('ApiTimelineTag',array('tag'=>$tag->tag, 'format'=>'rss'));
|
||||
$feeds[]=common_local_url('ApiTimelineTag',array('tag'=>$tag->tag, 'format'=>'atom'));
|
||||
}
|
||||
}
|
||||
|
||||
@ -89,8 +89,8 @@ class PubSubHubBubPlugin extends Plugin
|
||||
if ($group_inbox->find()) {
|
||||
while ($group_inbox->fetch()) {
|
||||
$group = User_group::staticGet('id',$group_inbox->group_id);
|
||||
$feeds[]=common_local_url('api',array('apiaction' => 'groups','method' => 'timeline','argument' => $group->nickname.'.rss'));
|
||||
$feeds[]=common_local_url('api',array('apiaction' => 'groups','method' => 'timeline','argument' => $group->nickname.'.atom'));
|
||||
$feeds[]=common_local_url('ApiTimelineGroup',array('id' => $group->nickname,'format'=>'rss'));
|
||||
$feeds[]=common_local_url('ApiTimelineGroup',array('id' => $group->nickname,'format'=>'atom'));
|
||||
}
|
||||
}
|
||||
|
||||
@ -100,18 +100,17 @@ class PubSubHubBubPlugin extends Plugin
|
||||
if ($notice_inbox->find()) {
|
||||
while ($notice_inbox->fetch()) {
|
||||
$user = User::staticGet('id',$notice_inbox->user_id);
|
||||
$feeds[]=common_local_url('api',array('apiaction' => 'statuses','method' => 'user_timeline','argument' => $user->nickname.'.rss'));
|
||||
$feeds[]=common_local_url('api',array('apiaction' => 'statuses','method' => 'user_timeline','argument' => $user->nickname.'.atom'));
|
||||
$feeds[]=common_local_url('ApiTimelineUser',array('id' => $user->nickname, 'format'=>'rss'));
|
||||
$feeds[]=common_local_url('ApiTimelineUser',array('id' => $user->nickname, 'format'=>'atom'));
|
||||
}
|
||||
}
|
||||
|
||||
/* TODO: when the reply page gets RSS and ATOM feeds, implement this
|
||||
//feed of user replied to
|
||||
if($notice->reply_to){
|
||||
$user = User::staticGet('id',$notice->reply_to);
|
||||
$feeds[]=common_local_url('api',array('apiaction' => 'statuses','method' => 'user_timeline','argument' => $user->nickname.'.rss'));
|
||||
$feeds[]=common_local_url('api',array('apiaction' => 'statuses','method' => 'user_timeline','argument' => $user->nickname.'.atom'));
|
||||
}*/
|
||||
$feeds[]=common_local_url('ApiTimelineMentions',array('id' => $user->nickname,'format'=>'rss'));
|
||||
$feeds[]=common_local_url('ApiTimelineMentions',array('id' => $user->nickname,'format'=>'atom'));
|
||||
}
|
||||
|
||||
foreach(array_unique($feeds) as $feed){
|
||||
if(! $publisher->publish_update($feed)){
|
||||
|
Loading…
Reference in New Issue
Block a user