fixing a problem regarding the session handling and content interchange of felamimail if notification for new emails is switched on. bofelamimail session information is now buffered and reapplied after notification run.

This commit is contained in:
Klaus Leithoff 2009-11-26 15:40:12 +00:00
parent 0e60f6ac29
commit e9b9c61a60

View File

@ -135,6 +135,8 @@ class notifications_ajax {
require_once(EGW_INCLUDE_ROOT.'/felamimail/inc/class.bofelamimail.inc.php'); require_once(EGW_INCLUDE_ROOT.'/felamimail/inc/class.bofelamimail.inc.php');
$bofelamimail = new bofelamimail($GLOBALS['egw']->translation->charset()); $bofelamimail = new bofelamimail($GLOBALS['egw']->translation->charset());
// buffer felamimail sessiondata, as they are needed for information exchange by the app itself
$bufferFMailSession = $bofelamimail->sessionData;
if(!$bofelamimail->openConnection()) { if(!$bofelamimail->openConnection()) {
// TODO: This is ugly. Log a bit nicer! // TODO: This is ugly. Log a bit nicer!
error_log(self::_appname.' (user: '.$this->recipient->account_lid.'): cannot connect to mailbox. Please check your prefs!'); error_log(self::_appname.' (user: '.$this->recipient->account_lid.'): cannot connect to mailbox. Please check your prefs!');
@ -164,7 +166,9 @@ class notifications_ajax {
} }
} }
} }
// restore the felamimail session data, as they are needed by the app itself
$bofelamimail->sessionData = $bufferFMailSession;
$bofelamimail->saveSessionData();
if(count($recent_messages) > 0) { if(count($recent_messages) > 0) {
// create notify message // create notify message
$notification_subject = lang("You've got new mail"); $notification_subject = lang("You've got new mail");