diff --git a/bl-kernel/archives.class.php b/bl-kernel/archives.class.php index 98243561..7fe60172 100644 --- a/bl-kernel/archives.class.php +++ b/bl-kernel/archives.class.php @@ -18,7 +18,7 @@ class Archives extends dbList { $db = $pages->getDB($onlyKeys=false); $archiveIndex = array(); foreach ($db as $pageKey=>$pageFields) { - if (in_array($pageFields['type'], $GLOBALS['DB_TAGS_TYPES']) && $pageFields['state'] == "published") { + if ($pageFields['type'] == "article" && $pageFields['state'] == "published") { $date = $pageFields['date']; $year = mb_substr($date, 0, 4); $month = mb_substr($date, 0, 7); diff --git a/bl-kernel/authors.class.php b/bl-kernel/authors.class.php index 6f169927..7b4a5856 100644 --- a/bl-kernel/authors.class.php +++ b/bl-kernel/authors.class.php @@ -18,7 +18,7 @@ class Authors extends dbList { $db = $pages->getDB($onlyKeys=false); $authorsIndex = array(); foreach ($db as $pageKey=>$pageFields) { - if (in_array($pageFields['type'], $GLOBALS['DB_TAGS_TYPES']) && $pageFields['state'] == "published") { + if ($pageFields['type'] == "article" && $pageFields['state'] == "published") { $authorName = $pageFields['username']; if (isset($authorsIndex[$authorName])) { array_push($authorsIndex[$authorName]['list'], $pageKey); diff --git a/bl-kernel/boot/variables.php b/bl-kernel/boot/variables.php index fbc3c915..e17f7708 100644 --- a/bl-kernel/boot/variables.php +++ b/bl-kernel/boot/variables.php @@ -103,9 +103,6 @@ define('MEDIA_MANAGER_SORT_BY_DATE', true); // Constant arrays using define are not allowed in PHP 5.6 or earlier -// Type of pages included in the tag database -$GLOBALS['DB_TAGS_TYPES'] = array('article','static','sticky'); - // Allowed image extensions $GLOBALS['ALLOWED_IMG_EXTENSION'] = array('gif', 'png', 'jpg', 'jpeg', 'svg', 'webp'); diff --git a/bl-kernel/categories.class.php b/bl-kernel/categories.class.php index 10f040f1..05e2354a 100644 --- a/bl-kernel/categories.class.php +++ b/bl-kernel/categories.class.php @@ -27,11 +27,7 @@ class Categories extends dbList { if (!empty($pageFields['category'])) { $categoryKey = $pageFields['category']; if (isset($this->db[$categoryKey]['list'])) { - if ( - (($db[$pageKey]['type']=='article') || - ($db[$pageKey]['type']=='static')) && - ($db[$pageKey]['state']=='published') - ) { + if ($db[$pageKey]['state']=='published') { array_push($this->db[$categoryKey]['list'], $pageKey); } } diff --git a/bl-kernel/tags.class.php b/bl-kernel/tags.class.php index 204b009f..ae148066 100644 --- a/bl-kernel/tags.class.php +++ b/bl-kernel/tags.class.php @@ -18,7 +18,7 @@ class Tags extends dbList { $db = $pages->getDB($onlyKeys=false); $tagsIndex = array(); foreach ($db as $pageKey=>$pageFields) { - if (in_array($pageFields['type'], $GLOBALS['DB_TAGS_TYPES'])) { + if ($pageFields['state'] == "published") { $tags = $pageFields['tags']; foreach ($tags as $tagKey=>$tagName) { if (isset($tagsIndex[$tagKey])) {