mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-28 01:28:53 +01:00
Fix as discussed on the developer list:
Check for the availability of mailpreferences before using them.
This commit is contained in:
parent
de818e86e3
commit
d2a0adfa16
@ -222,14 +222,16 @@
|
|||||||
*/
|
*/
|
||||||
function addAccount($_hookValues)
|
function addAccount($_hookValues)
|
||||||
{
|
{
|
||||||
$icServer = $this->mailPreferences->getIncomingServer(0);
|
if ($this->mailPreferences) {
|
||||||
if(is_a($icServer,'defaultimap')) {
|
$icServer = $this->mailPreferences->getIncomingServer(0);
|
||||||
$icServer->addAccount($_hookValues);
|
if(is_a($icServer,'defaultimap')) {
|
||||||
}
|
$icServer->addAccount($_hookValues);
|
||||||
|
}
|
||||||
|
|
||||||
$ogServer = $this->mailPreferences->getOutgoingServer(0);
|
$ogServer = $this->mailPreferences->getOutgoingServer(0);
|
||||||
if(is_a($ogServer,'defaultsmtp')) {
|
if(is_a($ogServer,'defaultsmtp')) {
|
||||||
$ogServer->addAccount($_hookValues);
|
$ogServer->addAccount($_hookValues);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -524,14 +526,16 @@
|
|||||||
|
|
||||||
function deleteAccount($_hookValues)
|
function deleteAccount($_hookValues)
|
||||||
{
|
{
|
||||||
$icServer = $this->mailPreferences->getIncomingServer(0);
|
if ($this->mailPreferences) {
|
||||||
if(is_a($icServer,'defaultimap')) {
|
$icServer = $this->mailPreferences->getIncomingServer(0);
|
||||||
$icServer->deleteAccount($_hookValues);
|
if(is_a($icServer,'defaultimap')) {
|
||||||
}
|
$icServer->deleteAccount($_hookValues);
|
||||||
|
}
|
||||||
|
|
||||||
$ogServer = $this->mailPreferences->getOutgoingServer(0);
|
$ogServer = $this->mailPreferences->getOutgoingServer(0);
|
||||||
if(is_a($ogServer,'defaultsmtp')) {
|
if(is_a($ogServer,'defaultsmtp')) {
|
||||||
$ogServer->deleteAccount($_hookValues);
|
$ogServer->deleteAccount($_hookValues);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user