dupondje / PHP-Push-2

Z-Push Fork With CalDAV/LDAP Support
GNU Affero General Public License v3.0
67 stars 24 forks source link

ldap.php and searchldap.php configuration use same variable name #22

Closed fortiko closed 12 years ago

fortiko commented 12 years ago

Turns out that searchldap.php backend for GAL is useful, as it searches with a more generic filter (|(cn=SEARCHVALUE)(mail=SEARCHVALUE)) for hits than the default "Contacts" section which only does (cn=SEARCHVALUE*).

In the corresponding config file backend/searchldap/config.php, the following variables are defined:

LDAP_HOST LDAP_PORT LDAP_BIND_USER LDAP_BIND_PASSWORD LDAP_SEARCH_BASE LDAP_SEARCH_FILTER

Since we use LDAP_PORT also in config.php for ldap.php, the following warning appears:

backend/searchldap/config.php:47 Constant LDAP_PORT already defined (8)

We should possibly rename LDAP_PORT in ldap.php to avoid potential conflicts in the future when using both backends with different settings such as 389 and 689 for different servers, for instance? The hostname is specified via LDAP_HOST and LDAP_SERVER respectively, so there are no side effects there!