Changeset 395 for trunk/admin


Ignore:
Timestamp:
08/14/08 11:44:42 (16 years ago)
Author:
niltonneto
Message:

Alterações necessárias devido à mudança de implementação do método
memberships() da API, que traz somente o ID dos grupos agora.

Location:
trunk/admin
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/inc/class.bovoip.inc.php

    r357 r395  
    3636                $groups = $this->so->getGroupsLdap($pOrg); 
    3737                 
    38                 $group = "<ldap_ou>"; 
     38                $group = "<groups>"; 
    3939         
    4040                if((trim($groups) != '') && (is_array($groups))) 
    4141                { 
    4242                        foreach($groups as $tmp)         
    43                                 $group .= "<ou>" . $tmp . "</ou>"; 
     43                                $group .= "<group>" . $tmp['cn'].";".$tmp['gid'] . "</group>";                           
    4444                } 
    4545 
    46                 $group .= "</ldap_ou>"; 
     46                $group .= "</groups>"; 
    4747                 
    4848                return $group; 
  • trunk/admin/inc/class.sovoip.inc.php

    r357 r395  
    7373                { 
    7474                        $filter = "(&(phpgwAccountType=g)(objectClass=posixGroup))"; 
    75                         $justthese = array("cn"); 
     75                        $justthese = array("cn","gidNumber"); 
    7676                        $search = ldap_list($this->ldap, $organization, $filter, $justthese); 
    7777                        $entry = ldap_get_entries( $this->ldap, $search ); 
    7878 
    7979                        if( $entry ) 
    80                         { 
    81                                 foreach($entry as $tmp) 
    82                                         if( $tmp['cn'][0] != "" ) 
    83                                                 $result_groups[] = $tmp['cn'][0]; 
     80                        {                                        
     81                                $idx = 0; 
     82                                foreach($entry as $tmp) { 
     83                                        if( $tmp['gidnumber'][0] != "" ){ 
     84                                                $result_groups[$idx]['gid'] = $tmp['gidnumber'][0]; 
     85                                                $result_groups[$idx++]['cn'] = $tmp['cn'][0];                                            
     86                                        } 
     87                                } 
    8488                        } 
    8589                         
     
    9397        { 
    9498                $this->db = $GLOBALS['phpgw']->db; 
    95                  
    9699                if( $this->db ) 
    97100                { 
  • trunk/admin/inc/class.uivoip.inc.php

    r359 r395  
    7575                        natcasesort($gvoip); 
    7676                         
    77                         foreach( $gvoip as $tmp ) 
    78                                 $gvoip .= "<option value='".$tmp."'>".$tmp."</option>"; 
     77                        foreach( $gvoip as $tmp ){ 
     78                                $option = explode(";",$tmp); 
     79                                $gvoip .= "<option value='".$tmp."'>".$option[0]."</option>"; 
     80                        } 
    7981                } 
    8082 
     
    134136                                foreach($_POST['voip_groups'] as $tmp) 
    135137                                        $conf['voip_groups'] = (count($conf['voip_groups']) > 0 ) ? $conf['voip_groups'] . "," . $tmp : $tmp; 
    136                          
     138                        else{ 
     139                                $conf['voip_groups'] = ''; 
     140                        } 
    137141                        $this->bo->setConfDB($conf); 
    138142                } 
  • trunk/admin/js/voip/functions.js

    r357 r395  
    1717                                                flag = true; 
    1818                                } 
    19                                 if ( !flag ) 
    20                                         select_voip.options[select_voip.length] = new Option(select_ldap.options[i].value, select_ldap.options[i].value, false, true); 
     19                                if ( !flag ) {                                   
     20                                        var option = select_ldap.options[i].value.split(";"); 
     21                                        select_voip.options[select_voip.length] = new Option(option[0], select_ldap.options[i].value, false, true); 
     22                                } 
    2123                        } 
    2224        } 
     
    4749                                while(data) 
    4850                                { 
    49                                         select_ldap.options[select_ldap.options.length] = new Option(data.firstChild.nodeValue, data.firstChild.nodeValue, false, false);  
     51                                        var option = data.firstChild.nodeValue.split(";"); 
     52                                        select_ldap.options[select_ldap.options.length] = new Option(option[0],data.firstChild.nodeValue, false, false);  
    5053                                        data = data.nextSibling; 
    5154                                } 
Note: See TracChangeset for help on using the changeset viewer.