- set correct initial cronjob-active-values
- set correct cronjob-active-values when updating
This commit is contained in:
@@ -984,11 +984,11 @@ CREATE TABLE IF NOT EXISTS `cronjobs_run` (
|
|||||||
# Dumping data for table `panel_phpconfigs`
|
# Dumping data for table `panel_phpconfigs`
|
||||||
#
|
#
|
||||||
|
|
||||||
INSERT INTO `cronjobs_run` (`id`, `module`, `cronfile`, `interval`, `desc_lng_key`) VALUES (1, 'froxlor/core', 'cron_tasks.php', '5 MINUTE', 'cron_tasks');
|
INSERT INTO `cronjobs_run` (`id`, `module`, `cronfile`, `interval`, `isactive`, `desc_lng_key`) VALUES (1, 'froxlor/core', 'cron_tasks.php', '5 MINUTE', '1', 'cron_tasks');
|
||||||
INSERT INTO `cronjobs_run` (`id`, `module`, `cronfile`, `interval`, `desc_lng_key`) VALUES (2, 'froxlor/core', 'cron_legacy.php', '5 MINUTE', 'cron_legacy');
|
INSERT INTO `cronjobs_run` (`id`, `module`, `cronfile`, `interval`, `isactive`, `desc_lng_key`) VALUES (2, 'froxlor/core', 'cron_legacy.php', '5 MINUTE', '1', 'cron_legacy');
|
||||||
INSERT INTO `cronjobs_run` (`id`, `module`, `cronfile`, `interval`, `desc_lng_key`) VALUES (3, 'froxlor/aps', 'cron_apsinstaller.php', '5 MINUTE', 'cron_apsinstaller');
|
INSERT INTO `cronjobs_run` (`id`, `module`, `cronfile`, `interval`, `isactive`, `desc_lng_key`) VALUES (3, 'froxlor/aps', 'cron_apsinstaller.php', '5 MINUTE', '0', 'cron_apsinstaller');
|
||||||
INSERT INTO `cronjobs_run` (`id`, `module`, `cronfile`, `interval`, `desc_lng_key`) VALUES (4, 'froxlor/autoresponder', 'cron_autoresponder.php', '5 MINUTE', 'cron_autoresponder');
|
INSERT INTO `cronjobs_run` (`id`, `module`, `cronfile`, `interval`, `isactive`, `desc_lng_key`) VALUES (4, 'froxlor/autoresponder', 'cron_autoresponder.php', '5 MINUTE', '0', 'cron_autoresponder');
|
||||||
INSERT INTO `cronjobs_run` (`id`, `module`, `cronfile`, `interval`, `desc_lng_key`) VALUES (5, 'froxlor/aps', 'cron_apsupdater.php', '1 HOUR', 'cron_apsupdater');
|
INSERT INTO `cronjobs_run` (`id`, `module`, `cronfile`, `interval`, `isactive`, `desc_lng_key`) VALUES (5, 'froxlor/aps', 'cron_apsupdater.php', '1 HOUR', '0', 'cron_apsupdater');
|
||||||
INSERT INTO `cronjobs_run` (`id`, `module`, `cronfile`, `interval`, `desc_lng_key`) VALUES (6, 'froxlor/core', 'cron_traffic.php', '1 DAY', 'cron_traffic');
|
INSERT INTO `cronjobs_run` (`id`, `module`, `cronfile`, `interval`, `isactive`, `desc_lng_key`) VALUES (6, 'froxlor/core', 'cron_traffic.php', '1 DAY', '1', 'cron_traffic');
|
||||||
INSERT INTO `cronjobs_run` (`id`, `module`, `cronfile`, `interval`, `desc_lng_key`) VALUES (7, 'froxlor/ticket', 'cron_used_tickets_reset.php', '1 MONTH', 'cron_ticketsreset');
|
INSERT INTO `cronjobs_run` (`id`, `module`, `cronfile`, `interval`, `isactive`, `desc_lng_key`) VALUES (7, 'froxlor/ticket', 'cron_used_tickets_reset.php', '1 MONTH', '1', 'cron_ticketsreset');
|
||||||
INSERT INTO `cronjobs_run` (`id`, `module`, `cronfile`, `interval`, `desc_lng_key`) VALUES (8, 'froxlor/ticket', 'cron_ticketarchive.php', '1 MONTH', 'cron_ticketarchive');
|
INSERT INTO `cronjobs_run` (`id`, `module`, `cronfile`, `interval`, `isactive`, `desc_lng_key`) VALUES (8, 'froxlor/ticket', 'cron_ticketarchive.php', '1 MONTH', '1', 'cron_ticketarchive');
|
||||||
|
|||||||
@@ -281,14 +281,35 @@ if(isFroxlorVersion('0.9-r3'))
|
|||||||
lastStepStatus(0);
|
lastStepStatus(0);
|
||||||
showUpdateStep("Inserting new values into table");
|
showUpdateStep("Inserting new values into table");
|
||||||
|
|
||||||
$db->query("INSERT INTO `cronjobs_run` (`id`, `module`, `cronfile`, `interval`, `desc_lng_key`) VALUES (1, 'froxlor/core', 'cron_tasks.php', '5 MINUTE', 'cron_tasks');");
|
// checking for active ticket-module
|
||||||
$db->query("INSERT INTO `cronjobs_run` (`id`, `module`, `cronfile`, `interval`, `desc_lng_key`) VALUES (2, 'froxlor/core', 'cron_legacy.php', '5 MINUTE', 'cron_legacy');");
|
$ticket_active = 0;
|
||||||
$db->query("INSERT INTO `cronjobs_run` (`id`, `module`, `cronfile`, `interval`, `desc_lng_key`) VALUES (3, 'froxlor/aps', 'cron_apsinstaller.php', '5 MINUTE', 'cron_apsinstaller');");
|
if((int)$settings['ticket']['enabled'] == 1)
|
||||||
$db->query("INSERT INTO `cronjobs_run` (`id`, `module`, `cronfile`, `interval`, `desc_lng_key`) VALUES (4, 'froxlor/autoresponder', 'cron_autoresponder.php', '5 MINUTE', 'cron_autoresponder');");
|
{
|
||||||
$db->query("INSERT INTO `cronjobs_run` (`id`, `module`, `cronfile`, `interval`, `desc_lng_key`) VALUES (5, 'froxlor/aps', 'cron_apsupdater.php', '1 HOUR', 'cron_apsupdater');");
|
$ticket_active = 1;
|
||||||
$db->query("INSERT INTO `cronjobs_run` (`id`, `module`, `cronfile`, `interval`, `desc_lng_key`) VALUES (6, 'froxlor/core', 'cron_traffic.php', '1 DAY', 'cron_traffic');");
|
}
|
||||||
$db->query("INSERT INTO `cronjobs_run` (`id`, `module`, `cronfile`, `interval`, `desc_lng_key`) VALUES (7, 'froxlor/ticket', 'cron_used_tickets_reset.php', '1 MONTH', 'cron_ticketsreset');");
|
|
||||||
$db->query("INSERT INTO `cronjobs_run` (`id`, `module`, `cronfile`, `interval`, `desc_lng_key`) VALUES (8, 'froxlor/ticket', 'cron_ticketarchive.php', '1 MONTH', 'cron_ticketarchive');");
|
// checking for active aps-module
|
||||||
|
$aps_active = 0;
|
||||||
|
if((int)$settings['aps']['aps_active'] == 1)
|
||||||
|
{
|
||||||
|
$aps_active = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
// checking for active autoresponder-module
|
||||||
|
$ar_active = 0;
|
||||||
|
if((int)$settings['autoresponder']['autoresponder_active'] == 1)
|
||||||
|
{
|
||||||
|
$ar_active = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
$db->query("INSERT INTO `cronjobs_run` (`id`, `module`, `cronfile`, `interval`, `isactive`, `desc_lng_key`) VALUES (1, 'froxlor/core', 'cron_tasks.php', '5 MINUTE', '1', cron_tasks');");
|
||||||
|
$db->query("INSERT INTO `cronjobs_run` (`id`, `module`, `cronfile`, `interval`, `isactive`, `desc_lng_key`) VALUES (2, 'froxlor/core', 'cron_legacy.php', '5 MINUTE', '1', 'cron_legacy');");
|
||||||
|
$db->query("INSERT INTO `cronjobs_run` (`id`, `module`, `cronfile`, `interval`, `isactive`, `desc_lng_key`) VALUES (3, 'froxlor/aps', 'cron_apsinstaller.php', '5 MINUTE', ".$aps_active.", 'cron_apsinstaller');");
|
||||||
|
$db->query("INSERT INTO `cronjobs_run` (`id`, `module`, `cronfile`, `interval`, `isactive`, `desc_lng_key`) VALUES (4, 'froxlor/autoresponder', 'cron_autoresponder.php', '5 MINUTE', ".$ar_active.", 'cron_autoresponder');");
|
||||||
|
$db->query("INSERT INTO `cronjobs_run` (`id`, `module`, `cronfile`, `interval`, `isactive`, `desc_lng_key`) VALUES (5, 'froxlor/aps', 'cron_apsupdater.php', '1 HOUR', ".$aps_active.", 'cron_apsupdater');");
|
||||||
|
$db->query("INSERT INTO `cronjobs_run` (`id`, `module`, `cronfile`, `interval`, `isactive`, `desc_lng_key`) VALUES (6, 'froxlor/core', 'cron_traffic.php', '1 DAY', '1', 'cron_traffic');");
|
||||||
|
$db->query("INSERT INTO `cronjobs_run` (`id`, `module`, `cronfile`, `interval`, `isactive`, `desc_lng_key`) VALUES (7, 'froxlor/ticket', 'cron_used_tickets_reset.php', '1 MONTH', '".$ticket_active."', 'cron_ticketsreset');");
|
||||||
|
$db->query("INSERT INTO `cronjobs_run` (`id`, `module`, `cronfile`, `interval`, `isactive`, `desc_lng_key`) VALUES (8, 'froxlor/ticket', 'cron_ticketarchive.php', '1 MONTH', '".$ticket_active."', 'cron_ticketarchive');");
|
||||||
|
|
||||||
lastStepStatus(0);
|
lastStepStatus(0);
|
||||||
showUpdateStep("Updating old settings values");
|
showUpdateStep("Updating old settings values");
|
||||||
|
|||||||
Reference in New Issue
Block a user