diff options
Diffstat (limited to 'inc/pageutils.php')
-rw-r--r-- | inc/pageutils.php | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/inc/pageutils.php b/inc/pageutils.php index 55cc081a1..3bb10883f 100644 --- a/inc/pageutils.php +++ b/inc/pageutils.php @@ -536,15 +536,25 @@ function getCacheName($data,$ext=''){ * @author Andreas Gohr <gohr@cosmocode.de> */ function isHiddenPage($id){ + $data = array( + 'id' => $id, + 'hidden' => false + ); + trigger_event('PAGEUTILS_ID_HIDEPAGE', $data, '_isHiddenPage'); + return $data['hidden']; +} + +function _isHiddenPage(&$data) { global $conf; global $ACT; - if(empty($conf['hidepages'])) return false; - if($ACT == 'admin') return false; - if(preg_match('/'.$conf['hidepages'].'/ui',':'.$id)){ - return true; + if ($data['hidden']) return; + if(empty($conf['hidepages'])) return; + if($ACT == 'admin') return; + + if(preg_match('/'.$conf['hidepages'].'/ui',':'.$data['id'])){ + $data['hidden'] = true; } - return false; } /** |