From 18a8041cac4ef0e29b5afe0176c78cea5c9f20dd Mon Sep 17 00:00:00 2001 From: Jesse Morgan Date: Thu, 2 Jun 2011 18:21:43 -0700 Subject: Changed to soft deletion and added 404 pages. --- htdocs/src/Post.inc.php | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'htdocs/src/Post.inc.php') diff --git a/htdocs/src/Post.inc.php b/htdocs/src/Post.inc.php index 4f5e246..e36884b 100644 --- a/htdocs/src/Post.inc.php +++ b/htdocs/src/Post.inc.php @@ -110,15 +110,9 @@ class Post { } public function delete() { - $db = getDatabase(); - - // Delete Images - $db->delete('image', 'post_id=' . $this->getId()); - - // Delete Post - $db->delete('post', 'id=' . $this->getId()); - - $this->indatabase = false; + // Rather than deleting the post, archive it. + $this->info['stage'] = 'deleted'; + $this->save(); } public function getId() { -- cgit v1.2.3