Skip to content

Commit 7496818

Browse files
committed
Use ltb-ldap lib for map (#118, #119)
1 parent 532ca29 commit 7496818

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

bin/map_preload_geocoding_cache.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
$size_limit_reached = false;
1010

1111
require_once("conf/config.inc.php");
12-
require_once("lib/ldap.inc.php");
12+
require __DIR__ . '/../vendor/autoload.php';
1313

1414
$opts = array(
1515
'http' => array(
@@ -33,7 +33,7 @@ function array_flatten($arr, $flat = [])
3333
}
3434

3535
# Connect to LDAP
36-
$ldap_connection = wp_ldap_connect($ldap_url, $ldap_starttls, $ldap_binddn, $ldap_bindpw, $ldap_network_timeout);
36+
$ldap_connection = \Ltb\Ldap::connect($ldap_url, $ldap_starttls, $ldap_binddn, $ldap_bindpw, $ldap_network_timeout);
3737

3838
$ldap = $ldap_connection[0];
3939
$result = $ldap_connection[1];

htdocs/map.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
$size_limit_reached = false;
99

1010
require_once("../conf/config.inc.php");
11-
require_once("../lib/ldap.inc.php");
11+
require __DIR__ . '/../vendor/autoload.php';
1212

1313
function array_flatten($arr, $flat = [])
1414
{
@@ -23,7 +23,7 @@ function array_flatten($arr, $flat = [])
2323
}
2424

2525
# Connect to LDAP
26-
$ldap_connection = wp_ldap_connect($ldap_url, $ldap_starttls, $ldap_binddn, $ldap_bindpw, $ldap_network_timeout);
26+
$ldap_connection = \Ltb\Ldap::connect($ldap_url, $ldap_starttls, $ldap_binddn, $ldap_bindpw, $ldap_network_timeout);
2727

2828
$ldap = $ldap_connection[0];
2929
$result = $ldap_connection[1];

0 commit comments

Comments
 (0)