diff options
-rw-r--r-- | conf/dokuwiki.php | 4 | ||||
-rw-r--r-- | inc/search.php | 5 |
2 files changed, 5 insertions, 4 deletions
diff --git a/conf/dokuwiki.php b/conf/dokuwiki.php index 504c0ffdb..127b36d0a 100644 --- a/conf/dokuwiki.php +++ b/conf/dokuwiki.php @@ -33,8 +33,8 @@ $conf['maxseclevel'] = 3; //Up to which level create editable se $conf['camelcase'] = 0; //Use CamelCase for linking? (I don't like it) 0|1 $conf['deaccent'] = 1; //convert accented chars to unaccented ones in pagenames? $conf['useheading'] = 0; //use the first heading in a page as its name -$conf['refcheck'] = 5; //check for references before deleting media files -$conf['refshow'] = 0; //show where media files are still in use +$conf['refcheck'] = 1; //check for references before deleting media files +$conf['refshow'] = 0; //how many references should be shown, 5 is a good value /* Antispam Features */ 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'])); |