VacationHandler: Fill 'cache' field on INSERT

The 'cache' field is a leftover from PostfixAdmin 2.2 and unused (except
if someone still uses an ancient vacation.pl). However, MySQL in strict
mode errors out if isn't included in INSERTs because it doesn't have a
default value.

Fixes https://sourceforge.net/p/postfixadmin/bugs/345/


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1845 a1433add-5e2c-0410-b055-b7f2511e0802
pull/19/head
Christian Boltz 8 years ago
parent 98659f4005
commit 1d76c5af88

@ -21,7 +21,7 @@ class VacationHandler extends PFAHandler {
'body' => pacol( 1, 1, 0, 'text', 'pUsersVacation_body' , '' , '' ),
'activefrom' => pacol( 1, 1, 1, 'text', 'pUsersVacation_activefrom' , '' , '' ),
'activeuntil' => pacol( 1, 1, 1, 'text', 'pUsersVacation_activeuntil' , '' , '' ),
# 'cache' => pacol( 0, 0, 0, 'text', '' , '' , '' ), # leftover from 2.2
'cache' => pacol( 0, 0, 0, 'text', '' , '' , '' ), # leftover from 2.2
'active' => pacol( 1, 1, 1, 'bool', 'active' , '' , 1 ),
'created' => pacol( 0, 0, 1, 'ts', 'created' , '' ),
'modified' => pacol( 0, 0, 1, 'ts', 'last_modified' , '' ),
@ -180,6 +180,7 @@ class VacationHandler extends PFAHandler {
'active' => db_get_boolean(true),
'activefrom' => $activeFrom,
'activeuntil' => $activeUntil,
'cache' => '',
);
// is there an entry in the vacaton table for the user, or do we need to insert?

Loading…
Cancel
Save