MDL-34318 - blog - Removal of blog associations from the database on delete.

Thanks to Erik Lundberg for this patch.
This commit is contained in:
Adrian Greeve 2012-08-28 15:54:01 +08:00
parent d71c486507
commit ac31c38eed

View 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());