From 1a49ac659b9c1d26d56a46238892a601afbfebe0 Mon Sep 17 00:00:00 2001
From: Gina Haeussge <osd@foosel.net>
Date: Sat, 23 Aug 2008 12:01:26 +0200
Subject: [PATCH] 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
---
 inc/search.php | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

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);
-- 
GitLab