diff --git a/blog/locallib.php b/blog/locallib.php index 43b36af04180a..9a07fbace767a 100644 --- a/blog/locallib.php +++ b/blog/locallib.php @@ -292,11 +292,10 @@ public function edit($params=array(), $form=null, $summaryoptions=array(), $atta * @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());