summaryrefslogtreecommitdiff
path: root/inc
diff options
context:
space:
mode:
authorMichael Hamann <michael@content-space.de>2013-07-31 17:57:58 +0200
committerChristopher Smith <chris@jalakai.co.uk>2013-08-01 11:11:52 +0200
commit3e7e02779454686e1c639eb366a195bd1ab50458 (patch)
tree3ca8956d5ed7fcdba642bce5091831e014c9c30e /inc
parente5d09fddcd17a2fe896650b64b81313a7d000975 (diff)
downloadrpg-3e7e02779454686e1c639eb366a195bd1ab50458.tar.gz
rpg-3e7e02779454686e1c639eb366a195bd1ab50458.tar.bz2
Remove search_references() and the refshow configuration option
The refshow configuration option wasn't used as described anymore already in the latest release and after the introduction of the media usage index the parameter is also no longer relevant for internal optimization. The only place where it was still used is the no longer used search_references()-function which is removed here, too.
Diffstat (limited to 'inc')
-rw-r--r--inc/search.php39
1 files changed, 0 insertions, 39 deletions
diff --git a/inc/search.php b/inc/search.php
index 6927fff5f..884aa7b23 100644
--- a/inc/search.php
+++ b/inc/search.php
@@ -273,45 +273,6 @@ function search_allpages(&$data,$base,$file,$type,$lvl,$opts){
return true;
}
-/**
- * Reference search
- * This fuction searches for existing references to a given media file
- * and returns an array with the found pages. It doesn't pay any
- * attention to ACL permissions to find every reference. The caller
- * must check if the user has the appropriate rights to see the found
- * page and eventually have to prevent the result from displaying.
- *
- * @param array $data Reference to the result data structure
- * @param string $base Base usually $conf['datadir']
- * @param string $file current file or directory relative to $base
- * @param char $type Type either 'd' for directory or 'f' for file
- * @param int $lvl Current recursion depht
- * @param mixed $opts option array as given to search()
- *
- * $opts['query'] is the demanded media file name
- *
- * @author Andreas Gohr <andi@splitbrain.org>
- * @author Matthias Grimm <matthiasgrimm@users.sourceforge.net>
- */
-function search_reference(&$data,$base,$file,$type,$lvl,$opts){
- global $conf;
-
- //we do nothing with directories
- if($type == 'd') return true;
-
- //only search txt files
- if(substr($file,-4) != '.txt') return true;
-
- //we finish after 'cnt' references found. The return value
- //'false' will skip subdirectories to speed search up.
- $cnt = $conf['refshow'] > 0 ? $conf['refshow'] : 1;
- if(count($data) >= $cnt) return false;
-
- $reg = '\{\{ *\:?'.$opts['query'].' *(\|.*)?\}\}';
- search_regex($data,$base,$file,$reg,array($opts['query']));
- return true;
-}
-
/* ------------- helper functions below -------------- */
/**