diff options
author | Andreas Gohr <andi@splitbrain.org> | 2013-01-25 11:09:54 +0100 |
---|---|---|
committer | Andreas Gohr <andi@splitbrain.org> | 2013-01-25 11:09:54 +0100 |
commit | 33e75ca2f63b10ae1c7c7e9891ae857ce80d1811 (patch) | |
tree | 481e679c75e8eb5a58bd3f71a48f26ec87d86db4 /inc/pageutils.php | |
parent | 3295f40a380553bb3f7f3018cee2e4462e0be417 (diff) | |
parent | a24fc53e2623640cf5e2d00de741c1b67c9bb294 (diff) | |
download | rpg-33e75ca2f63b10ae1c7c7e9891ae857ce80d1811.tar.gz rpg-33e75ca2f63b10ae1c7c7e9891ae857ce80d1811.tar.bz2 |
Merge branch 'confmanager' into future
* confmanager:
added failing test for array type
started to add some unit tests to config manager
Revert "config manager: let PHP parse the config file"
added 'array' type for config manager
config manager: let PHP parse the config file
config manager: removed dead/commented code
added PCRE UTF-8 checks to do=check FS#2636
avoid multiple paralell update checks
fix regression bug in HTTPClient FS#2621
changed PAGEUTILS_ID_HIDEPAGE to has BEFORE/AFTER
added event PAGEUTILS_ID_HIDEPAGE
added test for isHiddenPage()
add index file similar to fileicons to show active smileys
fix E_STRICT errors FS#2427
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; } /** |