prod to stage

# Conflicts:
#	includes/filter_header.php
#	scripts/cron.php
#	scripts/cron_certificate_refresher.php
#	scripts/cron_domain_refresher.php
#	scripts/cron_mail_queue.php
#	scripts/cron_ticket_email_parser.php
This commit is contained in:
2025-11-10 09:32:02 -05:00
423 changed files with 21183 additions and 18623 deletions

View File

@@ -4,7 +4,7 @@
chdir(dirname(__FILE__));
// Ensure we're running from command line
if (php_sapi_name() !== 'cli') {
if (php_sapi_name() !== 'cli' && $_GET['key'] !== 'GxKo679Jm5xjOtQ81Zo3ywWMVcNB5wgP') {
die("This script must be run from the command line.\n");
}
@@ -406,10 +406,15 @@ if (mysqli_num_rows($sql_recurring_tickets) > 0) {
addToMailQueue($data);
// Set the next run date
if ($frequency == "weekly") {
// Note: We seemingly have to initialize a new datetime for each loop to avoid stacking the dates
if ($frequency == "three days") {
$now = new DateTime();
$next_run = date_add($now, date_interval_create_from_date_string('3 days'));
} elseif ($frequency == "weekly") {
$now = new DateTime();
$next_run = date_add($now, date_interval_create_from_date_string('1 week'));
} elseif ($frequency == "biweekly") {
$now = new DateTime();
$next_run = date_add($now, date_interval_create_from_date_string('2 weeks'));
} elseif ($frequency == "monthly") {
$now = new DateTime();
$next_run = date_add($now, date_interval_create_from_date_string('1 month'));