Skip to content
Snippets Groups Projects
Commit 78315408 authored by Andreas Gohr's avatar Andreas Gohr
Browse files

another attempt to fix recursion depth in media search

Ignore-this: 7d58d0069959747b9e20eefaabb7e1d5

darcs-hash:20090605110519-7ad00-7f5c5e8e9fb342c4bad6bae87b5e4d6333b1dffb.gz
parent 3b787fa5
No related branches found
No related tags found
No related merge requests found
......@@ -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;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment