Index: /trunk/contactcenter/inc/class.ui_data.inc.php
===================================================================
--- /trunk/contactcenter/inc/class.ui_data.inc.php	(revision 4369)
+++ /trunk/contactcenter/inc/class.ui_data.inc.php	(revision 4377)
@@ -4134,31 +4134,57 @@
 
 						$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]]);
