Changeset 395


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
Files:
6 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                                } 
  • trunk/contactcenter/index.php

    r358 r395  
    2626        //Enable/Disable VoIP Service -> Voip Server Config 
    2727        $_SESSION['phpgw_info']['user']['preferences']['contactcenter']['voip_enabled'] = false;         
     28        $voip_groups = array(); 
    2829        if($GLOBALS['phpgw_info']['server']['voip_groups']) { 
    29                 $voip_groups = explode(",",$GLOBALS['phpgw_info']['server']['voip_groups']);                     
    30                 foreach($GLOBALS['phpgw']->accounts->membership() as $idx => $group){                                            
    31                         if(array_search($group['account_name'],$voip_groups) !== FALSE){                 
     30                foreach(explode(",",$GLOBALS['phpgw_info']['server']['voip_groups']) as $i => $voip_group){ 
     31                        $a_voip = explode(";",$voip_group);                      
     32                        $voip_groups[] = $a_voip[1]; 
     33                }                
     34                foreach($GLOBALS['phpgw']->accounts->membership() as $idx => $group){                    
     35                        if(array_search($group['account_name'],$voip_groups) !== FALSE){                  
    3236                                $_SESSION['phpgw_info']['user']['preferences']['contactcenter']['voip_enabled'] = true; 
    3337                                break; 
  • trunk/expressoMail1_2/index.php

    r381 r395  
    4040         
    4141        //Enable/Disable VoIP Service -> Voip Server Config 
    42         $voip_enabled = false;   
     42        $voip_enabled = false; 
     43        $voip_groups = array(); 
    4344        if($GLOBALS['phpgw_info']['server']['voip_groups']) { 
    44                 $voip_groups = explode(",",$GLOBALS['phpgw_info']['server']['voip_groups']);                     
    45                 foreach($GLOBALS['phpgw']->accounts->membership() as $idx => $group){                                            
    46                         if(array_search($group['account_name'],$voip_groups) !== FALSE){                 
     45                foreach(explode(",",$GLOBALS['phpgw_info']['server']['voip_groups']) as $i => $voip_group){ 
     46                        $a_voip = explode(";",$voip_group);                      
     47                        $voip_groups[] = $a_voip[1]; 
     48                } 
     49                foreach($GLOBALS['phpgw']->accounts->membership() as $idx => $group){                    
     50                        if(array_search($group['account_name'],$voip_groups) !== FALSE){                  
    4751                                $voip_enabled = true; 
    4852                                break; 
     
    7175                'mainscreen_showmail'                           => $GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['mainscreen_showmail'] ? $GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['mainscreen_showmail'] : "0", 
    7276                'signature'                                             => $GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['signature'], 
     77                'type_signature'                                        => $GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['type_signature'], 
    7378                'use_signature'                                         => $GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['use_signature'] ? $GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['use_signature'] : "0", 
    7479                        'hide_folders'                                          => $GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['hide_folders'] ? $GLOBALS['phpgw_info']['user']['preferences']['expressoMail']['hide_folders'] : "0",                  
Note: See TracChangeset for help on using the changeset viewer.