diff --git a/wire/modules/Process/ProcessPageList/ProcessPageList.module b/wire/modules/Process/ProcessPageList/ProcessPageList.module index 74d74af1..7a9d0d58 100644 --- a/wire/modules/Process/ProcessPageList/ProcessPageList.module +++ b/wire/modules/Process/ProcessPageList/ProcessPageList.module @@ -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