diff options
Diffstat (limited to 'inc')
-rw-r--r-- | inc/media.php | 2 | ||||
-rw-r--r-- | inc/search.php | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/inc/media.php b/inc/media.php index fb185435d..dcb8aa76d 100644 --- a/inc/media.php +++ b/inc/media.php @@ -469,7 +469,7 @@ function media_nstree($ns){ $ns = utf8_encodeFN(str_replace(':','/',$ns)); $data = array(); - search($data,$conf['mediadir'],'search_index',array('ns' => $ns)); + search($data,$conf['mediadir'],'search_index',array('ns' => $ns, 'nofiles' => true)); // wrap a list with the root level around the other namespaces $item = array( 'level' => 0, 'id' => '', diff --git a/inc/search.php b/inc/search.php index 3c473daee..d8fe75122 100644 --- a/inc/search.php +++ b/inc/search.php @@ -149,7 +149,7 @@ function search_index(&$data,$base,$file,$type,$lvl,$opts){ if($type == 'd' && !preg_match('#^'.$file.'(/|$)#','/'.$opts['ns'])){ //add but don't recurse $return = false; - }elseif($type == 'f' && !preg_match('#\.txt$#',$file)){ + }elseif($type == 'f' && ($opts['nofiles'] || !preg_match('#\.txt$#',$file))){ //don't add return false; } |