Author: leithoff
New Revision: 36859
URL: http://svn.stylite.de/viewvc/egroupware?rev=36859&view=rev
Log:
- eMail: improve connection handling and recovery on problems regarded as minor. offer user the possibility to reset the connection on failure
Modified:
trunk/emailadmin/inc/class.defaultimap.inc.php
trunk/felamimail/inc/class.felamimail_bo.inc.php
trunk/felamimail/inc/class.uifelamimail.inc.php
trunk/felamimail/lang/egw_de.lang
trunk/felamimail/lang/egw_en.lang
Modified: trunk/emailadmin/inc/class.defaultimap.inc.php
URL: http://svn.stylite.de/viewvc/egroupware/trunk/emailadmin/inc/class.defaultimap.inc.php?rev=36859&r1=36858&r2=36859&view=diff
— trunk/emailadmin/inc/class.defaultimap.inc.php (original)
+++ trunk/emailadmin/inc/class.defaultimap.inc.php Fri Oct 7 12:22:26 2011
@@ -509,7 +509,7 @@
function openConnection($_adminConnection=false, $_timeout=20)
{
//error_log(METHOD.function_backtrace());
-
//error_log(__METHOD__.__LINE__.($_adminConnection?' Adminconnection':'').array2string($this));
-
//error_log(__METHOD__.__LINE__.($_adminConnection?' Adminconnection':' ').array2string($this)); unset($this->_connectionErrorObject); if($_adminConnection) {
Modified: trunk/felamimail/inc/class.felamimail_bo.inc.php
URL: http://svn.stylite.de/viewvc/egroupware/trunk/felamimail/inc/class.felamimail_bo.inc.php?rev=36859&r1=36858&r2=36859&view=diff
— trunk/felamimail/inc/class.felamimail_bo.inc.php (original)
+++ trunk/felamimail/inc/class.felamimail_bo.inc.php Fri Oct 7 12:22:26 2011
@@ -3425,9 +3425,17 @@
if (is_null($isError)) $isError =& egw_cache::getSession(‘email’,‘icServerIMAP_connectionError’);
if ( isset($isError[$_icServerID]) || PEAR::isError($this->icServer->_connectionErrorObject))
{
-
//error_log(__METHOD__.__LINE__.' failed for Reason:'.$isError[$_icServerID]); -
$this->errorMessage = ($isError[$_icServerID]?$isError[$_icServerID]:$this->icServer->_connectionErrorObject->message); -
return false;
-
if (trim($isError[$_icServerID])==',') -
{ -
//error_log(__METHOD__.__LINE__.' Connection seemed to have failed in the past, no real reason given, try to recover on our own.'); -
emailadmin_bo::unsetCachedObjects($_icServerID); -
} -
else -
{ -
//error_log(__METHOD__.__LINE__.' failed for Reason:'.$isError[$_icServerID]); -
$this->errorMessage = ($isError[$_icServerID]?$isError[$_icServerID]:$this->icServer->_connectionErrorObject->message); -
return false; -
} } if (!is_object($this->mailPreferences)) {
@@ -3467,7 +3475,7 @@
$isError[$_icServerID] = ($tretval?$tretval->message:$this->icServer->_connectionErrorObject->message);
if (self::$debug)
{
-
error_log(__METHOD__.__LINE__." # failed to open new Connection ProfileID:".$_icServerID.' Status:'.print_r($this->icServer->_connected,true).' Message:'.$this->icServer->_connectionErrorObject->message.' called from '.function_backtrace());
-
error_log(__METHOD__.__LINE__." # failed to open new Connection ProfileID:".$_icServerID.' Status:'.print_r($this->icServer->_connected,true).' Message:'.$isError[$_icServerID].' called from '.function_backtrace()); error_log(__METHOD__.__LINE__.' # Instance='.$GLOBALS['egw_info']['user']['domain'].', User='.$GLOBALS['egw_info']['user']['account_lid']); } }
Modified: trunk/felamimail/inc/class.uifelamimail.inc.php
URL: http://svn.stylite.de/viewvc/egroupware/trunk/felamimail/inc/class.uifelamimail.inc.php?rev=36859&r1=36858&r2=36859&view=diff
— trunk/felamimail/inc/class.uifelamimail.inc.php (original)
+++ trunk/felamimail/inc/class.uifelamimail.inc.php Fri Oct 7 12:22:26 2011
@@ -626,11 +626,16 @@
function viewMainScreen()
{
-
$connectionReset = false; // get passed messages if (!empty($_GET["msg"])) $message[] = html::purify($_GET["msg"]); if (!empty($_GET["message"])) $message[] = html::purify($_GET["message"]); -
if (!empty($_GET["resetConnection"])) $connectionReset = html::purify($_GET["resetConnection"]); unset($_GET["msg"]); unset($_GET["message"]); -
unset($_GET["resetConnection"]); -
//error_log(__METHOD__.__LINE__.$connectionReset); -
#printf ("this->uifelamimail->viewMainScreen() start: %s<br>",date("H:i:s",mktime())); $bofilter =& $this->bofilter; $uiwidgets = CreateObject('felamimail.uiwidgets');
@@ -641,6 +646,11 @@
if (isset($GLOBALS[‘egw_info’][‘user’][‘preferences’][‘felamimail’][‘ActiveProfileID’]))
self::$icServerID = (int)$GLOBALS[‘egw_info’][‘user’][‘preferences’][‘felamimail’][‘ActiveProfileID’];
//_debug_array(self::$icServerID);
-
if ($connectionReset) -
{ -
error_log(__METHOD__.__LINE__.' Connection Reset triggered:'.$connectionReset.' for Profile with ID:'.self::$icServerID); -
emailadmin_bo::unsetCachedObjects(self::$icServerID); -
} if (is_object($preferences)) $imapServer = $preferences->getIncomingServer(self::$icServerID); //_debug_array($imapServer); //_debug_array($preferences->preferences);
@@ -912,7 +922,10 @@
$this->t->set_var(‘select_status’, $selectStatus);
if($this->connectionStatus === false) {
-
$this->t->set_var('connection_error_message', lang($this->bofelamimail->getErrorMessage()));
-
$linkData = array('menuaction' => 'felamimail.uifelamimail.viewMainScreen','resetConnection'=>true); -
$this->t->set_var('connection_error_message', lang($this->bofelamimail->getErrorMessage()). -
'<br/><a href="'.egw::link('/index.php',$linkData).'">'. -
lang('You may try to reset the connection using this link.').'</a>'); $this->t->set_var('message', ' '); $this->t->parse('header_rows','error_message',True); } else {
Modified: trunk/felamimail/lang/egw_de.lang
URL: http://svn.stylite.de/viewvc/egroupware/trunk/felamimail/lang/egw_de.lang?rev=36859&r1=36858&r2=36859&view=diff
— trunk/felamimail/lang/egw_de.lang (original)
+++ trunk/felamimail/lang/egw_de.lang Fri Oct 7 12:22:26 2011
@@ -535,4 +535,5 @@
you can either choose to save as infolog or tracker, not both. felamimail de Sie können eine Mail entweder als Infolog ODER als Verfolgungsqueue Eintrag speichern, nicht als beides gleichzeitig.
you can use %1 for the above start-date and %2 for the end-date. felamimail de Sie können %1 für das obige Startdatum und %2 für das Endedatum verwenden.
you have received a new message on the felamimail de Sie haben eine neue Nachricht erhalten:
+you may try to reset the connection using this link. felamimail de Sie können versuchen die Verbindung wiederherzustellen, indem Sie auf diesen Link klicken.
your message to %1 was displayed. felamimail de Ihre Nachricht an %1 wurde angezeigt.
Modified: trunk/felamimail/lang/egw_en.lang
URL: http://svn.stylite.de/viewvc/egroupware/trunk/felamimail/lang/egw_en.lang?rev=36859&r1=36858&r2=36859&view=diff
— trunk/felamimail/lang/egw_en.lang (original)
+++ trunk/felamimail/lang/egw_en.lang Fri Oct 7 12:22:26 2011
@@ -546,4 +546,5 @@
you can either choose to save as infolog or tracker, not both. felamimail en You can either choose to save as InfoLog OR Tracker, not both.
you can use %1 for the above start-date and %2 for the end-date. felamimail en You can use %1 for the above start date and %2 for the end date.
you have received a new message on the felamimail en You have received a new message on the
+you may try to reset the connection using this link. felamimail en You may try to reset the connection using this link.
your message to %1 was displayed. felamimail en Your message to %1 was displayed.
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security
threats, fraudulent activity, and more. Splunk takes this data and makes
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2dcopy2
eGroupWare-cvs mailing list
eGroupWare-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/egroupware-cvs