summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Bruederli <bruederli@kolabsys.com>2013-01-23 15:48:28 (GMT)
committerThomas Bruederli <bruederli@kolabsys.com>2013-01-23 15:48:28 (GMT)
commita0eb1a853418b886d105169bec65a8e01c164119 (patch)
treeb9af535569216055266a0aad32c5da2aab9a3957
parent7d0962ff1c4f143d7a8553a7da4e00126b53811b (diff)
downloadkolab-freebusy-a0eb1a853418b886d105169bec65a8e01c164119.tar.gz
Adapt to the latest version of Net_LDAP3; pull it as a composer module from git
-rw-r--r--composer.json21
-rw-r--r--lib/Kolab/FreeBusy/DirectoryLDAP.php5
-rw-r--r--lib/Kolab/FreeBusy/HTTPAuth.php6
3 files changed, 6 insertions, 26 deletions
diff --git a/composer.json b/composer.json
index 008fcf4..4343c2a 100644
--- a/composer.json
+++ b/composer.json
@@ -5,27 +5,12 @@
"version": "0.1-alpha",
"repositories": [
{
- "type": "composer",
- "url": "http://plugins.roundcube.net/"
- },
- {
"type": "pear",
"url": "http://pear.php.net/"
},
{
- "type": "package",
- "package": {
- "name": "Net_LDAP3",
- "version": "dev-master",
- "source": {
- "url": "git://git.kolab.org/git/pear/Net_LDAP3",
- "type": "git",
- "reference": "master"
- },
- "autoload": {
- "classmap": ["lib/"]
- }
- }
+ "type": "vcs",
+ "url": "git://git.kolab.org/git/pear/Net_LDAP3"
}
],
"autoload": {
@@ -34,7 +19,7 @@
"require": {
"php": ">=5.3.3",
"monolog/monolog": "1.2.*",
- "Net_LDAP3": "dev-master"
+ "kolab/Net_LDAP3": "dev-master"
},
"minimum-stability": "dev"
} \ No newline at end of file
diff --git a/lib/Kolab/FreeBusy/DirectoryLDAP.php b/lib/Kolab/FreeBusy/DirectoryLDAP.php
index 55a59df..00bba1a 100644
--- a/lib/Kolab/FreeBusy/DirectoryLDAP.php
+++ b/lib/Kolab/FreeBusy/DirectoryLDAP.php
@@ -29,15 +29,12 @@ class DirectoryLDAP extends Directory
'use_tls' => $host['scheme'] == 'tls' || $host['scheme'] == 'ldaps',
'root_dn' => $config['base_dn'],
'return_attributes' => (array)$config['attributes'],
- 'sizelimit' => 0,
- 'timelimit' => 0,
+ 'log_hook' => array($this, 'log'),
) + $config;
// instantiate Net_LDAP3 and connect with logger
$this->logger = Logger::get('ldap', intval($config['loglevel']));
$this->ldap = new Net_LDAP3($ldap_config);
- $this->ldap->config_set('log_hook', array($this, 'log'));
- $this->ldap->config_set('return_attributes', (array)$config['attributes']);
// connect + bind to LDAP server
if ($this->ldap->connect()) {
diff --git a/lib/Kolab/FreeBusy/HTTPAuth.php b/lib/Kolab/FreeBusy/HTTPAuth.php
index ad0c394..b9dce22 100644
--- a/lib/Kolab/FreeBusy/HTTPAuth.php
+++ b/lib/Kolab/FreeBusy/HTTPAuth.php
@@ -24,7 +24,7 @@ class HTTPAuth
$logger->addDebug('No HTTP auth submitted');
return false;
}
-
+
switch ($config['type']) {
case 'static':
return self::checkStatic($config, $_SERVER['PHP_AUTH_USER'], $_SERVER['PHP_AUTH_PW']);
@@ -66,13 +66,11 @@ class HTTPAuth
'filter' => $config['filter'],
'service_bind_dn' => $config['bind_dn'],
'service_bind_pw' => $config['bind_pw'],
- 'sizelimit' => 0,
- 'timelimit' => 0,
+ 'log_hook' => 'Kolab\FreeBusy\HTTPAuth::ldapLog',
);
// instantiate Net_LDAP3 and connect with logger
$ldap = new Net_LDAP3($ldap_config);
- $ldap->config_set('log_hook', 'Kolab\FreeBusy\HTTPAuth::ldapLog');
// connect + bind to LDAP server
if ($ldap->connect()) {