From fcf47f315bd7df92c0befb7a0caa26e107ceac29 Mon Sep 17 00:00:00 2001 From: Mikael Nordfeldth Date: Tue, 8 Oct 2013 15:06:19 +0200 Subject: [PATCH] Removed deprecated activity:subject --- classes/Profile_list.php | 12 ------------ classes/User_group.php | 13 ------------- lib/atom10feed.php | 14 -------------- lib/atomgroupnoticefeed.php | 13 ------------- lib/atomlistnoticefeed.php | 4 +--- lib/atomusernoticefeed.php | 15 --------------- 6 files changed, 1 insertion(+), 70 deletions(-) diff --git a/classes/Profile_list.php b/classes/Profile_list.php index b922c92a14..8cf5d210f8 100644 --- a/classes/Profile_list.php +++ b/classes/Profile_list.php @@ -407,18 +407,6 @@ class Profile_list extends Managed_DataObject 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 * as a noun in an activitystreams feed. diff --git a/classes/User_group.php b/classes/User_group.php index 47ca3538e5..3842826865 100644 --- a/classes/User_group.php +++ b/classes/User_group.php @@ -526,19 +526,6 @@ class User_group extends Managed_DataObject return $xs->getString(); } - /** - * Returns an XML string fragment with group information as an - * Activity Streams 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 * Activity Streams noun object with the given element type. diff --git a/lib/atom10feed.php b/lib/atom10feed.php index 2d617326c5..0d2e0796da 100644 --- a/lib/atom10feed.php +++ b/lib/atom10feed.php @@ -146,20 +146,6 @@ class Atom10Feed extends XMLStringer } } - /** - * Deprecated ; 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() { return $this->namespaces; diff --git a/lib/atomgroupnoticefeed.php b/lib/atomgroupnoticefeed.php index 817191b64a..5b6fcf4295 100644 --- a/lib/atomgroupnoticefeed.php +++ b/lib/atomgroupnoticefeed.php @@ -85,23 +85,10 @@ class AtomGroupNoticeFeed extends AtomNoticeFeed $this->setId($self); $this->setSelfLink($self); - // For groups, we generate an author _AND_ an - // Versions of StatusNet under 0.9.7 treat as a person - // XXX: remove this workaround in future versions - $ao = ActivityObject::fromGroup($group); $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( - "\n" - . $ao->asString('activity:subject') - ); - $this->addLink($group->homeUrl()); } diff --git a/lib/atomlistnoticefeed.php b/lib/atomlistnoticefeed.php index 601e83294f..f4765d4409 100644 --- a/lib/atomlistnoticefeed.php +++ b/lib/atomlistnoticefeed.php @@ -88,11 +88,9 @@ class AtomListNoticeFeed extends AtomNoticeFeed $this->setId($self); $this->setSelfLink($self); - // FIXME: Stop using activity:subject? $ao = ActivityObject::fromPeopletag($this->list); - $this->addAuthorRaw($ao->asString('author'). - $ao->asString('activity:subject')); + $this->addAuthorRaw($ao->asString('author')); $this->addLink($this->list->getUri()); } diff --git a/lib/atomusernoticefeed.php b/lib/atomusernoticefeed.php index 5180725722..b899ecff4a 100644 --- a/lib/atomusernoticefeed.php +++ b/lib/atomusernoticefeed.php @@ -66,22 +66,7 @@ class AtomUserNoticeFeed extends AtomNoticeFeed array_push($ao->extra, $profile->profileInfo($cur)); - // XXX: For users, we generate an author _AND_ an - // 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')); - - $depMsg = 'Deprecation warning: activity:subject is present ' - . 'only for backward compatibility. It will be ' - . 'removed in the next version of StatusNet.'; - - $this->addAuthorRaw( - "\n" - . $ao->asString('activity:subject') - ); } // TRANS: Title in atom user notice feed. %s is a user name.