forked from GNUsocial/gnu-social
Merge branch 'testing' of gitorious.org:statusnet/mainline into testing
* 'testing' of gitorious.org:statusnet/mainline: don't duplicate title in summary in Atom output per RFC4287 4.2.13 Show <activity:subject> and no activity actors for user feed Revert "show service debug info"
This commit is contained in:
commit
f68e3dfba5
@ -1090,7 +1090,7 @@ class Notice extends Memcached_DataObject
|
||||
return $groups;
|
||||
}
|
||||
|
||||
function asAtomEntry($namespace=false, $source=false)
|
||||
function asAtomEntry($namespace=false, $source=false, $author=true)
|
||||
{
|
||||
$profile = $this->getProfile();
|
||||
|
||||
@ -1134,10 +1134,11 @@ class Notice extends Memcached_DataObject
|
||||
}
|
||||
|
||||
$xs->element('title', null, $this->content);
|
||||
$xs->element('summary', null, $this->content);
|
||||
|
||||
if ($author) {
|
||||
$xs->raw($profile->asAtomAuthor());
|
||||
$xs->raw($profile->asActivityActor());
|
||||
}
|
||||
|
||||
$xs->element('link', array('rel' => 'alternate',
|
||||
'type' => 'text/html',
|
||||
|
@ -107,9 +107,19 @@ class AtomNoticeFeed extends Atom10Feed
|
||||
*/
|
||||
function addEntryFromNotice($notice)
|
||||
{
|
||||
$this->addEntryRaw($notice->asAtomEntry());
|
||||
$source = $this->showSource();
|
||||
$author = $this->showAuthor();
|
||||
|
||||
$this->addEntryRaw($notice->asAtomEntry(false, $source, $author));
|
||||
}
|
||||
|
||||
function showSource()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
function showAuthor()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -61,6 +61,7 @@ class AtomUserNoticeFeed extends AtomNoticeFeed
|
||||
if (!empty($user)) {
|
||||
$profile = $user->getProfile();
|
||||
$this->addAuthor($profile->nickname, $user->uri);
|
||||
$this->setActivitySubject($profile->asActivityNoun('subject'));
|
||||
}
|
||||
}
|
||||
|
||||
@ -68,4 +69,14 @@ class AtomUserNoticeFeed extends AtomNoticeFeed
|
||||
{
|
||||
return $this->user;
|
||||
}
|
||||
|
||||
function showSource()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
function showAuthor()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -144,9 +144,6 @@ function omb_broadcast_profile($profile)
|
||||
$service = new StatusNet_OMB_Service_Consumer(
|
||||
array(OMB_ENDPOINT_UPDATEPROFILE => $rp->updateprofileurl),
|
||||
$rp->uri);
|
||||
|
||||
common_debug('service = ' . print_r($service, true));
|
||||
|
||||
try {
|
||||
$service->setToken($rp->token, $rp->secret);
|
||||
$service->updateProfile($omb_profile);
|
||||
|
Loading…
Reference in New Issue
Block a user