From: Evan Prodromou Date: Thu, 26 Jan 2012 16:02:29 +0000 (-0500) Subject: add canonical rel X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=23bafaba26fb30b1277863a1df00057bdef74ce2;p=quix0rs-gnu-social.git add canonical rel --- diff --git a/actions/public.php b/actions/public.php index 7bcdd3fae2..8c72446636 100644 --- a/actions/public.php +++ b/actions/public.php @@ -159,6 +159,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'))); + } } /** diff --git a/actions/showgroup.php b/actions/showgroup.php index eba3191f6f..10601e58b4 100644 --- a/actions/showgroup.php +++ b/actions/showgroup.php @@ -233,4 +233,12 @@ class ShowgroupAction extends GroupAction $this->raw(common_markup_to_html($m)); $this->elementEnd('div'); } + + function extraHead() + { + if ($this->page != 1) { + $this->element('link', array('rel' => 'canonical', + 'href' => $this->group->homeUrl())); + } + } } diff --git a/actions/showstream.php b/actions/showstream.php index a3b1794313..9e89b1b48c 100644 --- a/actions/showstream.php +++ b/actions/showstream.php @@ -212,6 +212,11 @@ class ShowstreamAction extends ProfileAction $this->element('link', array('rel' => 'EditURI', 'type' => 'application/rsd+xml', 'href' => $rsd)); + + if ($this->page != 1) { + $this->element('link', array('rel' => 'canonical', + 'href' => $this->profile->profileurl)); + } } function showEmptyListMessage()