]> 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>
Tue, 4 Aug 2009 10:05:04 +0000 (06:05 -0400)
actions/shownotice.php

index 8f73dc824af6d6180fab885c571b7c265d8ebf0e..3d7319489ef489bb14e7655107346dfcecf030e1 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;
         }