mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-25 09:23:28 +01:00
fixed PHP Fatal error no method emailadmin_imapbase::accountHooks stalling account saving
This commit is contained in:
parent
b0db615411
commit
e60bc19f6f
@ -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);
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -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
|
||||
*/
|
||||
|
@ -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';
|
||||
|
Loading…
Reference in New Issue
Block a user