diff options
Diffstat (limited to 'htdocs/src/Post.inc.php')
-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() { |