Index: sandbox/filemanager/inc/class.uiconfig.inc.php
===================================================================
--- sandbox/filemanager/inc/class.uiconfig.inc.php	(revision 1888)
+++ sandbox/filemanager/inc/class.uiconfig.inc.php	(revision 1905)
@@ -12,4 +12,5 @@
 		var $public_functions = array(
 			'search_dir' => True,
+			'search_user' => True,
 			'update_quota' => True,
 			'load_quota' => True,
@@ -17,5 +18,8 @@
 			'removeFolder' => True,
 			'reconstructFolder' => True,
+			'set_owner' => True,
 			'renameFolder' => True,
+			'createFolder' => True,
+			'groups_users' => True,
 			'folders' => True
 		 );
@@ -46,4 +50,5 @@
 			$vars[lang_remove]=lang('remove');
 			$vars[lang_rename]=lang('rename');
+			$vars[lang_create]=lang('create');
 			$vars[lang_reconstruct]=lang('reconstruct');
 
@@ -54,4 +59,74 @@
 
 		 }
+		 function groups_users(){
+			 $GLOBALS['phpgw_info']['flags'] = array
+				 (
+					 'currentapp'    => 'filemanager',
+					 'noheader'      => False,
+					 'nonavbar' => False,
+					 'nofooter'      => False,
+					 'noappheader'   => False,
+					 'enable_browser_class'  => True
+				 );
+
+			 $GLOBALS['phpgw']->common->phpgw_header();
+			include('load_lang.php');
+			echo "<script src='".$GLOBALS['phpgw_info']['flags']['currentapp']."/js/connector.js'></script>";
+			echo "<script src='".$GLOBALS['phpgw_info']['flags']['currentapp']."/js/common_functions.js'></script>";
+			echo "<script src='".$GLOBALS['phpgw_info']['flags']['currentapp']."/js/config.js'></script>";
+			$t = $GLOBALS['phpgw']->template;
+			$t->set_file(array('config_list' => 'config_owner.tpl'));
+			$t->set_block('config_list','body','body');
+			$vars[lang_users_and_groups]=lang('Users and groups');
+			$vars[lang_search]=lang('search');
+			$vars[lang_directory]=lang('directory');
+			$vars[lang_config]=lang('config');
+
+			$t->set_var($vars);
+			$t->pparse('out','body');
+                        $GLOBALS['phpgw']->common->phpgw_footer();
+                        $GLOBALS['phpgw']->common->phpgw_exit();
+
+		 }
+
+		function createFolder(){
+			 $GLOBALS['phpgw_info']['flags'] = array
+				 (
+					 'currentapp'    => 'filemanager',
+					 'noheader'      => True,
+					 'nonavbar' => True,
+					 'nofooter'      => True,
+					 'noappheader'   => True,
+					 'enable_browser_class'  => True
+				 );
+			 $bo = CreateObject('filemanager.bofilemanager');
+			 $name = $GLOBALS['phpgw']->db->db_addslashes(base64_decode($_GET['name']));
+			 if (strlen($name) < 2)
+				 return false;
+			 $c = CreateObject('phpgwapi.config','filemanager');
+			 $c->read_repository();
+			 $current_config = $c->config_data;
+
+			 $bo->vfs->override_acl = 1;
+
+			 if ( $bo->vfs->mkdir(array(
+				 'string' => $name,
+				 'relatives' => array(RELATIVE_NONE)
+			 )) )
+			 if ( $bo->vfs->set_quota(array(
+				 'string' => $name,
+				 'relatives' => array(RELATIVE_NONE),
+				 'new_quota' => $current_config['filemanager_quota_size']
+			 )) )
+			 $return = True;
+
+			 $bo->vfs->override_acl = 0;
+			 if ($return){
+				 echo "Folder created";
+			 }
+			 else
+				 echo "Error";
+		 }
+
 		 function removeFolder(){
 			 $GLOBALS['phpgw_info']['flags'] = array
@@ -156,5 +231,5 @@
 				 );
 
-			 $GLOBALS['phpgw']->common->phpgw_header();
+			$GLOBALS['phpgw']->common->phpgw_header();
 			include('load_lang.php');
 			echo "<script src='".$GLOBALS['phpgw_info']['flags']['currentapp']."/js/connector.js'></script>";
@@ -185,10 +260,62 @@
 				 );
 			 $name = $GLOBALS['phpgw']->db->db_addslashes($_GET['name']);
-			 $GLOBALS['phpgw']->db->query('SELECT DISTINCT directory FROM phpgw_vfs WHERE directory like \'%'.$name.'%\' LIMIT 20',__LINE__,__FILE__);
+			 $GLOBALS['phpgw']->db->query('SELECT DISTINCT directory FROM phpgw_vfs WHERE (directory like \'%'.$name.'%\') LIMIT 20',__LINE__,__FILE__);
 			 while ($GLOBALS['phpgw']->db->next_record()){
 				 $val = $GLOBALS['phpgw']->db->row();
 				 echo "<option>".$val['directory']."</option>";
 			 }
-		 }
+			 $GLOBALS['phpgw']->db->query('SELECT directory,name from phpgw_vfs WHERE directory = \'/home\' and name like \'%'.$name.'%\' LIMIT 1',__LINE__,__FILE__);
+			 if ($GLOBALS['phpgw']->db->next_record()){
+				 $val = $GLOBALS['phpgw']->db->row();
+				 echo "<option>".$val['directory']."/".$val['name']."</option>";
+			 }
+			
+
+		 }
+		 function search_user(){
+			 $GLOBALS['phpgw_info']['flags'] = array
+				 (
+					 'currentapp'    => 'filemanager',
+					 'noheader'      => True,
+					 'nonavbar' => True,
+					 'nofooter'      => True,
+					 'noappheader'   => True,
+					 'enable_browser_class'  => True
+				 );
+			 $account_info = $GLOBALS['phpgw']->accounts->get_list('both',0,'','',$_GET['name'],'all');
+
+			 foreach($account_info as $val)
+				 echo "<option value='".$val['account_id']."'>".$val['account_lid']."</option>";
+		 }
+		 function set_owner(){
+			 $GLOBALS['phpgw_info']['flags'] = array
+				 (
+					 'currentapp'    => 'filemanager',
+					 'noheader'      => True,
+					 'nonavbar' => True,
+					 'nofooter'      => True,
+					 'noappheader'   => True,
+					 'enable_browser_class'  => True
+				 );
+			 $name = $GLOBALS['phpgw']->db->db_addslashes(base64_decode($_GET['dir']));
+			 $owner = ($_GET['owner'])*1;
+
+			 $GLOBALS['phpgw']->db->query('UPDATE phpgw_vfs SET owner_id = '.$owner.' WHERE directory = \''.$name.'\'',__LINE__,__FILE__);
+			 if ($GLOBALS['phpgw']->db->Error)
+				 echo "Erro";
+			 else
+			 {
+				 $dirs=explode('/',$name);
+				 $GLOBALS['phpgw']->db->query('UPDATE phpgw_vfs SET owner_id = '.$owner.' WHERE directory = \'/'.$dirs[1].'\' and name=\''.$dirs[2].'\'',__LINE__,__FILE__);
+				 if ($GLOBALS['phpgw']->db->Error)
+					 echo "Erro";
+				 else
+				 {
+					 echo lang('entry updated sucessfully');
+				 }
+			 }
+			 return;
+		 }
+	
 		 function update_quota(){
 			 $GLOBALS['phpgw_info']['flags'] = array
