Merge branch 'wip-MDL-34318-master' of git://github.com/abgreeve/moodle
authorSam Hemelryk <sam@moodle.com>
Sun, 2 Sep 2012 22:12:50 +0000 (10:12 +1200)
committerSam Hemelryk <sam@moodle.com>
Sun, 2 Sep 2012 22:12:50 +0000 (10:12 +1200)
blog/locallib.php

index 43b36af..9a07fba 100644 (file)
@@ -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());