Merge branch 'master' into techbar
fixed
This commit is contained in:
19
cron.php
19
cron.php
@@ -75,6 +75,10 @@ $config_log_retention = intval($row['config_log_retention']);
|
||||
// Set Currency Format
|
||||
$currency_format = numfmt_create($company_locale, NumberFormatter::CURRENCY);
|
||||
|
||||
// White label
|
||||
$config_whitelabel_enabled = intval($row['config_whitelabel_enabled']);
|
||||
$config_whitelabel_key = $row['config_whitelabel_key'];
|
||||
|
||||
$argv = $_SERVER['argv'];
|
||||
|
||||
// Check cron is enabled
|
||||
@@ -137,13 +141,20 @@ mysqli_query($mysqli, "DELETE FROM logs WHERE log_created_at < CURDATE() - INTER
|
||||
* ###############################################################################################################
|
||||
*/
|
||||
|
||||
// Whitelabel - Disable if expired/invalid
|
||||
if ($config_whitelabel_enabled && !validateWhitelabelKey($config_whitelabel_key)) {
|
||||
mysqli_query($mysqli, "UPDATE settings SET config_whitelabel_enabled = 0, config_whitelabel_key = '' WHERE company_id = 1");
|
||||
mysqli_query($mysqli, "INSERT INTO notifications SET notification_type = 'Settings', notification = 'White-labelling was disabled due to expired/invalid key', notification_action = 'settings_modules.php'");
|
||||
}
|
||||
|
||||
|
||||
// GET NOTIFICATIONS
|
||||
|
||||
// DOMAINS EXPIRING
|
||||
|
||||
if($config_enable_alert_domain_expire == 1){
|
||||
|
||||
$domainAlertArray = [1,7,14,30,90,120];
|
||||
$domainAlertArray = [1,7,14,30,90];
|
||||
|
||||
foreach ($domainAlertArray as $day) {
|
||||
|
||||
@@ -173,7 +184,7 @@ if($config_enable_alert_domain_expire == 1){
|
||||
|
||||
// CERTIFICATES EXPIRING
|
||||
|
||||
$certificateAlertArray = [1,7,14,30,90,120];
|
||||
$certificateAlertArray = [1,7,14,30,90];
|
||||
|
||||
foreach ($certificateAlertArray as $day) {
|
||||
|
||||
@@ -203,7 +214,7 @@ foreach ($certificateAlertArray as $day) {
|
||||
|
||||
// Asset Warranties Expiring
|
||||
|
||||
$warranty_alert_array = [1,7,14,30,90,120];
|
||||
$warranty_alert_array = [1,7,14,30,90];
|
||||
|
||||
foreach ($warranty_alert_array as $day) {
|
||||
|
||||
@@ -685,7 +696,7 @@ while ($row = mysqli_fetch_array($sql_recurring_expenses)) {
|
||||
|
||||
// TELEMETRY
|
||||
|
||||
if ($config_telemetry > 0 OR $config_telemetry == 2) {
|
||||
if ($config_telemetry > 0 || $config_telemetry == 2) {
|
||||
|
||||
$current_version = exec("git rev-parse HEAD");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user