Removed deprecated activity:subject

This commit is contained in:
Mikael Nordfeldth 2013-10-08 15:06:19 +02:00
parent e1c9061735
commit fcf47f315b
6 changed files with 1 additions and 70 deletions

View File

@ -407,18 +407,6 @@ class Profile_list extends Managed_DataObject
return $xs->getString(); return $xs->getString();
} }
/**
* return an xml string to represent this people tag
* as the subject of an activitystreams feed.
*
* @return string activitystreams subject
*/
function asActivitySubject()
{
return $this->asActivityNoun('subject');
}
/** /**
* return an xml string to represent this people tag * return an xml string to represent this people tag
* as a noun in an activitystreams feed. * as a noun in an activitystreams feed.

View File

@ -526,19 +526,6 @@ class User_group extends Managed_DataObject
return $xs->getString(); return $xs->getString();
} }
/**
* Returns an XML string fragment with group information as an
* Activity Streams <activity:subject> element.
*
* Assumes that 'activity' namespace has been previously defined.
*
* @return string
*/
function asActivitySubject()
{
return $this->asActivityNoun('subject');
}
/** /**
* Returns an XML string fragment with group information as an * Returns an XML string fragment with group information as an
* Activity Streams noun object with the given element type. * Activity Streams noun object with the given element type.

View File

@ -146,20 +146,6 @@ class Atom10Feed extends XMLStringer
} }
} }
/**
* Deprecated <activity:subject>; ignored
*
* @param string $xmlSubject An XML string representation of the subject
*
* @return void
*/
function setActivitySubject($xmlSubject)
{
// TRANS: Server exception thrown when using the method setActivitySubject() in the class Atom10Feed.
throw new ServerException(_('Do not use this method!'));
}
function getNamespaces() function getNamespaces()
{ {
return $this->namespaces; return $this->namespaces;

View File

@ -85,23 +85,10 @@ class AtomGroupNoticeFeed extends AtomNoticeFeed
$this->setId($self); $this->setId($self);
$this->setSelfLink($self); $this->setSelfLink($self);
// For groups, we generate an author _AND_ an <activity:subject>
// Versions of StatusNet under 0.9.7 treat <author> as a person
// XXX: remove this workaround in future versions
$ao = ActivityObject::fromGroup($group); $ao = ActivityObject::fromGroup($group);
$this->addAuthorRaw($ao->asString('author')); $this->addAuthorRaw($ao->asString('author'));
$depMsg = 'Deprecation warning: activity:subject is present '
. 'only for backward compatibility. It will be '
. 'removed in the next version of StatusNet.';
$this->addAuthorRaw(
"<!--$depMsg-->\n"
. $ao->asString('activity:subject')
);
$this->addLink($group->homeUrl()); $this->addLink($group->homeUrl());
} }

View File

@ -88,11 +88,9 @@ class AtomListNoticeFeed extends AtomNoticeFeed
$this->setId($self); $this->setId($self);
$this->setSelfLink($self); $this->setSelfLink($self);
// FIXME: Stop using activity:subject?
$ao = ActivityObject::fromPeopletag($this->list); $ao = ActivityObject::fromPeopletag($this->list);
$this->addAuthorRaw($ao->asString('author'). $this->addAuthorRaw($ao->asString('author'));
$ao->asString('activity:subject'));
$this->addLink($this->list->getUri()); $this->addLink($this->list->getUri());
} }

View File

@ -66,22 +66,7 @@ class AtomUserNoticeFeed extends AtomNoticeFeed
array_push($ao->extra, $profile->profileInfo($cur)); array_push($ao->extra, $profile->profileInfo($cur));
// XXX: For users, we generate an author _AND_ an <activity:subject>
// This is for backward compatibility with clients (especially
// StatusNet's clients) that assume the Atom will conform to an
// older version of the Activity Streams API. Subject should be
// removed in future versions of StatusNet.
$this->addAuthorRaw($ao->asString('author')); $this->addAuthorRaw($ao->asString('author'));
$depMsg = 'Deprecation warning: activity:subject is present '
. 'only for backward compatibility. It will be '
. 'removed in the next version of StatusNet.';
$this->addAuthorRaw(
"<!--$depMsg-->\n"
. $ao->asString('activity:subject')
);
} }
// TRANS: Title in atom user notice feed. %s is a user name. // TRANS: Title in atom user notice feed. %s is a user name.