1
0
mirror of https://github.com/postfixadmin/postfixadmin.git synced 2026-01-12 22:51:27 +03:00

adjust pgsql $row['v_active'] only if vacation is enabled

This avoids an "Undefined index" warning if vacation is disabled.

Fixes: https://github.com/postfixadmin/postfixadmin/issues/118
This commit is contained in:
Christian Boltz
2018-01-13 18:10:13 +01:00
parent 9982783481
commit 3bd7ef2b0a

View File

@@ -243,10 +243,13 @@ if ($result['rows'] > 0) {
$row['modified'] = date('Y-m-d H:i', strtotime($row['modified']));
$row['created'] = date('Y-m-d H:i', strtotime($row['created']));
$row['active']=('t'==$row['active']) ? 1 : 0;
if($row['v_active'] == NULL) {
$row['v_active'] = 'f';
if (Config::bool('vacation_control_admin')) {
if($row['v_active'] == NULL) {
$row['v_active'] = 'f';
}
$row['v_active']=('t'==$row['v_active']) ? 1 : 0;
}
$row['v_active']=('t'==$row['v_active']) ? 1 : 0;
}
$tMailbox[] = $row;
}