Index: branches/2.2.0.1/contactcenter/inc/class.ui_data.inc.php
===================================================================
--- branches/2.2.0.1/contactcenter/inc/class.ui_data.inc.php	(revision 4254)
+++ branches/2.2.0.1/contactcenter/inc/class.ui_data.inc.php	(revision 4262)
@@ -4249,46 +4249,72 @@
 
 						$sdata['connections']['default_phone']['connection_name'] = lang('Main');
-					$sdata['connections']['default_phone']['connection_value'] = $phone;
-
-						$sdata['connections']['aditional_phone']['cellphone']['connection_name'] = 'Celular';
-						$sdata['connections']['aditional_phone']['cellphone']['connection_value'] = trim($row[$header[$personal_cell_pos]]);
-						
-						$sdata['connections']['aditional_phone']['corporate_phone']['connection_name'] = 'Trabalho';
-						$sdata['connections']['aditional_phone']['corporate_phone']['connection_value'] = trim($row[$header[$corporate_phone_pos]]);
-						
-						$sdata['connections']['aditional_phone']['fax']['connection_name'] = 'Fax';
-						$sdata['connections']['aditional_phone']['fax']['connection_value'] = trim($row[$header[$fax_pos]]);
-						
-						$sdata['connections']['aditional_phone']['corporate_fax']['connection_name'] = 'Fax Corporativo';
-						$sdata['connections']['aditional_phone']['corporate_fax']['connection_value'] = trim($row[$header[$corporate_fax_pos]]);
-												
-						$sdata['connections']['aditional_phone']['corporate_cell']['connection_name'] = 'Celular Corporativo';
-						$sdata['connections']['aditional_phone']['corporate_cell']['connection_value'] = trim($row[$header[$corporate_cell_pos]]);
-						
-						$sdata['connections']['aditional_phone']['corporate_pager']['connection_name'] = 'Pager Corporativo';
-						$sdata['connections']['aditional_phone']['corporate_pager']['connection_value'] = trim($row[$header[$corporate_pager_pos]]);
-																
-						
-						$sdata['connections']['aditional_phone']['home_phone']['connection_name'] = 'Casa';
-						$sdata['connections']['aditional_phone']['home_phone']['connection_value'] = trim($row[$header[$home_phone_pos]]);
-						
-						$sdata['connections']['aditional_phone']['pager']['connection_name'] = 'Pager';
-						$sdata['connections']['aditional_phone']['pager']['connection_value'] = trim($row[$header[$pager_pos]]);
+                                                $sdata['connections']['default_phone']['connection_value'] = $phone;
+
+						if( trim($row[$header[$home_phone_pos]]) != "" )
+                                                {
+                                                    $sdata['connections']['aditional_phone']['home_phone']['connection_name'] = 'Casa';
+                                                    $sdata['connections']['aditional_phone']['home_phone']['connection_value'] = trim($row[$header[$home_phone_pos]]);
+                                                }
+
+                                                if( trim($row[$header[$personal_cell_pos]]) != "" )
+                                                {
+                                                    $sdata['connections']['aditional_phone']['cellphone']['connection_name'] = 'Celular';
+                                                    $sdata['connections']['aditional_phone']['cellphone']['connection_value'] = trim($row[$header[$personal_cell_pos]]);
+                                                }
+
+                                                if( trim($row[$header[$corporate_phone_pos]]) != "")
+                                                {
+                                                    $sdata['connections']['aditional_phone']['corporate_phone']['connection_name'] = 'Trabalho';
+                                                    $sdata['connections']['aditional_phone']['corporate_phone']['connection_value'] = trim($row[$header[$corporate_phone_pos]]);
+                                                }
+
+                                                if( trim($row[$header[$fax_pos]]) != "" )
+                                                {
+                                                    $sdata['connections']['aditional_phone']['fax']['connection_name'] = 'Fax';
+                                                    $sdata['connections']['aditional_phone']['fax']['connection_value'] = trim($row[$header[$fax_pos]]);
+                                                }
+
+                                                if ($GLOBALS['phpgw_info']['server']['personal_contact_type'] == 'True')
+                                                {
+                                                    if( trim($row[$header[$pager_pos]]) != "" )
+                                                    {
+                                                        $sdata['connections']['aditional_phone']['pager']['connection_name'] = 'Pager';
+                                                        $sdata['connections']['aditional_phone']['pager']['connection_value'] = trim($row[$header[$pager_pos]]);
+                                                    }
+
+                                                    if( trim($row[$header[$corporate_fax_pos]]) != "" )
+                                                    {
+                                                        $sdata['connections']['aditional_phone']['corporate_fax']['connection_name'] = 'Fax Corporativo';
+                                                        $sdata['connections']['aditional_phone']['corporate_fax']['connection_value'] = trim($row[$header[$corporate_fax_pos]]);
+                                                    }
+
+                                                    if( trim($row[$header[$corporate_cell_pos]]) != "" )
+                                                    {
+                                                        $sdata['connections']['aditional_phone']['corporate_cell']['connection_name'] = 'Celular Corporativo';
+                                                        $sdata['connections']['aditional_phone']['corporate_cell']['connection_value'] = trim($row[$header[$corporate_cell_pos]]);
+                                                    }
+
+                                                    if( trim($row[$header[$corporate_pager_pos]]) != "" )
+                                                    {
+                                                        $sdata['connections']['aditional_phone']['corporate_pager']['connection_name'] = 'Pager Corporativo';
+                                                        $sdata['connections']['aditional_phone']['corporate_pager']['connection_value'] = trim($row[$header[$corporate_pager_pos]]);
+                                                    }
+                                                }
 
 						$sdata['addresses']['address_corporative']['address1'] = trim($row[$header[$corporate_street_pos]]);
 						$sdata['addresses']['address_corporative']['address2'] = trim($row[$header[$corporate_street_2_pos]]);
 						$sdata['addresses']['address_corporative']['complement'] = trim($row[$header[$corporate_comp_pos]]);
