Merge branch '7.0' of git@github.com:Dolibarr/dolibarr.git into 7.0
This commit is contained in:
commit
ac9ab7b228
@ -738,6 +738,10 @@ class Ldap
|
|||||||
*/
|
*/
|
||||||
function serverPing($host, $port=389, $timeout=1)
|
function serverPing($host, $port=389, $timeout=1)
|
||||||
{
|
{
|
||||||
|
// Replace ldaps:// by ssl://
|
||||||
|
if (preg_match('/^ldaps:\/\/([^\/]+)\/?$/',$host, $regs)) {
|
||||||
|
$host = 'ssl://'.$regs[1];
|
||||||
|
}
|
||||||
$op = @fsockopen($host, $port, $errno, $errstr, $timeout);
|
$op = @fsockopen($host, $port, $errno, $errstr, $timeout);
|
||||||
if (!$op) return false; //DC is N/A
|
if (!$op) return false; //DC is N/A
|
||||||
else {
|
else {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user