]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
add canonical rel
authorEvan Prodromou <evan@status.net>
Thu, 26 Jan 2012 16:02:29 +0000 (11:02 -0500)
committerEvan Prodromou <evan@status.net>
Thu, 26 Jan 2012 16:02:29 +0000 (11:02 -0500)
actions/public.php
actions/showgroup.php
actions/showstream.php

index 7bcdd3fae208de3eb1c175cb743b07a9a3aa4057..8c724466368624ab98932f9e6179852b70fd4876 100644 (file)
@@ -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')));
+        }
     }
 
     /**
index eba3191f6f2d1df22dc6e5198b4337c8c601abfe..10601e58b4e95192ebe1356dc8912e2114d6d00b 100644 (file)
@@ -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()));
+        }
+    }
 }
index a3b1794313f4a08ab1856229d0d52dc782dcff67..9e89b1b48ceccd767df5f0d49664d4b70aac2462 100644 (file)
@@ -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()