From 78315408a68b4a73e680da58458f704c120dd54a Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Fri, 5 Jun 2009 13:05:19 +0200 Subject: another attempt to fix recursion depth in media search Ignore-this: 7d58d0069959747b9e20eefaabb7e1d5 darcs-hash:20090605110519-7ad00-7f5c5e8e9fb342c4bad6bae87b5e4d6333b1dffb.gz --- inc/search.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'inc/search.php') diff --git a/inc/search.php b/inc/search.php index 070a3be00..bf6d59ac6 100644 --- a/inc/search.php +++ b/inc/search.php @@ -189,7 +189,7 @@ function search_media(&$data,$base,$file,$type,$lvl,$opts){ //we do nothing with directories if($type == 'd') { if(!$opts['depth']) return true; // recurse forever - $depth = substr_count(ltrim($file,'/'),'/'); + $depth = substr_count($file,'/'); if($depth >= $opts['depth']) return false; // depth reached return true; } -- cgit v1.2.3