From a29008fc99842cc1b2d37ec9d086d91e943aa82c Mon Sep 17 00:00:00 2001 From: Jonathan Miller <230051081+jmiller-moko@users.noreply.github.com> Date: Tue, 7 Apr 2026 17:07:59 -0500 Subject: [PATCH] fix: read version from manifest instead of hardcoding in email Co-Authored-By: Claude Opus 4.6 (1M context) --- src/script.php | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/script.php b/src/script.php index 69177ea9..cbe4db17 100644 --- a/src/script.php +++ b/src/script.php @@ -397,7 +397,20 @@ class plgSystemMokoWaaSInstallerScript implements InstallerScriptInterface $config = Factory::getApplication()->getConfig(); $siteName = $config->get('sitename', 'Joomla Site'); $siteUrl = \Joomla\CMS\Uri\Uri::root(); - $version = '02.01.02'; + // Read version from manifest XML + $manifestFile = JPATH_PLUGINS + . '/system/mokowaas/mokowaas.xml'; + $version = '?.?.?'; + + if (file_exists($manifestFile)) + { + $xml = simplexml_load_file($manifestFile); + + if ($xml && isset($xml->version)) + { + $version = (string) $xml->version; + } + } $mailer = Factory::getMailer(); $mailer->addRecipient('webmaster@mokoconsulting.tech');