From 83915f080c019c059f48dbc588011d174c389aba Mon Sep 17 00:00:00 2001 From: slawkens Date: Sun, 28 May 2023 23:56:26 +0200 Subject: [PATCH] Fixed when page is hidden --- system/router.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/system/router.php b/system/router.php index 879ad727..1a2cab23 100644 --- a/system/router.php +++ b/system/router.php @@ -285,9 +285,10 @@ if(config('backward_support')) { unset($page); -function getDatabasePages() { - global $db; - $pages = $db->query('SELECT `name` FROM ' . TABLE_PREFIX . 'pages'); +function getDatabasePages($withHidden = false): array +{ + global $db, $logged_access; + $pages = $db->query('SELECT `name` FROM ' . TABLE_PREFIX . 'pages WHERE ' . ($withHidden ? '' : '`hidden` != 1 AND ') . '`access` <= ' . $db->quote($logged_access)); $ret = []; if ($pages->rowCount() < 1) {