]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/shownotice.php
Ticket 2239: white space before apostrophe in metadata of status of notice
[quix0rs-gnu-social.git] / actions / shownotice.php
index 3bc52b2dbc7bae3fef45a4bf7cedc24df156bc38..a1933ff631d6e287110f0272d761749bb5eee0a7 100644 (file)
@@ -84,7 +84,13 @@ class ShownoticeAction extends OwnerDesignAction
         $this->notice = Notice::staticGet($id);
 
         if (empty($this->notice)) {
-            $this->clientError(_('No such notice.'), 404);
+            // Did we used to have it, and it got deleted?
+            $deleted = Deleted_notice::staticGet($id);
+            if (!empty($deleted)) {
+                $this->clientError(_('Notice deleted.'), 410);
+            } else {
+                $this->clientError(_('No such notice.'), 404);
+            }
             return false;
         }
 
@@ -97,7 +103,7 @@ class ShownoticeAction extends OwnerDesignAction
 
         $this->user = User::staticGet('id', $this->profile->id);
 
-        if (! $this->notice->is_local) {
+        if ($this->notice->is_local == Notice::REMOTE_OMB) {
             common_redirect($this->notice->uri);
             return false;
         }
@@ -166,9 +172,9 @@ class ShownoticeAction extends OwnerDesignAction
     function title()
     {
         if (!empty($this->profile->fullname)) {
-            $base = $this->profile->fullname . ' (' . $this->user->nickname . ') ';
+            $base = $this->profile->fullname . ' (' . $this->profile->nickname . ')';
         } else {
-            $base = $this->user->nickname;
+            $base = $this->profile->nickname;
         }
 
         return sprintf(_('%1$s\'s status on %2$s'),