168,10 → 168,8 |
|
// Check LDAP service |
if ($ldap_port_636) { |
if (PHP_VERSION_ID >= 70100): |
// Set LDAP SSL options |
// 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; |
285,7 → 283,6 |
} |
fclose($sock); |
|
if (PHP_VERSION_ID >= 70100): |
// Set LDAP SSL options |
if ($f_ldap_ssl) { |
if ($f_ldap_cert_required) { |
298,7 → 295,6 |
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); |
514,7 → 510,6 |
<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() { |
540,10 → 535,6 |
} |
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'; |
602,10 → 593,6 |
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>'; |