fix: read version from manifest instead of hardcoding in email

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-07 17:07:59 -05:00
parent b286fd2012
commit a29008fc99
+14 -1
View File
@@ -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');