diff --git a/blog/locallib.php b/blog/locallib.php index 43b36af0418..9a07fbace76 100644 --- a/blog/locallib.php +++ b/blog/locallib.php @@ -292,11 +292,10 @@ class blog_entry implements renderable { * @return void */ public function delete() { - global $DB, $USER; - - $returnurl = ''; + global $DB; $this->delete_attachments(); + $this->remove_associations(); $DB->delete_records('post', array('id' => $this->id)); tag_set('post', $this->id, array());