diff --git a/mail/inc/class.mail_bo.inc.php b/mail/inc/class.mail_bo.inc.php index d0b288bcfa..8ef6024106 100644 --- a/mail/inc/class.mail_bo.inc.php +++ b/mail/inc/class.mail_bo.inc.php @@ -19,89 +19,5 @@ */ class mail_bo extends emailadmin_imapbase { - - /** - * Hook stuff - */ - - /** - * hook to add account - * - * this function is a wrapper function for emailadmin - * - * @param _hookValues contains the hook values as array - * @return nothing - */ - function addAccount($_hookValues) - { - error_log(__METHOD__.' ('.__LINE__.') '.' NOT DONE JET!'); - //$_profile_id=???? - //$icServer = emailadmin_account::read($_profile_id)->imapServer(); - //$ogServer = emailadmin_account::read($_profile_id)->smtpServer(); - -/* - if(($icServer instanceof defaultimap)) { - // if not connected, try opening an admin connection - if (!$icServer->_connected) $this->openConnection($this->profileID,true); - $icServer->addAccount($_hookValues); - if ($icServer->_connected) $this->closeConnection(); // close connection afterwards - } - if(($ogServer instanceof emailadmin_smtp)) { - $ogServer->addAccount($_hookValues); - } -*/ - } - - /** - * hook to delete account - * - * this function is a wrapper function for emailadmin - * - * @param _hookValues contains the hook values as array - * @return nothing - */ - function deleteAccount($_hookValues) - { - error_log(__METHOD__.' ('.__LINE__.') '.' NOT DONE JET!'); - //$_profile_id=???? - //$icServer = emailadmin_account::read($_profile_id)->imapServer(); - //$ogServer = emailadmin_account::read($_profile_id)->smtpServer(); -/* - if(($icServer instanceof defaultimap)) { - //try to connect with admin rights, when not connected - if (!$icServer->_connected) $this->openConnection($this->profileID,true); - $icServer->deleteAccount($_hookValues); - if ($icServer->_connected) $this->closeConnection(); // close connection - } - - if(($ogServer instanceof emailadmin_smtp)) { - $ogServer->deleteAccount($_hookValues); - } -*/ - } - - /** - * hook to update account - * - * this function is a wrapper function for emailadmin - * - * @param _hookValues contains the hook values as array - * @return nothing - */ - function updateAccount($_hookValues) - { - error_log(__METHOD__.' ('.__LINE__.') '.' NOT DONE JET!'); - //$_profile_id=???? - //$icServer = emailadmin_account::read($_profile_id)->imapServer(); - //$ogServer = emailadmin_account::read($_profile_id)->smtpServer(); -/* - if(($icServer instanceof defaultimap)) { - $icServer->updateAccount($_hookValues); - } - - if(($ogServer instanceof emailadmin_smtp)) { - $ogServer->updateAccount($_hookValues); - } -*/ - } + } diff --git a/mail/inc/class.mail_hooks.inc.php b/mail/inc/class.mail_hooks.inc.php index 32ead604ae..6755360682 100644 --- a/mail/inc/class.mail_hooks.inc.php +++ b/mail/inc/class.mail_hooks.inc.php @@ -15,33 +15,6 @@ */ class mail_hooks { -/** - * Several hooks calling an instanciated mail_bo, which need to use the mail_bo::getInstance() singelton - * - * @param string|array $hookData - */ - static public function accountHooks($hookData) - { - if (($default_profile_id = emailadmin_bo::getDefaultAccID())) - { - $mail_bo = mail_bo::forceEAProfileLoad($default_profile_id); - - switch(is_array($hookData) ? $hookData['location'] : $hookData) - { - case 'addaccount': - $mail_bo->addAccount($hookData); - break; - case 'deleteaccount': - $mail_bo->deleteAccount($hookData); - break; - case 'editaccount': - $mail_bo->updateAccount($hookData); - break; - } - emailadmin_bo::unsetCachedObjects($default_profile_id); - } - } - /** * Menu for Admin >> Edit accounts */ diff --git a/mail/setup/setup.inc.php b/mail/setup/setup.inc.php index f350296c97..1cba012bf9 100644 --- a/mail/setup/setup.inc.php +++ b/mail/setup/setup.inc.php @@ -28,9 +28,6 @@ $setup_info['mail']['maintainer_email'] = 'info@stylite.de'; $setup_info['mail']['tables'] = array(); // former felamimail tables are used by mail_sopreferences /* The hooks this app includes, needed for hooks registration */ -$setup_info['mail']['hooks']['addaccount'] = 'mail_hooks::accountHooks'; -$setup_info['mail']['hooks']['deleteaccount'] = 'mail_hooks::accountHooks'; -$setup_info['mail']['hooks']['editaccount'] = 'mail_hooks::accountHooks'; $setup_info['mail']['hooks']['search_link'] = 'mail_hooks::search_link'; $setup_info['mail']['hooks']['admin'] = 'mail_hooks::admin'; $setup_info['mail']['hooks']['settings'] = 'mail_hooks::settings';