- set used-ticket-cycle directly as INTERVAL for the cronjob
This commit is contained in:
@@ -21,17 +21,6 @@
|
||||
* RESET USED TICKETS COUNTER
|
||||
*/
|
||||
|
||||
fwrite($debugHandler, 'Used tickets reset run started...' . "\n");
|
||||
$now = time();
|
||||
$cycle = $settings['ticket']['reset_cycle'];
|
||||
|
||||
if($cycle == '0'
|
||||
|| ($cycle == '1' && (date("j", $now) == '1' || date("j", $now) == '7' || date("j", $now) == '14' || date("j", $now) == '21'))
|
||||
|| ($cycle == '2' && date("j", $now) == '1')
|
||||
|| ($cycle == '3' && date("dm", $now) == '0101'))
|
||||
{
|
||||
fwrite($debugHandler, 'Resetting customers used ticket counter' . "\n");
|
||||
$db->query("UPDATE `" . TABLE_PANEL_CUSTOMERS . "` SET `tickets_used` = '0'");
|
||||
}
|
||||
|
||||
?>
|
||||
fwrite($debugHandler, 'Resetting customers used ticket counter' . "\n");
|
||||
$cronlog->logAction(CRON_ACTION, LOG_INFO, "Resetting customers used ticket counter");
|
||||
$db->query("UPDATE `" . TABLE_PANEL_CUSTOMERS . "` SET `tickets_used` = '0'");
|
||||
|
||||
Reference in New Issue
Block a user