]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
use 410 Gone for deleted notices
authorEvan Prodromou <evan@controlyourself.ca>
Thu, 16 Jul 2009 04:56:32 +0000 (00:56 -0400)
committerEvan Prodromou <evan@controlyourself.ca>
Thu, 16 Jul 2009 04:56:32 +0000 (00:56 -0400)
actions/shownotice.php

index 1ec38a76bcf8cf7208dc94055f202f626a66bd18..fba1468aafd660b932e3685adf31bbb89a969b30 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;
         }