Ver Fonte

include sticky and static pages to the categories

Diego Najar há 6 anos atrás
pai
commit
54868df652
1 ficheiros alterados com 9 adições e 3 exclusões
  1. 9 3
      bl-kernel/categories.class.php

+ 9 - 3
bl-kernel/categories.class.php

@@ -21,13 +21,19 @@ class Categories extends dbList {
 			$this->db[$key]['list'] = array();
 			$this->db[$key]['list'] = array();
 		}
 		}
 
 
-		// Get a database with published pages
-		$db = $pages->getPublishedDB(false);
+		// Get pages database
+		$db = $pages->getDB(false);
 		foreach ($db as $pageKey=>$pageFields) {
 		foreach ($db as $pageKey=>$pageFields) {
 			if (!empty($pageFields['category'])) {
 			if (!empty($pageFields['category'])) {
 				$categoryKey = $pageFields['category'];
 				$categoryKey = $pageFields['category'];
 				if (isset($this->db[$categoryKey]['list'])) {
 				if (isset($this->db[$categoryKey]['list'])) {
-					array_push($this->db[$categoryKey]['list'], $pageKey);
+					if (
+						($db[$pageKey]['type']=='published') ||
+						($db[$pageKey]['type']=='sticky') ||
+						($db[$pageKey]['type']=='static')
+					) {
+						array_push($this->db[$categoryKey]['list'], $pageKey);
+					}
 				}
 				}
 			}
 			}
 		}
 		}