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
pull/25/merge
Christian Boltz 6 years ago
parent 9982783481
commit 3bd7ef2b0a
No known key found for this signature in database
GPG Key ID: C6A682EA63C82F1C

@ -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;
}

Loading…
Cancel
Save