From 18e1910c0c33c1386112df84eb3f1a888b01236d Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Thu, 20 Jan 2011 10:49:47 -0700 Subject: [PATCH] Bug #9524: Fix method signature --- turba/lib/Driver/Ldap.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/turba/lib/Driver/Ldap.php b/turba/lib/Driver/Ldap.php index fc1018dd1..b2a6e5cba 100644 --- a/turba/lib/Driver/Ldap.php +++ b/turba/lib/Driver/Ldap.php @@ -41,8 +41,12 @@ class Turba_Driver_Ldap extends Turba_Driver * * @param $params Hash containing additional configuration parameters. */ - public function __construct($params) + public function __construct($name = '', $params = array()) { + if (!Horde_Util::extensionExists('ldap')) { + throw new Turba_Exception(_("LDAP support is required but the LDAP module is not available or not loaded.")); + } + $params = array_merge(array( 'charset' => '', 'deref' => LDAP_DEREF_NEVER, @@ -53,10 +57,7 @@ class Turba_Driver_Ldap extends Turba_Driver 'server' => 'localhost' ), $params); - parent::__construct($params); - if (!Horde_Util::extensionExists('ldap')) { - throw new Turba_Exception(_("LDAP support is required but the LDAP module is not available or not loaded.")); - } + parent::__construct($name, $params); if (!($this->_ds = @ldap_connect($this->_params['server'], $this->_params['port']))) { throw new Turba_Exception(_("Connection failure")); -- 2.11.0