make sure there is an mailObject before you try to do anything else

This commit is contained in:
Klaus Leithoff 2009-11-28 09:51:24 +00:00
parent 6549ed94a2
commit a23919ea4b
2 changed files with 8 additions and 8 deletions

View File

@ -447,16 +447,16 @@
function viewMainScreen()
{
#printf ("this->uifelamimail->viewMainScreen() start: %s<br>",date("H:i:s",mktime()));
$bopreferences =& CreateObject('felamimail.bopreferences');
$bofilter =& CreateObject('felamimail.bofilter');
$uiwidgets =& CreateObject('felamimail.uiwidgets');
$bopreferences = CreateObject('felamimail.bopreferences');
$bofilter = CreateObject('felamimail.bofilter');
$uiwidgets = CreateObject('felamimail.uiwidgets');
$preferences =& $bopreferences->getPreferences();
$preferences =& $bopreferences->getPreferences();
$urlMailbox = urlencode($this->mailbox);
$imapServer =& $preferences->getIncomingServer(0);
if (is_object($preferences)) $imapServer =& $preferences->getIncomingServer(0);
#_debug_array($imapServer);
$activeIdentity =& $preferences->getIdentity(0);
if (is_object($preferences)) $activeIdentity =& $preferences->getIdentity(0);
#_debug_array($activeIdentity);
$maxMessages =& $GLOBALS['egw_info']['user']['preferences']['common']['maxmatchs'];
if (empty($maxMessages)) $maxMessages = 23; // this seems to be the number off messages that fit the height of the folder tree

View File

@ -94,7 +94,7 @@
$file['Manage Folders'] = $GLOBALS['egw']->link('/index.php','menuaction=felamimail.uipreferences.listFolder');
}
$icServer = $preferences->getIncomingServer(0);
if (is_object($preferences)) $icServer = $preferences->getIncomingServer(0);
if(is_a($icServer, 'defaultimap')) {
if($icServer->enableSieve)
{
@ -113,7 +113,7 @@
}
}
$ogServer = $preferences->getOutgoingServer(0);
if (is_object($preferences)) $ogServer = $preferences->getOutgoingServer(0);
if(is_a($ogServer, 'defaultsmtp')) {
if($ogServer->editForwardingAddress)
{