Index: branches/2.2/mobile/inc/class.ui_home.inc.php
===================================================================
--- branches/2.2/mobile/inc/class.ui_home.inc.php	(revision 3595)
+++ branches/2.2/mobile/inc/class.ui_home.inc.php	(revision 3596)
@@ -34,5 +34,5 @@
 			$this->template->set_var('lang_my_folders', lang("my folders"));
 			$this->template->set_var('lang_my_commitments', lang("my commitments"));
-      $this->template->set_var('lang_my_contacts', lang("my contacts"));
+      		$this->template->set_var('lang_my_contacts', lang("my contacts"));
 			$this->template->set_var('lang_new_mail', lang("new mail"));
 			$this->template->set_var('lang_mark_as_read', lang("mark as read"));
@@ -139,6 +139,8 @@
 			$p->set_var('lang_events',lang('events'));
 			$p->set_var('default_folders',$params['default_folders']);
-			$p->set_var('personal_folders',$params['personal_folders']);	
+			$p->set_var('personal_folders',$params['personal_folders']);
+			$p->set_var('folder_to_search',$params['folder_to_search']);
 			$p->set_var('contacts_search',$params['contacts_search']);	
+			$p->set_var('catalog_to_search',$params['catalog_to_search']);
 			$p->set_var('calendar_search',$params['calendar_search']);
 			$p->set_var('lang_more',lang("more"));	
@@ -147,11 +149,15 @@
 			$p->set_var('show_more_messages',"none");
 			$p->set_var('show_more_events',"none");
+			$p->set_var('contacts_request_from',
+							isset($params["request_from"])?
+							$params["request_from"]:"none");
 			
 			//Contatos			
 			if(($params["contacts_search"]==="1") || 
-					(isset($params["catalog_to_search"]))) {
+					(isset($params["catalog_to_search"]) && $params["catalog_to_search"]!=="")) {
+
 				$bo_cc =  CreateObject('mobile.bo_mobilecc');
 				
-				if(isset($params["catalog_to_search"]))
+				if(isset($params["catalog_to_search"]) && $params["catalog_to_search"]!=="")
 					$catalogs = array(0=>array("catalog"=>$params["catalog_to_search"],
 											"label" => $params["catalog_to_search"]));
@@ -183,8 +189,14 @@
 						unset($partial_result["has_more"]);
 					}
+					
 					$contacts_result = array_merge($contacts_result,$partial_result);
 					
 				}
-				$p->set_var('contacts',ui_mobilecc::print_contacts($contacts_result));
+				
+				if(isset($params['request_from'])  && $params['request_from']!="none") //Buscas feitas requisitadas por outros modulos
+					$request_from = $params['request_from'];
+				else
+					$request_from = null;
+				$p->set_var('contacts',ui_mobilecc::print_contacts($contacts_result,false));
 			}
 			else {
@@ -194,5 +206,5 @@
 			//E-mails
 			$no_mail_search=false;
-			if(!isset($params['folder_to_search'])) {
+			if((!isset($params['folder_to_search'])) || ($params['folder_to_search']==="")) {
 				if($params['default_folders']==="1") {
 					if($params['personal_folders']!=="1")
Index: branches/2.2/mobile/inc/class.ui_mobilecc.inc.php
===================================================================
--- branches/2.2/mobile/inc/class.ui_mobilecc.inc.php	(revision 3595)
+++ branches/2.2/mobile/inc/class.ui_mobilecc.inc.php	(revision 3596)
@@ -132,4 +132,7 @@
 			$this->template->set_var("actual_catalog",$this->page_info["actual_catalog"]);
 			$this->template->set_var("next_max_results",$this->page_info["actual_max_contacts"]+10);
+			$this->template->set_var("contacts_request_from",
+										$this->page_info["request_from"]==null?
+										"none":$this->page_info["request_from"]);
 			
 			//Combo de catálogos
@@ -272,5 +275,5 @@
 											$contact["connections"]["connection2"]["connection_value"],19));
 							
-						$p->fp('rows','row_contacts',True);
+						$block = "row_contacts";
 					}
 					else { //Grupos
@@ -279,5 +282,5 @@
 						$p->set_var('group_id',$contact["id_group"]);
 						$p->set_var('group_name',$contact["title"]);
-						$p->fp('rows','row_groups',True);
+						$block = "row_groups";
 					}
 					
@@ -288,6 +291,8 @@
 					else {
 						$p->set_var('lang_see_details',strtoupper(lang("select")));
-						$p->set_var('href_details','ui_mobilemail.add_recipient&mail=$mail&cn=$cn');
+						$p->set_var("href_details','ui_mobilemail.add_recipient&mail=$mail&cn=$cn");
 					}
+					
+					$p->fp('rows',$block,True);
 				}
 				
