Remove none existing mail connectionTimeout preference. Fixes warning of Undefined array key 'connectionTimeout'.

This commit is contained in:
Hadi Nategh 2021-10-14 11:34:56 +02:00
parent 60536222ce
commit ab8a7d4c23
2 changed files with 2 additions and 6 deletions

View File

@ -1000,9 +1000,7 @@ class Mail
*/ */
static function getTimeOut($_use='IMAP') static function getTimeOut($_use='IMAP')
{ {
$timeout = $GLOBALS['egw_info']['user']['preferences']['mail']['connectionTimeout']; return $_use=='SIEVE' ? 10 : 20; // this is the default value
if (empty($timeout)) $timeout = ($_use=='SIEVE'?10:20); // this is the default value
return $timeout;
} }
/** /**

View File

@ -360,9 +360,7 @@ class Imap extends Horde_Imap_Client_Socket implements Imap\PushIface
*/ */
static function getTimeOut($_use='IMAP') static function getTimeOut($_use='IMAP')
{ {
if (empty($timeout = $GLOBALS['egw_info']['user']['preferences']['mail']['connectionTimeout']) || !((int)$timeout > 0)) return $_use == 'SIEVE' ? 10 : 20; // this is the default value
$timeout = $_use == 'SIEVE' ? 10 : 20; // this is the default value
return $timeout;
} }
/** /**