Other fixes
This commit is contained in:
parent
65b95fb93f
commit
b290209a41
@ -44,6 +44,10 @@ class dbList extends dbJSON
|
||||
return $list;
|
||||
}
|
||||
|
||||
if (count($list) < $amountOfItems) {
|
||||
return $list;
|
||||
}
|
||||
|
||||
// The first page number is 1, so the real is 0
|
||||
$realPageNumber = $pageNumber - 1;
|
||||
$chunks = array_chunk($list, $realPageNumber);
|
||||
@ -94,9 +98,11 @@ class dbList extends dbJSON
|
||||
// $args => 'name', 'oldkey', 'newKey', 'template'
|
||||
public function edit($args)
|
||||
{
|
||||
if (isset($this->db[$args['newKey']])) {
|
||||
|
||||
if (isset($this->db[$args['newKey']])) {
|
||||
Log::set(__METHOD__.LOG_SEP.'The new key already exists. Key: '.$args['newKey']);
|
||||
return false;
|
||||
//this not allow to edit existing category
|
||||
//return false;
|
||||
}
|
||||
|
||||
$this->db[$args['newKey']]['name'] = $args['name'];
|
||||
|
@ -10,7 +10,10 @@ class Category {
|
||||
|
||||
if (isset($dbCategories->db[$key])) {
|
||||
$this->vars['name'] = $dbCategories->db[$key]['name'];
|
||||
$this->vars['template'] = $dbCategories->db[$key]['template'];
|
||||
//here i recieve error from old category structure where template is not exist.
|
||||
if(isset($dbCategories->db[$key]['template'])){
|
||||
$this->vars['template'] = $dbCategories->db[$key]['template'];
|
||||
}
|
||||
$this->vars['key'] = $key;
|
||||
$this->vars['permalink'] = DOMAIN_CATEGORIES . $key;
|
||||
$this->vars['list'] = $dbCategories->db[$key]['list'];
|
||||
|
Loading…
x
Reference in New Issue
Block a user