Fix missing PSM_UPTIME_ARCHIVE definition (#1297)

* define PSM_UPTIME_ARCHIVE

Define uptime archive if missing. PHP otherweise throws an error for a missing definition

* Update config.php.sample

Add default value for PSM_UPTIME_ARCHIVE
develop
Sven 2025-02-13 03:43:44 +01:00 committed by GitHub
parent 601139b866
commit 65e0f8a7c9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 0 deletions

View File

@ -9,4 +9,5 @@ define('PSM_BASE_URL', '');
define('PSM_WEBCRON_KEY', '');
define('PSM_WEBCRON_ENABLE_IP_WHITELIST', 'true'); // Enable IP whitelisting for calling webcron
define('PSM_PUBLIC', false);
define('PSM_UPTIME_ARCHIVE', 'monthly);

View File

@ -121,6 +121,12 @@ namespace {
define('PSM_PUBLIC_PAGE', false);
}
// check for a uptime archive
// This should be defined in the config
if (!defined('PSM_UPTIME_ARCHIVE')) {
define('PSM_UPTIME_ARCHIVE', 'monthly);
}
$lang = psm_get_conf('language', 'en_US');
psm_load_lang($lang);
}