diff options
author | Jesse Morgan <jesse@jesterpm.net> | 2011-06-02 18:21:43 -0700 |
---|---|---|
committer | Jesse Morgan <jesse@jesterpm.net ; true> | 2011-06-02 18:21:43 -0700 |
commit | 18a8041cac4ef0e29b5afe0176c78cea5c9f20dd (patch) | |
tree | ab763bb7a02ba629664180c3f8412a7da297b537 /htdocs/src | |
parent | 4364c76c16103870fb4a4cf6be9261871195c06f (diff) |
Changed to soft deletion and added 404 pages.
Diffstat (limited to 'htdocs/src')
-rw-r--r-- | htdocs/src/Post.inc.php | 12 |
1 files changed, 3 insertions, 9 deletions
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() { |