From 7a7687b69df009ed8cabba90784afbe1e0c5663a Mon Sep 17 00:00:00 2001 From: Diego Najar Date: Sun, 21 Jan 2018 00:19:17 +0100 Subject: [PATCH] Bug fix, when parent is edited the childs disappear --- bl-kernel/dbpages.class.php | 3 +++ bl-kernel/functions.php | 5 ----- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/bl-kernel/dbpages.class.php b/bl-kernel/dbpages.class.php index 969e084d..95091c26 100644 --- a/bl-kernel/dbpages.class.php +++ b/bl-kernel/dbpages.class.php @@ -257,6 +257,9 @@ class dbPages extends dbJSON // This function reindex the orphan children with the new parent key // If a page has subpages and the page change his key is necesarry check the children key public function reindexChildren($oldParentKey, $newParentKey) { + if ($oldParentKey==$newParentKey){ + return false; + } $tmp = $this->db; foreach ($tmp as $key=>$fields) { if (Text::startsWith($key, $oldParentKey.'/')) { diff --git a/bl-kernel/functions.php b/bl-kernel/functions.php index 7dd6e399..795f2c13 100644 --- a/bl-kernel/functions.php +++ b/bl-kernel/functions.php @@ -297,11 +297,6 @@ function activatePlugin($pluginClassName) { // Check if the plugin exists if (isset($plugins['all'][$pluginClassName])) { $plugin = $plugins['all'][$pluginClassName]; - $blackList = array('pluginTimeMachine', 'pluginRemoteContent'); - if (in_array($pluginClassName, $blackList) && !defined('BLUDIT_PRO')) { - return false; - } - if ($plugin->install()) { // Add to syslog $Syslog->add(array(