Subversion Repositories ALCASAR

Compare Revisions

Ignore whitespace Rev 2809 → Rev 2731

/web/acc/admin/ldap.php
168,8 → 168,10
 
// Check LDAP service
if ($ldap_port_636) {
// Set LDAP SSL options
if (PHP_VERSION_ID >= 70100):
// Set LDAP SSL options
ldap_set_option(null, LDAP_OPT_X_TLS_REQUIRE_CERT, LDAP_OPT_X_TLS_NEVER);
endif;
$ldapconn = @ldap_connect('ldaps://'.$ldap_server);
if (!$ldapconn) {
$ldap_srv_636 = false;
283,6 → 285,7
}
fclose($sock);
 
if (PHP_VERSION_ID >= 70100):
// Set LDAP SSL options
if ($f_ldap_ssl) {
if ($f_ldap_cert_required) {
295,6 → 298,7
ldap_set_option(null, LDAP_OPT_X_TLS_REQUIRE_CERT, LDAP_OPT_X_TLS_NEVER);
}
}
endif;
 
// if ok, Test LDAP connection
$ldapconn = @ldap_connect((($f_ldap_ssl)?'ldaps':'ldap').'://'.$f_ldap_server);
510,6 → 514,7
<meta charset="UTF-8">
<title><?= $l_ldap_title ?></title>
<link type="text/css" href="/css/style.css" rel="stylesheet">
<link type="text/css" href="/css/acc.css" rel="stylesheet">
<link type="text/css" href="/css/ldap.css" rel="stylesheet">
<script>
function onLdapStatusChange() {
535,6 → 540,10
}
formSubmit.style.display = 'none';
btn_checkConf.style.display = null;
<?php if (PHP_VERSION_ID < 70100): ?>
// Compatibility with PHP < 7.1.0 # TODO : remove if ever Mageia 7 is released
formSubmit.style.display = null;
<?php endif; ?>
} else {
for (var i=0; i<listToDisables.length; i++) {
document.getElementById(listToDisables[i]).style.backgroundColor = '#c0c0c0';
593,6 → 602,10
formSubmit.style.display = 'none';
btn_checkConf.style.display = null;
}
<?php if (PHP_VERSION_ID < 70100): ?>
// Compatibility with PHP < 7.1.0 # TODO : remove if ever Mageia 7 is released
formSubmit.style.display = null;
<?php endif; ?>
 
if (typeof data.errors !== 'undefined') {
messages = '<span style=\"color: red\">' + data.errors.join('</span><br><span style=\"color: red\">') + '</span><br>';