- Timestamp:
- 05/25/11 15:45:25 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sandbox/2.2.0.2/contactcenter/inc/hook_config_validate.inc.php
r4504 r4508 24 24 $error = false; 25 25 26 // if($value['cc_global_source0'] == 'ldap') 27 // { 28 // if (!$value['cc_ldap_host0']) 29 // { 30 // $error[] = '<br>LDAP host must be set!'; 31 // } 32 // 33 // if(!$value['cc_ldap_context0']) 34 // { 35 // $error[] = '<br>There must be a Context'; 36 // } 37 // 38 // if(!$value['cc_ldap_browse_dn0']) 39 // { 40 // $error[] = '<br>The Browse Account must be set'; 41 // } 42 // } 26 /* if($value['cc_global_source0'] == 'ldap') 27 { 28 if (!$value['cc_ldap_host0']) 29 { 30 $error[] = '<br>LDAP host must be set!'; 31 } 32 33 if(!$value['cc_ldap_context0']) 34 { 35 $error[] = '<br>There must be a Context'; 36 } 43 37 38 if(!$value['cc_ldap_browse_dn0']) 39 { 40 $error[] = '<br>The Browse Account must be set'; 41 } 42 43 if ($value['cc_ldap_pw0'] != $_POST['cc_ldap_pw0']) 44 { 45 $error[] = '<br>Invalid LDAP Password!'; 46 } 47 48 } */ 49 50 /* Check if the password field is blank, then discard changes */ 44 51 foreach ($value as $attr_name => $attr_value) { 45 52 if ($attr_value == '') { … … 51 58 foreach ($nums as $num) { 52 59 //Deleta toda a tupla que contem o atributo vazio 53 foreach ($value as $attr_name_x => $attr_value_x) { 54 60 foreach ($value as $attr_name_x => $attr_value_x) { 55 61 if (strpos($attr_name_x, $num) !== false) { 56 62 if (strpos($attr_name_x, 'cc_attribute_name') !== false) 57 $error[] = "<br/>" . lang("Could not find the LDAP attribute pointed by") . " " . $attr_value_x;63 //$error[] = "<br/>" . lang("Could not find the LDAP attribute pointed by") . " " . $attr_value_x; 58 64 59 65 unset($value[$attr_name_x]); … … 93 99 */ 94 100 function cc_attribute_ldapname(&$value) { 101 /* 102 //Retirada a validação dos campos correspondentes no LDAP. 95 103 $ldap = CreateObject('contactcenter.bo_ldap_manager'); 96 104 $ds = $GLOBALS['phpgw']->common->ldapConnect($ldap->srcs[1]['host'], $ldap->srcs[1]['acc'], $ldap->srcs[1]['pw'], true); … … 103 111 $value = ""; 104 112 ldap_close($ds); 113 */ 105 114 } 106 115 ?>
Note: See TracChangeset
for help on using the changeset viewer.