Index: /branches/2.0/contactcenter/inc/class.bo_catalog_group_catalog.inc.php
===================================================================
--- /branches/2.0/contactcenter/inc/class.bo_catalog_group_catalog.inc.php	(revision 285)
+++ /branches/2.0/contactcenter/inc/class.bo_catalog_group_catalog.inc.php	(revision 3210)
@@ -71,10 +71,10 @@
 		
 		*/
-		function find($what, $rules, $other)
+		function find($what, $rules, $other, $recursive=false)
 		{
 			if ($ldap_info = $this->catalog['ldap'])
 			{
 				$meta_catalog =& CreateObject('contactcenter.bo_global_ldap_catalog',$ldap_info['id_source'], $ldap_info['context'], $this->external);
-				return $meta_catalog->find($what, $rules, $other);
+				return $meta_catalog->find($what, $rules, $other, $recursive);
 			}
 			
@@ -95,5 +95,5 @@
 				}
 				
-				$temp_res = $this->bo_contactcenter->catalog->find($what, $rules, $other);
+				$temp_res = $this->bo_contactcenter->catalog->find($what, $rules, $other, $recursive);
 				if (is_array($temp_res) and count($temp_res))
 				{
Index: /branches/2.0/contactcenter/inc/class.bo_global_ldap_catalog.inc.php
===================================================================
--- /branches/2.0/contactcenter/inc/class.bo_global_ldap_catalog.inc.php	(revision 3134)
+++ /branches/2.0/contactcenter/inc/class.bo_global_ldap_catalog.inc.php	(revision 3210)
@@ -115,5 +115,5 @@
 		
 		*/
-		function find($what, $rules=false, $other=false)
+		function find($what, $rules=false, $other=false, $recursive=false)
 		{
 			$restric_fields = $this->get_restrictions_without_branch($rules);
@@ -138,5 +138,6 @@
 			{			
 				$ldap = $GLOBALS['phpgw']->common->ldapConnect($this->src_info['host'], $this->src_info['acc'], $this->src_info['pw'], true);
-				$result_r = ldap_search($ldap , $this->src_info['context'], $filter, $fields, 0, $this->src_info['max_results']);
+				$result_r = $recursive ? ldap_search($ldap , $this->src_info['context'], $filter, $fields, 0, $this->src_info['max_results']) :
+						ldap_list($ldap , $this->src_info['context'], $filter, $fields, 0, $this->src_info['max_results']);
 			}
 			else
Index: /branches/2.0/contactcenter/inc/class.ui_data.inc.php
===================================================================
--- /branches/2.0/contactcenter/inc/class.ui_data.inc.php	(revision 3197)
+++ /branches/2.0/contactcenter/inc/class.ui_data.inc.php	(revision 3210)
@@ -964,5 +964,5 @@
 				}
 				
-				$result = $this->bo->find($find_field[0],$find_restric[0],$find_other[0]);
+				$result = $this->bo->find($find_field[0],$find_restric[0],$find_other[0], $data['search_for'] != null);
 				
 				$n_entries = count($result);
@@ -1210,5 +1210,5 @@
 						$final[3][$i][0] = $contact['companies']['company1']['company_name']?$contact['companies']['company1']['company_name']:'none';
 						if($this->page_info['actual_catalog']['class']!='bo_global_ldap_catalog'){
-							$final[3][$i][1] = $contact['names_ordered'] ? urldecode($contact['names_ordered'])  : 'none';
+							$final[3][$i][1] = $contact['names_ordered'] ? urldecode(is_array($contact['names_ordered']) ? $contact['names_ordered'][0] : $contact['names_ordered'])  : 'none';
 						}
 						else {
@@ -2378,5 +2378,5 @@
 					//'contact.account_status',
 					'contact.account_visible'
-					), $rules, array('order' => $data['fields']['search'], 'sort' => 'ASC'));
+					), $rules, array('order' => $data['fields']['search'], 'sort' => 'ASC'), $data['search_for'] != null);
 			}
 
Index: /branches/2.0/contactcenter/inc/class.bo_contactcenter.inc.php
===================================================================
--- /branches/2.0/contactcenter/inc/class.bo_contactcenter.inc.php	(revision 752)
+++ /branches/2.0/contactcenter/inc/class.bo_contactcenter.inc.php	(revision 3210)
@@ -206,7 +206,7 @@
 				
 		*/
-		function find($what, $rules=false, $other=false)
-		{
-			return $this->catalog->find($what, $rules, $other);
+		function find($what, $rules=false, $other=false, $recursive=false)
+		{
+			return $this->catalog->find($what, $rules, $other, $recursive);
 		}
 		
