From 65e0f8a7c9862d753bb8f219671aad4f5774aff4 Mon Sep 17 00:00:00 2001 From: Sven Date: Thu, 13 Feb 2025 03:43:44 +0100 Subject: [PATCH] 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 --- config.php.sample | 1 + src/bootstrap.php | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/config.php.sample b/config.php.sample index 61b2c271..bc5056fc 100644 --- a/config.php.sample +++ b/config.php.sample @@ -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); diff --git a/src/bootstrap.php b/src/bootstrap.php index e6dd3338..a6ba0054 100644 --- a/src/bootstrap.php +++ b/src/bootstrap.php @@ -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); }