Stop using <activity:subject> for atom feeds

This commit is contained in:
Evan Prodromou
2010-12-27 10:03:34 -08:00
parent f5128015be
commit ab92496ddc
5 changed files with 8 additions and 12 deletions

View File

@@ -146,15 +146,16 @@ class Atom10Feed extends XMLStringer
}
/**
* Add a activity feed subject via raw XML string
* Deprecated <activity:subject>; ignored
*
* @param string $xmlSubject An XML string representation of the subject
*
* @return void
*/
function setActivitySubject($xmlSubject)
{
$this->subject = $xmlSubject;
throw new ServerException(_('Don\'t use this method!'));
}
function getNamespaces()

View File

@@ -85,8 +85,9 @@ class AtomGroupNoticeFeed extends AtomNoticeFeed
$this->setId($self);
$this->setSelfLink($self);
$this->addAuthorRaw($group->asAtomAuthor());
$this->setActivitySubject($group->asActivitySubject());
$ao = ActivityObject::fromGroup($group);
$this->addAuthorRaw($ao->asString('author'));
$this->addLink($group->homeUrl());
}

View File

@@ -60,8 +60,8 @@ class AtomUserNoticeFeed extends AtomNoticeFeed
$this->user = $user;
if (!empty($user)) {
$profile = $user->getProfile();
$this->addAuthor($profile->nickname, $user->uri);
$this->setActivitySubject($profile->asActivityNoun('subject'));
$ao = ActivityObject::fromProfile($profile);
$this->addAuthorRaw($ao->asString('author'));
}
// TRANS: Title in atom user notice feed. %s is a user name.