From d7da102b67de9fd8d61a8595748f730381092d39 Mon Sep 17 00:00:00 2001 From: aB0t Date: Mon, 27 Feb 2023 00:41:45 +0200 Subject: [PATCH] Update on v1.1.4 (beta for next version) Here's an update on the current version, which includes changes towards the next release still in beta. --- componentbuilderprivacycompiler.xml | 2 +- script.php | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/componentbuilderprivacycompiler.xml b/componentbuilderprivacycompiler.xml index 7aea5d3..f21e061 100644 --- a/componentbuilderprivacycompiler.xml +++ b/componentbuilderprivacycompiler.xml @@ -1,7 +1,7 @@ PLG_EXTENSION_COMPONENTBUILDERPRIVACYCOMPILER - 15th February, 2023 + 26th February, 2023 Llewellyn van der Merwe joomla@vdm.io https://dev.vdm.io diff --git a/script.php b/script.php index 9e62a7b..0913c67 100644 --- a/script.php +++ b/script.php @@ -57,10 +57,13 @@ class plgExtensionComponentbuilderPrivacyCompilerInstallerScript $app->enqueueMessage('Joomla Component Builder must first be installed from Joomla Component Builder.', 'error'); return false; } + // load the helper class JLoader::register('ComponentbuilderHelper', JPATH_ADMINISTRATOR . '/components/com_componentbuilder/helpers/componentbuilder.php'); + // block install $blockInstall = true; + // check the version of JCB $manifest = ComponentbuilderHelper::manifest(); if (isset($manifest->version) && strpos($manifest->version, '.') !== false) @@ -78,12 +81,14 @@ class plgExtensionComponentbuilderPrivacyCompilerInstallerScript $blockInstall = false; } } + // allow install if all conditions are met if ($blockInstall) { - $app->enqueueMessage('Please upgrade to JCB-Pro v3.0.0 or higher before installing this plugin.', 'error'); + $app->enqueueMessage('Please upgrade to JCB v3.0.0 or higher before installing this plugin.', 'error'); return false; - } + } + // check that componentbuilder is installed $pathToCore = JPATH_ADMINISTRATOR . '/components/com_componentbuilder/helpers/componentbuilder.php';