diff --git a/bl-kernel/abstract/dblist.class.php b/bl-kernel/abstract/dblist.class.php index 76bba0bf..9268079c 100644 --- a/bl-kernel/abstract/dblist.class.php +++ b/bl-kernel/abstract/dblist.class.php @@ -44,7 +44,7 @@ class dbList extends dbJSON return $list; } - if (count($list) < $amountOfItems) { + if (count($list) < $amountOfItems) { return $list; } @@ -99,12 +99,12 @@ class dbList extends dbJSON public function edit($args) { - if (isset($this->db[$args['newKey']])) { - Log::set(__METHOD__.LOG_SEP.'The new key already exists. Key: '.$args['newKey']); - //this not allow to edit existing category - //return false; + if ( isset($this->db[$args['newKey']]) && ($args['newKey']!==$args['oldKey']) ) { + Log::set(__METHOD__.LOG_SEP.'The new key already exists. Key: '.$args['newKey'], LOG_TYPE_WARN); + return false; } + $this->db[$args['newKey']]['name'] = $args['name']; $this->db[$args['newKey']]['template'] = isset($args['template'])?$args['template']:''; $this->db[$args['newKey']]['list'] = $this->db[$args['oldKey']]['list']; diff --git a/bl-kernel/admin/themes/booty/login.php b/bl-kernel/admin/themes/booty/login.php index 1b214766..16525e28 100644 --- a/bl-kernel/admin/themes/booty/login.php +++ b/bl-kernel/admin/themes/booty/login.php @@ -12,10 +12,9 @@ diff --git a/bl-kernel/admin/views/edit-content.php b/bl-kernel/admin/views/edit-content.php index f81f640c..c67861d4 100644 --- a/bl-kernel/admin/views/edit-content.php +++ b/bl-kernel/admin/views/edit-content.php @@ -74,7 +74,7 @@
-
+ @@ -175,9 +175,10 @@ )); ?> +
'; + } + ?>
@@ -281,9 +287,11 @@ }); }); - + + + - - diff --git a/bl-kernel/admin/views/new-content.php b/bl-kernel/admin/views/new-content.php index 3477e1fc..dc2c7b9c 100644 --- a/bl-kernel/admin/views/new-content.php +++ b/bl-kernel/admin/views/new-content.php @@ -68,13 +68,7 @@
-
- -
- - - g('Cancel') ?> -
+ @@ -196,9 +190,21 @@ 'label'=>'Template', 'placeholder'=>'' )); - ?> + ?> + +
+ + + + g('Cancel') ?> + +