-						$sdata['addresses']['address_corporative']['postal_code'] = trim($row[$header[$corporate_cep_pos]]);						
+						$sdata['addresses']['address_corporative']['postal_code'] = trim($row[$header[$corporate_cep_pos]]);
 						$sdata['addresses']['address_corporative']['id_country'] = "BR";
-						$sdata['addresses']['address_corporative']['id_state'] = trim($row[$header[$corporate_state_pos]]);	
+						$sdata['addresses']['address_corporative']['id_state'] = trim($row[$header[$corporate_state_pos]]);
 						$sdata['addresses']['address_corporative']['id_city'] = trim($row[$header[$corporate_city_pos]]);
-						
-													
+
+
 						$sdata['addresses']['address_personal']['address1'] = trim($row[$header[$street_pos]]);
 						$sdata['addresses']['address_personal']['address2'] = trim($row[$header[$street_2_pos]]);
 						$sdata['addresses']['address_personal']['complement'] = trim($row[$header[$comp_pos]]);
 						$sdata['addresses']['address_personal']['postal_code'] = trim($row[$header[$cep_pos]]);
-						$sdata['addresses']['address_personal']['id_country'] = "BR";							
-						$sdata['addresses']['address_personal']['id_state'] = trim($row[$header[$state_pos]]);	
+						$sdata['addresses']['address_personal']['id_country'] = "BR";
+						$sdata['addresses']['address_personal']['id_state'] = trim($row[$header[$state_pos]]);
 						$sdata['addresses']['address_personal']['id_city'] =  trim($row[$header[$city_pos]]);
 
@@ -4324,8 +4350,8 @@
 						$return['_failure_status'] .= "Line: " . ($line_iteration + 2) . ", Invalid Name: " . $sdata['given_names'] ."<br>";
 					}
-					else{	
-							if($id_group != 0){								
+					else{
+							if($id_group != 0){
 								$this->so_group->add_user_by_name($id_group,$full_name);
-							}						
+							}
 							$return['_new']++;
 		   				}
