]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/shownotice.php
Merge branch '0.8.x' of git@gitorious.org:+laconica-developers/laconica/dev into...
[quix0rs-gnu-social.git] / actions / shownotice.php
index d5f35cd84bc9ddc08dee6c590a23e6a8f8855e68..b0d973a991cad8e61cfa2d8ce632013e89f3201b 100644 (file)
@@ -106,7 +106,7 @@ class ShownoticeAction extends Action
      * @return boolean true
      */
 
-    function isReadOnly()
+    function isReadOnly($args)
     {
         return true;
     }
@@ -122,7 +122,7 @@ class ShownoticeAction extends Action
 
     function lastModified()
     {
-        return max(strtotime($this->notice->created),
+        return max(strtotime($this->notice->modified),
                    strtotime($this->profile->modified),
                    ($this->avatar) ? strtotime($this->avatar->modified) : 0);
     }
@@ -177,10 +177,17 @@ 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
      *
@@ -191,7 +198,6 @@ class ShownoticeAction extends Action
     {
     }
 
-
     /**
      * Fill the content area of the page
      *
@@ -202,14 +208,12 @@ class ShownoticeAction extends Action
 
     function showContent()
     {
-        $this->elementStart('ul', array('class' => 'notices'));
+        $this->elementStart('ol', array('class' => 'notices xoxo'));
         $nli = new NoticeListItem($this->notice, $this);
         $nli->show();
-        $this->elementEnd('ul');
+        $this->elementEnd('ol');
     }
 
-
-
     /**
      * Don't show page notice
      *
@@ -220,7 +224,6 @@ class ShownoticeAction extends Action
     {
     }
 
-
     /**
      * Don't show aside
      *
@@ -230,7 +233,6 @@ class ShownoticeAction extends Action
     function showAside() {
     }
 
-
     /**
      * Extra <head> content
      *