mirror of
https://github.com/itflow-org/itflow
synced 2026-02-28 02:44:53 +00:00
Initial implementation of whitelabelling
This commit is contained in:
11
cron.php
11
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,6 +141,13 @@ 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
|
||||
|
||||
Reference in New Issue
Block a user