]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/shownotice.php
A different search pagination fix (see ticket #1333) that doesn't require fixing...
[quix0rs-gnu-social.git] / actions / shownotice.php
index 7033a1672b0daf09480861c828bddfbf9c6a88a3..ccae49bb3e4a59e13c526117962ec130cd7ced4b 100644 (file)
@@ -95,7 +95,7 @@ class ShownoticeAction extends Action
             return false;
         }
 
-        $this->avatar = $this->profile->getAvatar(AVATAR_STREAM_SIZE);
+        $this->avatar = $this->profile->getAvatar(AVATAR_PROFILE_SIZE);
 
         return true;
     }
@@ -177,7 +177,25 @@ class ShownoticeAction extends Action
     {
         parent::handle($args);
 
-        $this->showPage();
+        if ($this->notice->is_local == 0) {
+            if (!empty($this->notice->url)) {
+                common_redirect($this->notice->url, 301);
+            } else if (!empty($this->notice->uri) && preg_match('/^https?:/', $this->notice->uri)) {
+                common_redirect($this->notice->uri, 301);
+            }
+        } else {
+            $this->showPage();
+        }
+    }
+
+    /**
+     * Don't show local navigation
+     *
+     * @return void
+     */
+
+    function showLocalNavBlock()
+    {
     }
 
     /**
@@ -196,6 +214,25 @@ class ShownoticeAction extends Action
         $this->elementEnd('ul');
     }
 
+    /**
+     * Don't show page notice
+     *
+     * @return void
+     */
+
+    function showPageNoticeBlock()
+    {
+    }
+
+    /**
+     * Don't show aside
+     *
+     * @return void
+     */
+
+    function showAside() {
+    }
+
     /**
      * Extra <head> content
      *