Bug fix, when parent is edited the childs disappear

This commit is contained in:
Diego Najar 2018-01-21 00:19:17 +01:00
parent d1598c0f3f
commit 7a7687b69d
2 changed files with 3 additions and 5 deletions

View File

@ -257,6 +257,9 @@ class dbPages extends dbJSON
// This function reindex the orphan children with the new parent key // 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 // If a page has subpages and the page change his key is necesarry check the children key
public function reindexChildren($oldParentKey, $newParentKey) { public function reindexChildren($oldParentKey, $newParentKey) {
if ($oldParentKey==$newParentKey){
return false;
}
$tmp = $this->db; $tmp = $this->db;
foreach ($tmp as $key=>$fields) { foreach ($tmp as $key=>$fields) {
if (Text::startsWith($key, $oldParentKey.'/')) { if (Text::startsWith($key, $oldParentKey.'/')) {

View File

@ -297,11 +297,6 @@ function activatePlugin($pluginClassName) {
// Check if the plugin exists // Check if the plugin exists
if (isset($plugins['all'][$pluginClassName])) { if (isset($plugins['all'][$pluginClassName])) {
$plugin = $plugins['all'][$pluginClassName]; $plugin = $plugins['all'][$pluginClassName];
$blackList = array('pluginTimeMachine', 'pluginRemoteContent');
if (in_array($pluginClassName, $blackList) && !defined('BLUDIT_PRO')) {
return false;
}
if ($plugin->install()) { if ($plugin->install()) {
// Add to syslog // Add to syslog
$Syslog->add(array( $Syslog->add(array(