Commit 8c5a6fdd authored by Penny Leach's avatar Penny Leach
Browse files

Leap2A: intermin fix for #544160 - don't delete blogs if they have posts.


Signed-off-by: default avatarPenny Leach <penny@mjollnir.org>
parent 168ffe41
...@@ -267,7 +267,9 @@ class LeapImportBlog extends LeapImportArtefactPlugin { ...@@ -267,7 +267,9 @@ class LeapImportBlog extends LeapImportArtefactPlugin {
public static function cleanup(PluginImportLeap $importer) { public static function cleanup(PluginImportLeap $importer) {
if (self::$importedablog && self::$firstblogid) { if (self::$importedablog && self::$firstblogid) {
$blog = artefact_instance_from_id(self::$firstblogid); $blog = artefact_instance_from_id(self::$firstblogid);
$blog->delete(); if (!$blog->has_children()) { // TODO see #544160
$blog->delete();
}
} }
} }
......
Supports Markdown
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