mirror of
https://github.com/processwire/processwire.git
synced 2025-08-07 07:16:51 +02:00
Fix issue processwire/processwire-issues#1927
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user