1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-07 07:16:51 +02:00
This commit is contained in:
Ryan Cramer
2024-12-23 11:35:34 -05:00
parent 94bc7c346e
commit 1f7d039b3e

View File

@@ -562,11 +562,14 @@ class ProcessPageList extends Process implements ConfigurableModule {
if(is_array($this->hidePages)) {
$nots = is_array($this->hidePagesNot) ? $this->hidePagesNot : array();
$c = array();
if(in_array('advanced', $nots) && $config->advanced) $c[] = 'advanced';
if(in_array('debug', $nots) && $config->debug) $c[] = 'debug';
if(in_array('superuser', $nots) && $this->wire()->user->isSuperuser()) $c[] = 'superuser';
if(count($nots)) {
if(in_array('advanced', $nots) && $config->advanced) $c[] = 'advanced';
if(in_array('debug', $nots) && $config->debug) $c[] = 'debug';
if(in_array('superuser', $nots) && $this->wire()->user->isSuperuser()) $c[] = 'superuser';
}
sort($nots);
if($c != $nots) $a = array_merge($a, $this->hidePages);
if(empty($nots) || $c != $nots) $a = array_merge($a, $this->hidePages);
$a = array_unique($a);
}
foreach($a as $id) $b[$id] = $id; // index by ID