summaryrefslogtreecommitdiff
path: root/inc/search.php
diff options
context:
space:
mode:
authorGina Haeussge <osd@foosel.net>2008-08-23 12:01:26 +0200
committerGina Haeussge <osd@foosel.net>2008-08-23 12:01:26 +0200
commit1a49ac659b9c1d26d56a46238892a601afbfebe0 (patch)
tree815e719f014ab26b7131779ecb45e7004ec7c274 /inc/search.php
parent9c71da5bcf1d0c4d8fbb96023f3be19ce8d7a256 (diff)
downloadrpg-1a49ac659b9c1d26d56a46238892a601afbfebe0.tar.gz
rpg-1a49ac659b9c1d26d56a46238892a601afbfebe0.tar.bz2
Added option to make media search recursive
By providing a key 'recursive' in the opts array of the media search, the search recurses into namespaces. darcs-hash:20080823100126-2b4f5-62a051fc901d61158347a2e87181e21fda87471d.gz
Diffstat (limited to 'inc/search.php')
-rw-r--r--inc/search.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/inc/search.php b/inc/search.php
index b4d5f1274..af4315cde 100644
--- a/inc/search.php
+++ b/inc/search.php
@@ -201,7 +201,9 @@ function search_namespaces(&$data,$base,$file,$type,$lvl,$opts){
*/
function search_media(&$data,$base,$file,$type,$lvl,$opts){
//we do nothing with directories
- if($type == 'd') return false;
+ if($type == 'd') {
+ return ($opts['recursive']);
+ }
$info = array();
$info['id'] = pathID($file,true);