Ignore:
Timestamp:
01/07/09 17:21:17 (15 years ago)
Author:
niltonneto
Message:

Inclusão e correção de tradução.
Limpeza de código.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/preferences/changepersonaldata.php

    r392 r578  
    4040        $GLOBALS['phpgw']->template->set_var('lang_commercial_telephonenumber',lang('Commercial Telephone number')); 
    4141        $GLOBALS['phpgw']->template->set_var('lang_ps_commercial_telephonenumber', 
    42         lang('Observation: This telephone number will apear in the searches for your name, and will be visible for all ExpressoLivre Users.')); 
     42        lang('Observation') . ': ' . lang('This telephone number will apear in searches for your name, and it will be visible for all ExpressoLivre Users') . '.'); 
    4343        $GLOBALS['phpgw']->template->set_var('lang_change',lang('Change')); 
    4444        $GLOBALS['phpgw']->template->set_var('lang_cancel',lang('Cancel')); 
    45         $GLOBALS['phpgw']->template->set_var('telephonenumber',$_POST['telephonenumber'] ? $_POST['telephonenumber'] : $GLOBALS['phpgw_info']['user']['telephonenumber']); 
    4645        $GLOBALS['phpgw']->template->set_var('form_action',$GLOBALS['phpgw']->link('/preferences/changepersonaldata.php')); 
     46 
     47        /* Get telephone number from ldap or from post */ 
     48        $ldap_conn = $GLOBALS['phpgw']->common->ldapConnect(); 
     49        $result = ldap_search($ldap_conn, $GLOBALS['phpgw_info']['server']['ldap_context'], 'uid='.$GLOBALS['phpgw_info']['user']['account_lid'], array('telephonenumber')); 
     50        $entrie = ldap_get_entries($ldap_conn, $result); 
     51        $GLOBALS['phpgw']->template->set_var('telephonenumber',$_POST['telephonenumber'] ? $_POST['telephonenumber'] : $entrie[0]['telephonenumber'][0]); 
     52        ldap_close($ldap_conn); 
    4753 
    4854        if ($GLOBALS['phpgw_info']['server']['auth_type'] != 'ldap') 
     
    6268                        else 
    6369                        { 
    64                                 // LDAP Replication mode.  
     70                                // Use LDAP Replication mode, if available 
    6571                                if ( (!empty($GLOBALS['phpgw_info']['server']['ldap_master_host'])) && 
    6672                                         (!empty($GLOBALS['phpgw_info']['server']['ldap_master_root_dn'])) && 
Note: See TracChangeset for help on using the changeset viewer.