summaryrefslogtreecommitdiff
path: root/inc/fulltext.php
diff options
context:
space:
mode:
authorAndreas Gohr <andi@splitbrain.org>2005-09-12 16:30:27 +0200
committerAndreas Gohr <andi@splitbrain.org>2005-09-12 16:30:27 +0200
commit63773904ba897df090aab60fbf1598ae47775fe8 (patch)
treec089a6c50b850d01e9a54c603133325cd10d8026 /inc/fulltext.php
parent54f4c05648c376908a736854a2ad279d57ec5b19 (diff)
downloadrpg-63773904ba897df090aab60fbf1598ae47775fe8.tar.gz
rpg-63773904ba897df090aab60fbf1598ae47775fe8.tar.bz2
added missing ACL checks for new index based searches
darcs-hash:20050912143027-7ad00-b2f3165d8db7122a453ecc63ad031af4467f691f.gz
Diffstat (limited to 'inc/fulltext.php')
-rw-r--r--inc/fulltext.php28
1 files changed, 28 insertions, 0 deletions
diff --git a/inc/fulltext.php b/inc/fulltext.php
index ff29f9deb..3940bc0c4 100644
--- a/inc/fulltext.php
+++ b/inc/fulltext.php
@@ -70,6 +70,15 @@ function ft_pageSearch($query,&$poswords){
if(!count($docs)) return array();
+ // check ACL permissions
+ foreach(array_keys($docs) as $doc){
+ if(auth_quickaclcheck($doc) < AUTH_READ){
+ unset($docs[$doc]);
+ }
+ }
+
+ if(!count($docs)) return array();
+
// if there are any hits left, sort them by count
arsort($docs);
@@ -114,6 +123,15 @@ function ft_backlinks($id){
}
}
+ if(!count($result)) return $result;
+
+ // check ACL permissions
+ foreach(array_keys($result) as $idx){
+ if(auth_quickaclcheck($result[$idx]) < AUTH_READ){
+ unset($result[$idx]);
+ }
+ }
+
sort($result);
return $result;
}
@@ -145,6 +163,16 @@ function ft_pageLookup($id,$pageonly=true){
continue;
}
}
+
+ if(!count($pages)) return array();
+
+ // check ACL permissions
+ foreach(array_keys($pages) as $idx){
+ if(auth_quickaclcheck($pages[$idx]) < AUTH_READ){
+ unset($pages[$idx]);
+ }
+ }
+
sort($pages);
return $pages;
}