From 09ecd29a916c805c5a8610a523a9d8901a5c714f Mon Sep 17 00:00:00 2001 From: nathan Date: Mon, 5 Dec 2022 16:27:39 -0700 Subject: [PATCH] Mail: Fix mail vacation notice widget did not hide --- mail/inc/class.mail_ui.inc.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/mail/inc/class.mail_ui.inc.php b/mail/inc/class.mail_ui.inc.php index a983f170d2..750543a4db 100644 --- a/mail/inc/class.mail_ui.inc.php +++ b/mail/inc/class.mail_ui.inc.php @@ -4774,13 +4774,15 @@ $filter['before']= date("d-M-Y", $cutoffdate2); $dtfrmt = $GLOBALS['egw_info']['user']['preferences']['common']['dateformat']; $refreshData['vacationnotice'] = lang('Vacation notice is active'); $refreshData['vacationrange'] = ($vacation['status']=='by_date'? Api\DateTime::server2user($vacation['start_date'],$dtfrmt,true).($vacation['end_date']>$vacation['start_date']?'->'.Api\DateTime::server2user($vacation['end_date']+ 24*3600-1,$dtfrmt,true):''):''); - if ($vacation['status'] == 'by_date' && $vacation['end_date']+ 24*3600 < time())$refreshData = ''; + if($vacation['status'] == 'by_date' && $vacation['end_date'] + 24 * 3600 < time()) + { + $refreshData = null; + } } } if ($vacation==false) { - $refreshData['vacationnotice'] = ''; - $refreshData['vacationrange'] = ''; + $refreshData = null; } $response = Api\Json\Response::get(); $response->call('app.mail.mail_refreshVacationNotice',$refreshData);