summaryrefslogtreecommitdiff
path: root/inc/search.php
diff options
context:
space:
mode:
authorAndreas Gohr <gohr@cosmocode.de>2005-11-03 11:17:26 +0100
committerAndreas Gohr <gohr@cosmocode.de>2005-11-03 11:17:26 +0100
commit0dc92c6f78995331021c3b8c6a889913cf3f7de3 (patch)
treec40897221891e043dcb497183db31b0688aa5a34 /inc/search.php
parent6534245afc8e6007567455a841347fafb2413cc0 (diff)
downloadrpg-0dc92c6f78995331021c3b8c6a889913cf3f7de3.tar.gz
rpg-0dc92c6f78995331021c3b8c6a889913cf3f7de3.tar.bz2
hidepages configoption
This new option accepts a RegExp to filter certain pages from all automatic listings (RSS, recent changes, search results, index). This is useful to exclude certain pages like the ones used in the sitebar templates. The regexp is matched against the full page ID with a leading colon. If it matches the page is assumed to be a hidden one. IMPORTANT: this is not related to ACL. A hidden page is still visible to all users (if not restricted by ACL) when linked or called directly. darcs-hash:20051103101726-6e07b-8d45912a1b4f6cfc9e3fce147c15f84a58ea7ca2.gz
Diffstat (limited to 'inc/search.php')
-rw-r--r--inc/search.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/inc/search.php b/inc/search.php
index ffe85adc1..4000c445d 100644
--- a/inc/search.php
+++ b/inc/search.php
@@ -125,8 +125,14 @@ function search_index(&$data,$base,$file,$type,$lvl,$opts){
return false;
}
- //check ACL
$id = pathID($file);
+
+ //check hidden
+ if($type=='f' && isHiddenPage($id)){
+ return false;
+ }
+
+ //check ACL
if($type=='f' && auth_quickaclcheck($id) < AUTH_READ){
return false;
}