From: Jan Schneider Date: Mon, 13 Dec 2010 16:58:40 +0000 (+0100) Subject: Catch HookNotSet. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=325a02d8e8d0b4df3c77dffaa71e95bbe9862591;p=horde.git Catch HookNotSet. --- diff --git a/vilma/lib/Driver.php b/vilma/lib/Driver.php index 276cd1118..5bb2b6a1a 100644 --- a/vilma/lib/Driver.php +++ b/vilma/lib/Driver.php @@ -63,7 +63,10 @@ abstract class Vilma_Driver public function saveDomain($info) { $this->_saveDomain($info); - Horde::callHook('saveDomain', array($info), 'vilma'); + try { + Horde::callHook('saveDomain', array($info), 'vilma'); + } catch (Horde_Exception_HookNotSet $e) { + } } /** @@ -88,7 +91,10 @@ abstract class Vilma_Driver $this->_deleteUser($user['user_id']); } $this->_deleteDomain($domain_id); - Horde::callHook('deleteDomain', array($domain_record['domain_name']), 'vilma'); + try { + Horde::callHook('deleteDomain', array($domain_record['domain_name']), 'vilma'); + } catch (Horde_Exception_HookNotSet $e) { + } } /** diff --git a/vilma/lib/Driver/Qmailldap.php b/vilma/lib/Driver/Qmailldap.php index 9de822575..83ad8d111 100644 --- a/vilma/lib/Driver/Qmailldap.php +++ b/vilma/lib/Driver/Qmailldap.php @@ -316,7 +316,10 @@ class Vilma_Driver_Qmailldap extends Vilma_Driver_Sql } // Stir in any site-local custom LDAP attributes. - $entry = Horde::callHook('getLDAPAttrs', array($entry), 'vilma'); + try { + $entry = Horde::callHook('getLDAPAttrs', array($entry), 'vilma'); + } catch (Horde_Exception_HookNotSet $e) { + } $rdn = 'mail=' . $entry['mail']; $dn = $rdn . ',' . $this->_params['ldap']['basedn']; $res = @ldap_modify($this->_ldap, $dn, $entry); @@ -366,7 +369,10 @@ class Vilma_Driver_Qmailldap extends Vilma_Driver_Sql $entry['userPassword'] = Horde_Auth::getCryptedPassword($info['password'], '', 'ssha', true); // Stir in any site-local custom LDAP attributes. - $entry = Horde::callHook('getLDAPAttrs', array($entry), 'vilma'); + try { + $entry = Horde::callHook('getLDAPAttrs', array($entry), 'vilma'); + } catch (Horde_Exception_HookNotSet $e) { + } $rdn = 'mail=' . $entry['mail']; $dn = $rdn . ',' . $this->_params['ldap']['basedn']; $res = @ldap_add($this->_ldap, $dn, $entry);