From fc4aa78137c7817cdbb5b6fab9f5ed4dc4ba93c9 Mon Sep 17 00:00:00 2001 From: Klaus Leithoff Date: Wed, 17 Feb 2010 14:22:48 +0000 Subject: [PATCH] improving session control for felamimail bosieve async_vacation. Force sessions to be rebuilded --- felamimail/inc/class.bosieve.inc.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/felamimail/inc/class.bosieve.inc.php b/felamimail/inc/class.bosieve.inc.php index 7de2ecbe75..c13900df1e 100644 --- a/felamimail/inc/class.bosieve.inc.php +++ b/felamimail/inc/class.bosieve.inc.php @@ -150,11 +150,15 @@ function async_vacation($_vacation) { if ($this->debug) error_log(__CLASS__.'::'.__METHOD__.'('.print_r($_vacation,true).')'); + // unset the fm_preferences session object, to force the reload/rebuild + $GLOBALS['egw']->session->appsession('fm_preferences','felamimail',serialize(array())); + $GLOBALS['egw']->session->appsession('session_data','emailadmin',serialize(array())); + $_restoreSession = false; // as in async, each call may be for a different user $bopreferences = CreateObject('felamimail.bopreferences',$_restoreSession); $mailPreferences = $bopreferences->getPreferences(); $icServer = $mailPreferences->getIncomingServer(0); - + //error_log(__METHOD__.$icServer->loginName); if ($this->_connect($icServer,$icServer->loginName) === true) { $this->setVacation($_vacation['scriptName'],$_vacation); // we need to logout, so further vacation's get processed