Index: branches/2.2/mobile/templates/default/cc_main.tpl
===================================================================
--- branches/2.2/mobile/templates/default/cc_main.tpl	(revision 3595)
+++ branches/2.2/mobile/templates/default/cc_main.tpl	(revision 3596)
@@ -15,4 +15,5 @@
 		<input type="hidden" name="menuaction" value="mobile.ui_home.search">
 		<input type="hidden" name="catalog_to_search" value="{actual_catalog}">
+		<input type="hidden" name="contacts_request_from" value="{contacts_request_from}">
 		<input type="text" name="name"> 
 		<button name="buscar_contato" class="btn-generico" onClick="document.getElementById('formu_busca').submit()">buscar contato</button>
Index: branches/2.2/mobile/templates/default/home_search.tpl
===================================================================
--- branches/2.2/mobile/templates/default/home_search.tpl	(revision 3574)
+++ branches/2.2/mobile/templates/default/home_search.tpl	(revision 3596)
@@ -9,6 +9,10 @@
 				<input type="hidden" name="default_folders" value="{default_folders}">
 				<input type="hidden" name="personal_folders" value="{personal_folders}">
+				<input type="hidden" name="folder_to_search" value="{folder_to_search}">
 				<input type="hidden" name="contacts_search" value="{contacts_search}">
+				<input type="hidden" name="catalog_to_search" value="{catalog_to_search}">
 				<input type="hidden" name="calendar_search" value="{calendar_search}">
+				
+				<input type="hidden" name="contacts_request_from" value="{contacts_request_from}">
 				<input type="hidden" name="name" value="{search_param}">
 			<input type="text" name="name"> <input type="submit" class="btn-generico" value="{lang_search}" ></form>
@@ -26,5 +30,7 @@
 					<input type="hidden" name="default_folders" value="{default_folders}">
 					<input type="hidden" name="personal_folders" value="{personal_folders}">
+					<input type="hidden" name="folder_to_search" value="{folder_to_search}">
 					<input type="hidden" name="contacts_search" value="{contacts_search}">
+					<input type="hidden" name="catalog_to_search" value="{catalog_to_search}">
 					<input type="hidden" name="calendar_search" value="{calendar_search}">
 					<input type="hidden" name="name" value="{search_param}">
@@ -42,5 +48,7 @@
 					<input type="hidden" name="default_folders" value="{default_folders}">
 					<input type="hidden" name="personal_folders" value="{personal_folders}">
+					<input type="hidden" name="folder_to_search" value="{folder_to_search}">
 					<input type="hidden" name="contacts_search" value="{contacts_search}">
+					<input type="hidden" name="catalog_to_search" value="{catalog_to_search}">
 					<input type="hidden" name="calendar_search" value="{calendar_search}">
 					<input type="hidden" name="name" value="{search_param}">
@@ -58,5 +66,7 @@
 					<input type="hidden" name="default_folders" value="{default_folders}">
 					<input type="hidden" name="personal_folders" value="{personal_folders}">
+					<input type="hidden" name="folder_to_search" value="{folder_to_search}">
 					<input type="hidden" name="contacts_search" value="{contacts_search}">
+					<input type="hidden" name="catalog_to_search" value="{catalog_to_search}">
 					<input type="hidden" name="calendar_search" value="{calendar_search}">
 					<input type="hidden" name="name" value="{search_param}">
