summaryrefslogtreecommitdiff
path: root/inc/pageutils.php
diff options
context:
space:
mode:
Diffstat (limited to 'inc/pageutils.php')
-rw-r--r--inc/pageutils.php23
1 files changed, 17 insertions, 6 deletions
diff --git a/inc/pageutils.php b/inc/pageutils.php
index d6abff894..3bb10883f 100644
--- a/inc/pageutils.php
+++ b/inc/pageutils.php
@@ -199,7 +199,8 @@ function noNSorNS($id) {
* Creates a XHTML valid linkid from a given headline title
*
* @param string $title The headline title
- * @param array $check Existing IDs (title => number)
+ * @param array|bool $check Existing IDs (title => number)
+ * @return string the title
* @author Andreas Gohr <andi@splitbrain.org>
*/
function sectionID($title,&$check) {
@@ -535,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;
}
/**