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 9 years ago
parent 98659f4005
commit 1d76c5af88

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

Loading…
Cancel
Save