X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Fpublic.php;h=6ecdf2e50ab337bdcabd7364dbca35a09a2558d4;hb=c00491cd7a29a9ef16d6e6bfa54505d4c9a522fe;hp=cf732fe464ef85766c2c83d248c08af671610d98;hpb=8c710ad2c1b80544acccb515f7b601aadff2de16;p=quix0rs-gnu-social.git diff --git a/actions/public.php b/actions/public.php index cf732fe464..6ecdf2e50a 100644 --- a/actions/public.php +++ b/actions/public.php @@ -102,7 +102,6 @@ class PublicAction extends Action if (!$this->notice) { // TRANS: Server error displayed when a public timeline cannot be retrieved. $this->serverError(_('Could not retrieve public timeline.')); - return; } if($this->page > 1 && $this->notice->N == 0){ @@ -159,6 +158,11 @@ class PublicAction extends Action $this->element('link', array('rel' => 'EditURI', 'type' => 'application/rsd+xml', 'href' => $rsd)); + + if ($this->page != 1) { + $this->element('link', array('rel' => 'canonical', + 'href' => common_local_url('public'))); + } } /** @@ -241,7 +245,7 @@ class PublicAction extends Action { // Show invite button, as long as site isn't closed, and // we have a logged in user. - if (!common_config('site', 'closed') && common_logged_in()) { + if (common_config('invite', 'enabled') && !common_config('site', 'closed') && common_logged_in()) { if (!common_config('site', 'private')) { $ibs = new InviteButtonSection( $this, @@ -255,7 +259,9 @@ class PublicAction extends Action $ibs->show(); } - $pop = new PopularNoticeSection($this); + $p = Profile::current(); + + $pop = new PopularNoticeSection($this, $p); $pop->show(); if (!common_config('performance', 'high')) { $cloud = new PublicTagCloudSection($this);