From ab8a7d4c23830de7475f492172b6f501df446832 Mon Sep 17 00:00:00 2001 From: Hadi Nategh Date: Thu, 14 Oct 2021 11:34:56 +0200 Subject: [PATCH] Remove none existing mail connectionTimeout preference. Fixes warning of Undefined array key 'connectionTimeout'. --- api/src/Mail.php | 4 +--- api/src/Mail/Imap.php | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/api/src/Mail.php b/api/src/Mail.php index 4e4d56d44f..5f83d84086 100644 --- a/api/src/Mail.php +++ b/api/src/Mail.php @@ -1000,9 +1000,7 @@ class Mail */ static function getTimeOut($_use='IMAP') { - $timeout = $GLOBALS['egw_info']['user']['preferences']['mail']['connectionTimeout']; - if (empty($timeout)) $timeout = ($_use=='SIEVE'?10:20); // this is the default value - return $timeout; + return $_use=='SIEVE' ? 10 : 20; // this is the default value } /** diff --git a/api/src/Mail/Imap.php b/api/src/Mail/Imap.php index b24eb9f8ed..fcc545d176 100644 --- a/api/src/Mail/Imap.php +++ b/api/src/Mail/Imap.php @@ -360,9 +360,7 @@ class Imap extends Horde_Imap_Client_Socket implements Imap\PushIface */ static function getTimeOut($_use='IMAP') { - if (empty($timeout = $GLOBALS['egw_info']['user']['preferences']['mail']['connectionTimeout']) || !((int)$timeout > 0)) - $timeout = $_use == 'SIEVE' ? 10 : 20; // this is the default value - return $timeout; + return $_use == 'SIEVE' ? 10 : 20; // this is the default value } /**