Compare commits
21 Commits
Author | SHA1 | Date |
---|---|---|
Robot | eb512e60c4 | |
Robot | 29dbbcf275 | |
Robot | 83e4b75e04 | |
Robot | bf740da58e | |
Robot | b3191d5e4e | |
Robot | d58227804b | |
Robot | 8d6f7e79a6 | |
Robot | 1126619f2b | |
Robot | b33815ba5d | |
Robot | 0ace252e96 | |
Robot | 8ae32f85bd | |
Robot | ce8c6673b1 | |
Robot | dea75fd1f1 | |
Robot | 9a74e84c34 | |
Robot | 3c58d91baa | |
Robot | a8d7d0ed1b | |
Robot | b00547501f | |
Robot | bc0469b023 | |
Robot | 52e7dab781 | |
Robot | ada1693582 | |
Robot | 4793332c53 |
|
@ -15,7 +15,8 @@ defined('_JEXEC') or die('Restricted access');
|
|||
use Joomla\CMS\Application\CMSApplication;
|
||||
use Joomla\CMS\Plugin\CMSPlugin;
|
||||
use Joomla\Registry\Registry;
|
||||
use VDM\Joomla\Utilities\ArrayHelper;
|
||||
use VDM\Joomla\Utilities\ArrayHelper;
|
||||
use VDM\Joomla\Componentbuilder\Compiler\Factory;
|
||||
|
||||
JLoader::register('ComponentbuilderHelper', JPATH_ADMINISTRATOR . '/components/com_componentbuilder/helpers/componentbuilder.php');
|
||||
|
||||
|
@ -536,7 +537,7 @@ class PlgExtensionComponentbuilderActionLogCompiler extends CMSPlugin
|
|||
// only check if there are active
|
||||
if (ArrayHelper::check($this->componentsActive))
|
||||
{
|
||||
return in_array((int) CFactory::_('Config')->component_id, $this->componentsActive);
|
||||
return in_array((int) Factory::_('Config')->component_id, $this->componentsActive);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<extension type="plugin" version="3.10" group="extension" method="upgrade">
|
||||
<name>PLG_EXTENSION_COMPONENTBUILDERACTIONLOGCOMPILER</name>
|
||||
<creationDate>9th March, 2024</creationDate>
|
||||
<creationDate>16th May, 2024</creationDate>
|
||||
<author>Llewellyn van der Merwe</author>
|
||||
<authorEmail>joomla@vdm.io</authorEmail>
|
||||
<authorUrl>https://dev.vdm.io</authorUrl>
|
||||
|
|
73
script.php
73
script.php
|
@ -48,79 +48,6 @@ class plgExtensionComponentbuilderActionLogCompilerInstallerScript
|
|||
|
||||
if ('install' === $route)
|
||||
{
|
||||
// needs fix
|
||||
|
||||
|
||||
// check that componentbuilder is installed
|
||||
$pathToCore = JPATH_ADMINISTRATOR . '/components/com_componentbuilder/helpers/componentbuilder.php';
|
||||
if (!JFile::exists($pathToCore))
|
||||
{
|
||||
$app->enqueueMessage('Joomla Component Builder must first be installed from <a href="https://www.joomlacomponentbuilder.com/ " target="_blank">Joomla Component Builder</a>.', '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)
|
||||
{
|
||||
// get the version
|
||||
$jcbVersion = explode('.', $manifest->version);
|
||||
// check that we have JCB 3.0.0 or higher installed
|
||||
if (count($jcbVersion) == 3 && $jcbVersion[0] >= 3 &&
|
||||
(
|
||||
($jcbVersion[0] == 3 && $jcbVersion[1] == 0 && $jcbVersion[2] >= 0) ||
|
||||
($jcbVersion[0] == 3 && $jcbVersion[1] > 0) ||
|
||||
$jcbVersion[0] > 3)
|
||||
)
|
||||
{
|
||||
$blockInstall = false;
|
||||
}
|
||||
}
|
||||
|
||||
// allow install if all conditions are met
|
||||
if ($blockInstall)
|
||||
{
|
||||
$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';
|
||||
if (!JFile::exists($pathToCore))
|
||||
{
|
||||
$app->enqueueMessage('Joomla Component Builder must first be installed from <a href="https://www.joomlacomponentbuilder.com/ " target="_blank">Joomla Component Builder</a>.', '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)
|
||||
{
|
||||
// get the version
|
||||
$jcbVersion = explode('.', $manifest->version);
|
||||
// check that we have JCB 2.10.13 or higher installed
|
||||
if (count($jcbVersion) == 3 && (($jcbVersion[0] == 2 && $jcbVersion[1] >= 10 && (($jcbVersion[1] == 10 && $jcbVersion[2] >= 13) || ($jcbVersion[1] > 10))) || $jcbVersion[0] >= 3))
|
||||
{
|
||||
$blockInstall = false;
|
||||
}
|
||||
}
|
||||
// allow install if all conditions are met
|
||||
if ($blockInstall)
|
||||
{
|
||||
$app->enqueueMessage('Please upgrade to JCB 2.10.13 or higher before installing this plugin.', 'error');
|
||||
return false;
|
||||
}
|
||||
|
||||
// check that componentbuilder is installed
|
||||
$pathToCore = JPATH_ADMINISTRATOR . '/components/com_componentbuilder/helpers/componentbuilder.php';
|
||||
if (!JFile::exists($pathToCore))
|
||||
|
|
Loading…
Reference in New Issue