Commit 48800d46 authored by Richard Mansfield's avatar Richard Mansfield
Browse files

When deleting blog posts, don't detach files when the delete fails


Signed-off-by: default avatarRichard Mansfield <richardm@catalyst.net.nz>
parent 1bb8ce84
......@@ -491,10 +491,12 @@ class ArtefactTypeBlogPost extends ArtefactType {
return;
}
db_begin();
$this->detach(); // Detach all file attachments
delete_records('artefact_blog_blogpost', 'blogpost', $this->id);
parent::delete();
db_commit();
}
/**
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment