From ac31c38eedbb2fbb03b3aeb97617e71c14b5eb49 Mon Sep 17 00:00:00 2001 From: Adrian Greeve Date: Tue, 28 Aug 2012 15:54:01 +0800 Subject: [PATCH] MDL-34318 - blog - Removal of blog associations from the database on delete. Thanks to Erik Lundberg for this patch. --- blog/locallib.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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());