diff options
author | matthiasgrimm <matthiasgrimm@users.sourceforge.net> | 2005-06-26 17:32:07 +0200 |
---|---|---|
committer | matthiasgrimm <matthiasgrimm@users.sourceforge.net> | 2005-06-26 17:32:07 +0200 |
commit | e28299cce10577f1cc60f8111785b3f118f099ec (patch) | |
tree | 0d236861cf262ea8da465b88e6dd336b91cb531b /inc/search.php | |
parent | 90eb8392cdad2d4e8e8b8b6731f5400c37849ed3 (diff) | |
download | rpg-e28299cce10577f1cc60f8111785b3f118f099ec.tar.gz rpg-e28299cce10577f1cc60f8111785b3f118f099ec.tar.bz2 |
redefine reference check options
This patch correct the meaning of the reference check configuration
options. They become more logical.
refcheck boolean Enable/Disable the reference checker. If set
to '0' the existence of references is not
checked and vica versa.
recshow int defines how many references should be displayed
If set to '0' no references are shown at all.
This meaning is more logical. The first parameter switches the checker
on/off and the second would be set, if the user wanted to see where the
references are and how many should be displayed.
darcs-hash:20050626153207-7ef76-0800eb2e394bf1b9f4233e7698b4d894f4b58e5b.gz
Diffstat (limited to 'inc/search.php')
-rw-r--r-- | inc/search.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/inc/search.php b/inc/search.php index 8216d98e5..d949dc6de 100644 --- a/inc/search.php +++ b/inc/search.php @@ -356,9 +356,10 @@ function search_reference(&$data,$base,$file,$type,$lvl,$opts){ //only search txt files if(!preg_match('#\.txt$#',$file)) return true; - //we finish after 'n' references found. The return value + //we finish after 'cnt' references found. The return value //'false' will skip subdirectories to speed search up. - if(count($data) >= $conf['refcheck']) return false; + $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'])); |