X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=actions%2Fapitimelinegroup.php;h=da816c40a9063141a8b567270ab0872e1e82898b;hb=4b80ce0be89fe50eabec1a19dbf4a0c26a413423;hp=8f971392bf7650adbb9e1e2dec5eb331b21d0fe4;hpb=62d5f1addb1b710a387f7732ace1dd33bd1b86c1;p=quix0rs-gnu-social.git diff --git a/actions/apitimelinegroup.php b/actions/apitimelinegroup.php index 8f971392bf..da816c40a9 100644 --- a/actions/apitimelinegroup.php +++ b/actions/apitimelinegroup.php @@ -107,6 +107,8 @@ class ApiTimelineGroupAction extends ApiPrivateAuthAction // We'll pull common formatting out of this for other formats $atom = new AtomGroupNoticeFeed($this->group); + $self = $this->getSelfUri(); + switch($this->format) { case 'xml': $this->showXmlTimeline($this->notices); @@ -118,7 +120,8 @@ class ApiTimelineGroupAction extends ApiPrivateAuthAction $this->group->homeUrl(), $atom->subtitle, null, - $atom->logo + $atom->logo, + $self ); break; case 'atom': @@ -126,24 +129,12 @@ class ApiTimelineGroupAction extends ApiPrivateAuthAction header('Content-Type: application/atom+xml; charset=utf-8'); try { - $atom->addAuthorRaw($this->group->asAtomAuthor()); $atom->setActivitySubject($this->group->asActivitySubject()); - - $id = $this->arg('id'); - $aargs = array('format' => 'atom'); - if (!empty($id)) { - $aargs['id'] = $id; - } - $self = $this->getSelfUri('ApiTimelineGroup', $aargs); - $atom->setId($self); $atom->setSelfLink($self); - $atom->addEntryFromNotices($this->notices); - $this->raw($atom->getString()); - } catch (Atom10FeedException $e) { $this->serverError( 'Could not generate feed for group - ' . $e->getMessage()