Changeset 549


Ignore:
Timestamp:
11/11/08 14:59:58 (15 years ago)
Author:
niltonneto
Message:

resolve #372

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/phpgwapi/templates/celepar/navbar.inc.php

    r547 r549  
    243243                                $agreeterm_url = $_SERVER['HTTP_HOST'] . $GLOBALS['phpgw_info']['server']['webserver_url'] . '/preferences/termo_aceite.php'; 
    244244                                 
    245                                 if ($GLOBALS['phpgw_info']['server']['use_https'] > 0) 
     245                                if ($GLOBALS['phpgw_info']['server']['use_https'] == 2) 
    246246                                        $agreeterm_url = 'https://' . $agreeterm_url; 
    247247                                else 
  • trunk/preferences/termo_aceite.php

    r547 r549  
    1010        *  option) any later version.                                              * 
    1111        \**************************************************************************/ 
    12 ini_set("display_errors","1"); 
    13  
    1412        $GLOBALS['phpgw_info']['flags'] = array( 
    1513                'noheader'   => True, 
     
    3129        $GLOBALS['phpgw']->template->set_var('No',lang('No')); 
    3230        $GLOBALS['phpgw']->template->set_var('url_accept',lang('Change')); 
    33         $GLOBALS['phpgw']->template->set_var('url_dont_accept','/logout.php'); 
     31        $GLOBALS['phpgw']->template->set_var('url_dont_accept','../logout.php'); 
    3432        $GLOBALS['phpgw']->template->set_var('do you agree with the terms?',lang('Do you agree with the terms?')); 
    3533         
     
    3836        if (isset($_POST['pass'])) 
    3937        { 
    40                 $ldapManager = CreateObject('contactcenter.bo_ldap_manager'); 
    41                 $srcs = $ldapManager->get_all_ldap_sources(); 
    4238                $common = CreateObject('phpgwapi.common'); 
     39                // For Write operations in LDAP, the ldap master values (from Setup) must be verified. 
     40                // If you dont use Ldap replication, ignore it. 
     41                if ( (!empty($GLOBALS['phpgw_info']['server']['ldap_master_host'])) && 
     42                     (!empty($GLOBALS['phpgw_info']['server']['ldap_master_root_dn'])) && 
     43                     (!empty($GLOBALS['phpgw_info']['server']['ldap_master_root_pw']))) { 
     44 
     45                        $ldap =$common->ldapConnect($GLOBALS['phpgw_info']['server']['ldap_master_host'], 
     46                        $GLOBALS['phpgw_info']['server']['ldap_master_root_dn'], 
     47                        $GLOBALS['phpgw_info']['server']['ldap_master_root_pw'],false); 
     48                } 
     49                else 
     50                // For Write operations in LDAP, use ldapConnect without parameters. 
     51                        $ldap =$common->ldapConnect(); 
    4352                 
    44                 /*echo $srcs[1]['host']."----".$srcs[1]['dn']."----".$srcs[1]['pw']; 
    45                 exit(0);*/ 
    46                  
    47                 $ldap =$common->ldapConnect($srcs[1]['host'],$srcs[1]['acc'],$srcs[1]['pw'],false); 
    48                  
    49                  
     53                                 
    5054                $ldap_mod_replace['phpgwAgreeTerm'] = 1; 
    5155                $dn = $GLOBALS['phpgw_info']['user']['account_dn']; 
    5256 
    5357                ldap_mod_replace ( $ldap, $dn, $ldap_mod_replace ); 
    54  
     58                 
    5559                header("location: ../home.php?cd=yes"); 
    5660        } 
Note: See TracChangeset for help on using the changeset viewer.