Index: /branches/2.2/contactcenter/inc/class.bo_catalog_group_catalog.inc.php
===================================================================
--- /branches/2.2/contactcenter/inc/class.bo_catalog_group_catalog.inc.php	(revision 285)
+++ /branches/2.2/contactcenter/inc/class.bo_catalog_group_catalog.inc.php	(revision 3211)
@@ -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, false, $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, false, $recursive);
 				if (is_array($temp_res) and count($temp_res))
 				{
Index: /branches/2.2/contactcenter/inc/class.bo_global_ldap_catalog.inc.php
===================================================================
--- /branches/2.2/contactcenter/inc/class.bo_global_ldap_catalog.inc.php	(revision 3135)
+++ /branches/2.2/contactcenter/inc/class.bo_global_ldap_catalog.inc.php	(revision 3211)
@@ -113,5 +113,5 @@
 		
 		*/
-		function find($what, $rules=false, $other=false, $area=false)
+		function find($what, $rules=false, $other=false, $area=false, $recursive=false)
 		{
 			$restric_fields = $this->get_restrictions_without_branch($rules);
@@ -170,6 +170,7 @@
 			}
 			
-                        $ldap = $GLOBALS['phpgw']->common->ldapConnect($this->src_info['host'], $this->src_info['acc'], $this->src_info['pw'], $followReferral);
-                        $result_r = ldap_search($ldap ,($refer_context  ? $refer_context  : $this->src_info['context']), $filter, $fields, 0, $this->src_info['max_results']);
+			$ldap = $GLOBALS['phpgw']->common->ldapConnect($this->src_info['host'], $this->src_info['acc'], $this->src_info['pw'], $followReferral);
+			$result_r = $recursive ? ldap_search($ldap ,($refer_context  ? $refer_context  : $this->src_info['context']), $filter, $fields, 0, $this->src_info['max_results']) :
+						ldap_list($ldap , ($refer_context  ? $refer_context  : $this->src_info['context']), $filter, $fields, 0, $this->src_info['max_results']);
 
 			if (!$result_r)
Index: /branches/2.2/contactcenter/inc/class.ui_data.inc.php
===================================================================
--- /branches/2.2/contactcenter/inc/class.ui_data.inc.php	(revision 3198)
+++ /branches/2.2/contactcenter/inc/class.ui_data.inc.php	(revision 3211)
@@ -1393,5 +1393,5 @@
 
 						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 {
@@ -2897,5 +2897,5 @@
 				// Get only this attributes: dn, cn for external catalogs,
 				// used to restrict the attributes used in filters
-				$ids = $this->bo->find(array($data['fields']['id'], $data['fields']['search']), $rules, array('order' => $data['fields']['search'], 'sort' => 'ASC'));
+				$ids = $this->bo->find(array($data['fields']['id'], $data['fields']['search']), $rules, array('order' => $data['fields']['search'], 'sort' => 'ASC'), $data['search_for'] != null);
 			}
 			else
@@ -2909,5 +2909,5 @@
 					//'contact.account_status',
 					'contact.account_visible'
-					), $rules, array('order' => $data['fields']['search'], 'sort' => 'ASC'), $data['search_for_area'] );
+					), $rules, array('order' => $data['fields']['search'], 'sort' => 'ASC'), $data['search_for_area'], $data['search_for'] != null );
 			}
 
Index: /branches/2.2/contactcenter/inc/class.bo_contactcenter.inc.php
===================================================================
--- /branches/2.2/contactcenter/inc/class.bo_contactcenter.inc.php	(revision 1598)
+++ /branches/2.2/contactcenter/inc/class.bo_contactcenter.inc.php	(revision 3211)
@@ -206,7 +206,7 @@
 				
 		*/
-		function find($what, $rules=false, $other=false, $area=false)
-		{
-			return $this->catalog->find($what, $rules, $other, $area);
+		function find($what, $rules=false, $other=false, $area=false, $recursive=false)
+		{
+			return $this->catalog->find($what, $rules, $other, $area, $recursive);
 		}
 		
