use 410 Gone for deleted notices

This commit is contained in:
Evan Prodromou 2009-07-16 00:56:32 -04:00
parent a074cccb0e
commit 3ebf817e36

View File

@ -84,7 +84,13 @@ class ShownoticeAction extends OwnerDesignAction
$this->notice = Notice::staticGet($id); $this->notice = Notice::staticGet($id);
if (empty($this->notice)) { if (empty($this->notice)) {
// 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); $this->clientError(_('No such notice.'), 404);
}
return false; return false;
} }