]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/showgroup.php
Gah and a 302 in the non-exception-handling redirect too
[quix0rs-gnu-social.git] / actions / showgroup.php
index eba3191f6f2d1df22dc6e5198b4337c8c601abfe..46d0a227f536ecc4253212e6b55cb5fe2ba71d1b 100644 (file)
@@ -91,7 +91,7 @@ class ShowgroupAction extends GroupAction
      *
      * @return boolean success flag
      */
-    function prepare($args)
+    protected function prepare(array $args=array())
     {
         parent::prepare($args);
 
@@ -123,8 +123,9 @@ class ShowgroupAction extends GroupAction
      *
      * @return void
      */
-    function handle($args)
+    protected function handle()
     {
+        parent::handle();
         $this->showPage();
     }
 
@@ -148,7 +149,7 @@ class ShowgroupAction extends GroupAction
         $user = common_current_user();
 
         if (!empty($user) && $user->streamModeOnly()) {
-            $nl = new NoticeList($this->notice, $this);
+            $nl = new PrimaryNoticeList($this->notice, $this, array('show_n'=>NOTICES_PER_PAGE));
         } else {
             $nl = new ThreadedNoticeList($this->notice, $this, $this->userProfile);
         } 
@@ -233,4 +234,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()));
+        }
+    }
 }