From 8997ec6d72536a9c9f4fd7f605223739285d15f5 Mon Sep 17 00:00:00 2001 From: Sasha Anastasi Date: Mon, 10 Aug 2026 14:15:23 +1200 Subject: [PATCH 1/2] conditional 5.2 check for config require --- nagios.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/nagios.php b/nagios.php index 5f44b7f..9add12d 100644 --- a/nagios.php +++ b/nagios.php @@ -35,7 +35,12 @@ */ // @codingStandardsIgnoreStart // Ignore required to skip codechecker error for no config.php load in class. -require_once(__DIR__ . '/../../../config.php'); +$dirroot = __DIR__ . '/../../../'; +if (substr($_SERVER['SCRIPT_FILENAME'], -42) == '/public/admin/tool/heartbeat/croncheck.php') { + // We are in Moodle 5.2 under the public/ sub path. + $dirroot = __DIR__ . '/../../../../'; +} +require_once($dirroot . 'config.php'); // @codingStandardsIgnoreEnd $format = '%b %d %H:%M:%S'; $now = userdate(time(), $format); From fc47b35ac3f468847d4a2081685597122b6ba702 Mon Sep 17 00:00:00 2001 From: Sasha Anastasi Date: Tue, 11 Aug 2026 09:34:51 +1200 Subject: [PATCH 2/2] version bump is required for PR --- version.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/version.php b/version.php index e34fc10..3f22024 100644 --- a/version.php +++ b/version.php @@ -24,8 +24,8 @@ defined('MOODLE_INTERNAL') || die(); -$plugin->version = 2025121609; -$plugin->release = 2025121609; // Match release exactly to version. +$plugin->version = 2025121610; +$plugin->release = 2025121610; // Match release exactly to version. $plugin->requires = 2020061500; // Support for 3.9 and above, due to the Check API. $plugin->supported = [39, 405]; $plugin->component = 'tool_heartbeat';