diff --git a/bl-kernel/abstract/dbjson.class.php b/bl-kernel/abstract/dbjson.class.php index 0e409558..f44f3658 100644 --- a/bl-kernel/abstract/dbjson.class.php +++ b/bl-kernel/abstract/dbjson.class.php @@ -30,11 +30,9 @@ class dbJSON { // Unserialize, JSON to Array $array = $this->unserialize($implode); - if (empty($array)) { $this->db = array(); $this->dbBackup = array(); - Log::set(__METHOD__.LOG_SEP.'Error trying to read the JSON file: '.$file, LOG_TYPE_ERROR); } else { $this->db = $array; $this->dbBackup = $array; @@ -100,7 +98,8 @@ class dbJSON { { // NULL is returned if the json cannot be decoded $decode = json_decode($data, true); - if (empty($decode)) { + if ($decode===NULL) { + Log::set(__METHOD__.LOG_SEP.'Error trying to read the JSON file: '.$this->file, LOG_TYPE_ERROR); return false; } return $decode; diff --git a/bl-kernel/abstract/dblist.class.php b/bl-kernel/abstract/dblist.class.php index 26f7293a..cd0ec5d5 100644 --- a/bl-kernel/abstract/dblist.class.php +++ b/bl-kernel/abstract/dblist.class.php @@ -126,7 +126,7 @@ class dbList extends dbJSON } // Sort the categories by "Natural order" - private function sortAlphanumeric() + public function sortAlphanumeric() { // Sort key alphanumeric strings, a01, a10, b10, c02 return ksort($this->db); diff --git a/bl-kernel/admin/themes/gris b/bl-kernel/admin/themes/gris index e0b14487..f616042c 160000 --- a/bl-kernel/admin/themes/gris +++ b/bl-kernel/admin/themes/gris @@ -1 +1 @@ -Subproject commit e0b144877b87f41d08a634f812726da5c887918c +Subproject commit f616042ccc0eaa37dab6a0c3ad67bb022574952b diff --git a/bl-kernel/boot/init.php b/bl-kernel/boot/init.php index 7cc1c91b..a687784b 100644 --- a/bl-kernel/boot/init.php +++ b/bl-kernel/boot/init.php @@ -9,7 +9,7 @@ define('BLUDIT_BUILD', '20190228'); // Debug mode // Change to FALSE, for prevent warning or errors on browser define('DEBUG_MODE', TRUE); -define('DEBUG_TYPE', 'INFO'); // INFO, TRACE +define('DEBUG_TYPE', 'TRACE'); // INFO, TRACE error_reporting(0); // Turn off all error reporting if (DEBUG_MODE) { // Turn on all error reporting diff --git a/bl-kernel/functions.php b/bl-kernel/functions.php index 43d7bf82..45405b71 100644 --- a/bl-kernel/functions.php +++ b/bl-kernel/functions.php @@ -118,7 +118,12 @@ function buildPagesFor($for, $categoryKey=false, $tagKey=false) { foreach ($list as $pageKey) { try { $page = new Page($pageKey); - array_push($content, $page); + if ( ($page->type()=='published') || + ($page->type()=='sticky') || + ($page->type()=='static') + ) { + array_push($content, $page); + } } catch (Exception $e) { // continue } diff --git a/bl-kernel/pages.class.php b/bl-kernel/pages.class.php index e0f5d03e..c80f657d 100644 --- a/bl-kernel/pages.class.php +++ b/bl-kernel/pages.class.php @@ -8,7 +8,7 @@ class Pages extends dbJSON { 'description'=>'', 'username'=>'', 'tags'=>array(), - 'type'=>'published', // published, draft, sticky, scheduled + 'type'=>'published', // published, static, draft, sticky, scheduled 'date'=>'', 'dateModified'=>'', 'position'=>0, diff --git a/bl-kernel/tags.class.php b/bl-kernel/tags.class.php index cb1f7587..6720f4e4 100644 --- a/bl-kernel/tags.class.php +++ b/bl-kernel/tags.class.php @@ -31,9 +31,8 @@ class Tags extends dbList { } } - // Sort database by alphabet - ksort($tagsIndex); $this->db = $tagsIndex; + $this->sortAlphanumeric(); return $this->save(); }