mirror of
https://github.com/postfixadmin/postfixadmin.git
synced 2024-09-19 11:12:15 +02:00
scripts/examples/vacation-cron.php: add db_get_boolean() call, this should let it work on postgresql too
This commit is contained in:
parent
06a7bb7fb6
commit
fa56b1ccb8
@ -21,7 +21,10 @@ require_once(__DIR__ . '/../../public/common.php');
|
||||
define('POSTFIXADMIN_CLI', 1);
|
||||
|
||||
$table_vacation = table_by_key('vacation');
|
||||
$vacations_that_need_deactivating = db_query_all("SELECT * FROM $table_vacation WHERE activeuntil <= NOW() AND active = 1 ");
|
||||
|
||||
$active = db_get_boolean(1);
|
||||
|
||||
$vacations_that_need_deactivating = db_query_all("SELECT * FROM $table_vacation WHERE activeuntil <= NOW() AND active = :active ", ['active' => $active]);
|
||||
|
||||
foreach ($vacations_that_need_deactivating as $row) {
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user