Update on v1.1.0 (beta for next version)
Here's an update on the current version, which includes changes towards the next release still in beta.
This commit is contained in:
parent
c2b42c6583
commit
5ee6e007d3
@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<extension type="plugin" version="4" group="extension" method="upgrade">
|
<extension type="plugin" version="4" group="extension" method="upgrade">
|
||||||
<name>PLG_EXTENSION_COMPONENTBUILDERPOWERSAUTOLOADERCOMPILER</name>
|
<name>PLG_EXTENSION_COMPONENTBUILDERPOWERSAUTOLOADERCOMPILER</name>
|
||||||
<creationDate>15th February, 2023</creationDate>
|
<creationDate>26th February, 2023</creationDate>
|
||||||
<author>Llewellyn van der Merwe</author>
|
<author>Llewellyn van der Merwe</author>
|
||||||
<authorEmail>joomla@vdm.io</authorEmail>
|
<authorEmail>joomla@vdm.io</authorEmail>
|
||||||
<authorUrl>https://dev.vdm.io</authorUrl>
|
<authorUrl>https://dev.vdm.io</authorUrl>
|
||||||
|
208
script.php
208
script.php
@ -57,10 +57,13 @@ class plgExtensionComponentbuilderPowersAutoloaderCompilerInstallerScript
|
|||||||
$app->enqueueMessage('Joomla Component Builder must first be installed from <a href="https://www.joomlacomponentbuilder.com/ " target="_blank">Joomla Component Builder</a>.', 'error');
|
$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;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// load the helper class
|
// load the helper class
|
||||||
JLoader::register('ComponentbuilderHelper', JPATH_ADMINISTRATOR . '/components/com_componentbuilder/helpers/componentbuilder.php');
|
JLoader::register('ComponentbuilderHelper', JPATH_ADMINISTRATOR . '/components/com_componentbuilder/helpers/componentbuilder.php');
|
||||||
|
|
||||||
// block install
|
// block install
|
||||||
$blockInstall = true;
|
$blockInstall = true;
|
||||||
|
|
||||||
// check the version of JCB
|
// check the version of JCB
|
||||||
$manifest = ComponentbuilderHelper::manifest();
|
$manifest = ComponentbuilderHelper::manifest();
|
||||||
if (isset($manifest->version) && strpos($manifest->version, '.') !== false)
|
if (isset($manifest->version) && strpos($manifest->version, '.') !== false)
|
||||||
@ -78,13 +81,15 @@ class plgExtensionComponentbuilderPowersAutoloaderCompilerInstallerScript
|
|||||||
$blockInstall = false;
|
$blockInstall = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// allow install if all conditions are met
|
// allow install if all conditions are met
|
||||||
if ($blockInstall)
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// check that componentbuilder is installed
|
// check that componentbuilder is installed
|
||||||
$pathToCore = JPATH_ADMINISTRATOR . '/components/com_componentbuilder/helpers/componentbuilder.php';
|
$pathToCore = JPATH_ADMINISTRATOR . '/components/com_componentbuilder/helpers/componentbuilder.php';
|
||||||
if (!JFile::exists($pathToCore))
|
if (!JFile::exists($pathToCore))
|
||||||
@ -155,10 +160,13 @@ class plgExtensionComponentbuilderPowersAutoloaderCompilerInstallerScript
|
|||||||
$app->enqueueMessage('Joomla Component Builder must first be installed from <a href="https://www.joomlacomponentbuilder.com/ " target="_blank">Joomla Component Builder</a>.', 'error');
|
$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;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// load the helper class
|
// load the helper class
|
||||||
JLoader::register('ComponentbuilderHelper', JPATH_ADMINISTRATOR . '/components/com_componentbuilder/helpers/componentbuilder.php');
|
JLoader::register('ComponentbuilderHelper', JPATH_ADMINISTRATOR . '/components/com_componentbuilder/helpers/componentbuilder.php');
|
||||||
|
|
||||||
// block install
|
// block install
|
||||||
$blockInstall = true;
|
$blockInstall = true;
|
||||||
|
|
||||||
// check the version of JCB
|
// check the version of JCB
|
||||||
$manifest = ComponentbuilderHelper::manifest();
|
$manifest = ComponentbuilderHelper::manifest();
|
||||||
if (isset($manifest->version) && strpos($manifest->version, '.') !== false)
|
if (isset($manifest->version) && strpos($manifest->version, '.') !== false)
|
||||||
@ -176,14 +184,16 @@ class plgExtensionComponentbuilderPowersAutoloaderCompilerInstallerScript
|
|||||||
$blockInstall = false;
|
$blockInstall = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// allow install if all conditions are met
|
// allow install if all conditions are met
|
||||||
if ($blockInstall)
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// check that componentbuilder is installed
|
// check that componentbuilder is installed
|
||||||
$pathToCore = JPATH_ADMINISTRATOR . '/components/com_componentbuilder/helpers/componentbuilder.php';
|
$pathToCore = JPATH_ADMINISTRATOR . '/components/com_componentbuilder/helpers/componentbuilder.php';
|
||||||
if (!JFile::exists($pathToCore))
|
if (!JFile::exists($pathToCore))
|
||||||
@ -191,10 +201,13 @@ class plgExtensionComponentbuilderPowersAutoloaderCompilerInstallerScript
|
|||||||
$app->enqueueMessage('Joomla Component Builder must first be installed from <a href="https://www.joomlacomponentbuilder.com/ " target="_blank">Joomla Component Builder</a>.', 'error');
|
$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;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// load the helper class
|
// load the helper class
|
||||||
JLoader::register('ComponentbuilderHelper', JPATH_ADMINISTRATOR . '/components/com_componentbuilder/helpers/componentbuilder.php');
|
JLoader::register('ComponentbuilderHelper', JPATH_ADMINISTRATOR . '/components/com_componentbuilder/helpers/componentbuilder.php');
|
||||||
|
|
||||||
// block install
|
// block install
|
||||||
$blockInstall = true;
|
$blockInstall = true;
|
||||||
|
|
||||||
// check the version of JCB
|
// check the version of JCB
|
||||||
$manifest = ComponentbuilderHelper::manifest();
|
$manifest = ComponentbuilderHelper::manifest();
|
||||||
if (isset($manifest->version) && strpos($manifest->version, '.') !== false)
|
if (isset($manifest->version) && strpos($manifest->version, '.') !== false)
|
||||||
@ -212,14 +225,16 @@ class plgExtensionComponentbuilderPowersAutoloaderCompilerInstallerScript
|
|||||||
$blockInstall = false;
|
$blockInstall = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// allow install if all conditions are met
|
// allow install if all conditions are met
|
||||||
if ($blockInstall)
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// check that componentbuilder is installed
|
// check that componentbuilder is installed
|
||||||
$pathToCore = JPATH_ADMINISTRATOR . '/components/com_componentbuilder/helpers/componentbuilder.php';
|
$pathToCore = JPATH_ADMINISTRATOR . '/components/com_componentbuilder/helpers/componentbuilder.php';
|
||||||
if (!JFile::exists($pathToCore))
|
if (!JFile::exists($pathToCore))
|
||||||
@ -227,10 +242,54 @@ class plgExtensionComponentbuilderPowersAutoloaderCompilerInstallerScript
|
|||||||
$app->enqueueMessage('Joomla Component Builder must first be installed from <a href="https://www.joomlacomponentbuilder.com/ " target="_blank">Joomla Component Builder</a>.', 'error');
|
$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;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// load the helper class
|
// load the helper class
|
||||||
JLoader::register('ComponentbuilderHelper', JPATH_ADMINISTRATOR . '/components/com_componentbuilder/helpers/componentbuilder.php');
|
JLoader::register('ComponentbuilderHelper', JPATH_ADMINISTRATOR . '/components/com_componentbuilder/helpers/componentbuilder.php');
|
||||||
|
|
||||||
// block install
|
// block install
|
||||||
$blockInstall = true;
|
$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.1.18 or higher installed
|
||||||
|
if (count($jcbVersion) == 3 && $jcbVersion[0] >= 3 &&
|
||||||
|
(
|
||||||
|
($jcbVersion[0] == 3 && $jcbVersion[1] == 1 && $jcbVersion[2] >= 18) ||
|
||||||
|
($jcbVersion[0] == 3 && $jcbVersion[1] > 1) ||
|
||||||
|
$jcbVersion[0] > 3)
|
||||||
|
)
|
||||||
|
{
|
||||||
|
$blockInstall = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// allow install if all conditions are met
|
||||||
|
if ($blockInstall)
|
||||||
|
{
|
||||||
|
$app->enqueueMessage('Please upgrade to JCB v3.1.18 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
|
// check the version of JCB
|
||||||
$manifest = ComponentbuilderHelper::manifest();
|
$manifest = ComponentbuilderHelper::manifest();
|
||||||
if (isset($manifest->version) && strpos($manifest->version, '.') !== false)
|
if (isset($manifest->version) && strpos($manifest->version, '.') !== false)
|
||||||
@ -248,14 +307,16 @@ class plgExtensionComponentbuilderPowersAutoloaderCompilerInstallerScript
|
|||||||
$blockInstall = false;
|
$blockInstall = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// allow install if all conditions are met
|
// allow install if all conditions are met
|
||||||
if ($blockInstall)
|
if ($blockInstall)
|
||||||
{
|
{
|
||||||
$app->enqueueMessage('Please upgrade to JCB-Pro v3.0.14 or higher before installing this plugin.', 'error');
|
$app->enqueueMessage('Please upgrade to JCB v3.0.14 or higher before installing this plugin.', 'error');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// check that componentbuilder is installed
|
// check that componentbuilder is installed
|
||||||
$pathToCore = JPATH_ADMINISTRATOR . '/components/com_componentbuilder/helpers/componentbuilder.php';
|
$pathToCore = JPATH_ADMINISTRATOR . '/components/com_componentbuilder/helpers/componentbuilder.php';
|
||||||
if (!JFile::exists($pathToCore))
|
if (!JFile::exists($pathToCore))
|
||||||
@ -263,10 +324,54 @@ class plgExtensionComponentbuilderPowersAutoloaderCompilerInstallerScript
|
|||||||
$app->enqueueMessage('Joomla Component Builder must first be installed from <a href="https://www.joomlacomponentbuilder.com/ " target="_blank">Joomla Component Builder</a>.', 'error');
|
$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;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// load the helper class
|
// load the helper class
|
||||||
JLoader::register('ComponentbuilderHelper', JPATH_ADMINISTRATOR . '/components/com_componentbuilder/helpers/componentbuilder.php');
|
JLoader::register('ComponentbuilderHelper', JPATH_ADMINISTRATOR . '/components/com_componentbuilder/helpers/componentbuilder.php');
|
||||||
|
|
||||||
// block install
|
// block install
|
||||||
$blockInstall = true;
|
$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.1.18 or higher installed
|
||||||
|
if (count($jcbVersion) == 3 && $jcbVersion[0] >= 3 &&
|
||||||
|
(
|
||||||
|
($jcbVersion[0] == 3 && $jcbVersion[1] == 1 && $jcbVersion[2] >= 18) ||
|
||||||
|
($jcbVersion[0] == 3 && $jcbVersion[1] > 1) ||
|
||||||
|
$jcbVersion[0] > 3)
|
||||||
|
)
|
||||||
|
{
|
||||||
|
$blockInstall = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// allow install if all conditions are met
|
||||||
|
if ($blockInstall)
|
||||||
|
{
|
||||||
|
$app->enqueueMessage('Please upgrade to JCB v3.1.18 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
|
// check the version of JCB
|
||||||
$manifest = ComponentbuilderHelper::manifest();
|
$manifest = ComponentbuilderHelper::manifest();
|
||||||
if (isset($manifest->version) && strpos($manifest->version, '.') !== false)
|
if (isset($manifest->version) && strpos($manifest->version, '.') !== false)
|
||||||
@ -284,14 +389,16 @@ class plgExtensionComponentbuilderPowersAutoloaderCompilerInstallerScript
|
|||||||
$blockInstall = false;
|
$blockInstall = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// allow install if all conditions are met
|
// allow install if all conditions are met
|
||||||
if ($blockInstall)
|
if ($blockInstall)
|
||||||
{
|
{
|
||||||
$app->enqueueMessage('Please upgrade to JCB-Pro v3.0.14 or higher before installing this plugin.', 'error');
|
$app->enqueueMessage('Please upgrade to JCB v3.0.14 or higher before installing this plugin.', 'error');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// check that componentbuilder is installed
|
// check that componentbuilder is installed
|
||||||
$pathToCore = JPATH_ADMINISTRATOR . '/components/com_componentbuilder/helpers/componentbuilder.php';
|
$pathToCore = JPATH_ADMINISTRATOR . '/components/com_componentbuilder/helpers/componentbuilder.php';
|
||||||
if (!JFile::exists($pathToCore))
|
if (!JFile::exists($pathToCore))
|
||||||
@ -299,10 +406,13 @@ class plgExtensionComponentbuilderPowersAutoloaderCompilerInstallerScript
|
|||||||
$app->enqueueMessage('Joomla Component Builder must first be installed from <a href="https://www.joomlacomponentbuilder.com/ " target="_blank">Joomla Component Builder</a>.', 'error');
|
$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;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// load the helper class
|
// load the helper class
|
||||||
JLoader::register('ComponentbuilderHelper', JPATH_ADMINISTRATOR . '/components/com_componentbuilder/helpers/componentbuilder.php');
|
JLoader::register('ComponentbuilderHelper', JPATH_ADMINISTRATOR . '/components/com_componentbuilder/helpers/componentbuilder.php');
|
||||||
|
|
||||||
// block install
|
// block install
|
||||||
$blockInstall = true;
|
$blockInstall = true;
|
||||||
|
|
||||||
// check the version of JCB
|
// check the version of JCB
|
||||||
$manifest = ComponentbuilderHelper::manifest();
|
$manifest = ComponentbuilderHelper::manifest();
|
||||||
if (isset($manifest->version) && strpos($manifest->version, '.') !== false)
|
if (isset($manifest->version) && strpos($manifest->version, '.') !== false)
|
||||||
@ -320,14 +430,16 @@ class plgExtensionComponentbuilderPowersAutoloaderCompilerInstallerScript
|
|||||||
$blockInstall = false;
|
$blockInstall = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// allow install if all conditions are met
|
// allow install if all conditions are met
|
||||||
if ($blockInstall)
|
if ($blockInstall)
|
||||||
{
|
{
|
||||||
$app->enqueueMessage('Please upgrade to JCB-Pro v3.0.14 or higher before installing this plugin.', 'error');
|
$app->enqueueMessage('Please upgrade to JCB v3.0.14 or higher before installing this plugin.', 'error');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// check that componentbuilder is installed
|
// check that componentbuilder is installed
|
||||||
$pathToCore = JPATH_ADMINISTRATOR . '/components/com_componentbuilder/helpers/componentbuilder.php';
|
$pathToCore = JPATH_ADMINISTRATOR . '/components/com_componentbuilder/helpers/componentbuilder.php';
|
||||||
if (!JFile::exists($pathToCore))
|
if (!JFile::exists($pathToCore))
|
||||||
@ -335,10 +447,13 @@ class plgExtensionComponentbuilderPowersAutoloaderCompilerInstallerScript
|
|||||||
$app->enqueueMessage('Joomla Component Builder must first be installed from <a href="https://www.joomlacomponentbuilder.com/ " target="_blank">Joomla Component Builder</a>.', 'error');
|
$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;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// load the helper class
|
// load the helper class
|
||||||
JLoader::register('ComponentbuilderHelper', JPATH_ADMINISTRATOR . '/components/com_componentbuilder/helpers/componentbuilder.php');
|
JLoader::register('ComponentbuilderHelper', JPATH_ADMINISTRATOR . '/components/com_componentbuilder/helpers/componentbuilder.php');
|
||||||
|
|
||||||
// block install
|
// block install
|
||||||
$blockInstall = true;
|
$blockInstall = true;
|
||||||
|
|
||||||
// check the version of JCB
|
// check the version of JCB
|
||||||
$manifest = ComponentbuilderHelper::manifest();
|
$manifest = ComponentbuilderHelper::manifest();
|
||||||
if (isset($manifest->version) && strpos($manifest->version, '.') !== false)
|
if (isset($manifest->version) && strpos($manifest->version, '.') !== false)
|
||||||
@ -356,14 +471,16 @@ class plgExtensionComponentbuilderPowersAutoloaderCompilerInstallerScript
|
|||||||
$blockInstall = false;
|
$blockInstall = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// allow install if all conditions are met
|
// allow install if all conditions are met
|
||||||
if ($blockInstall)
|
if ($blockInstall)
|
||||||
{
|
{
|
||||||
$app->enqueueMessage('Please upgrade to JCB-Pro v3.0.14 or higher before installing this plugin.', 'error');
|
$app->enqueueMessage('Please upgrade to JCB v3.0.14 or higher before installing this plugin.', 'error');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// check that componentbuilder is installed
|
// check that componentbuilder is installed
|
||||||
$pathToCore = JPATH_ADMINISTRATOR . '/components/com_componentbuilder/helpers/componentbuilder.php';
|
$pathToCore = JPATH_ADMINISTRATOR . '/components/com_componentbuilder/helpers/componentbuilder.php';
|
||||||
if (!JFile::exists($pathToCore))
|
if (!JFile::exists($pathToCore))
|
||||||
@ -371,82 +488,13 @@ class plgExtensionComponentbuilderPowersAutoloaderCompilerInstallerScript
|
|||||||
$app->enqueueMessage('Joomla Component Builder must first be installed from <a href="https://www.joomlacomponentbuilder.com/ " target="_blank">Joomla Component Builder</a>.', 'error');
|
$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;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// load the helper class
|
// load the helper class
|
||||||
JLoader::register('ComponentbuilderHelper', JPATH_ADMINISTRATOR . '/components/com_componentbuilder/helpers/componentbuilder.php');
|
JLoader::register('ComponentbuilderHelper', JPATH_ADMINISTRATOR . '/components/com_componentbuilder/helpers/componentbuilder.php');
|
||||||
|
|
||||||
// block install
|
// block install
|
||||||
$blockInstall = true;
|
$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.14 or higher installed
|
|
||||||
if (count($jcbVersion) == 3 && $jcbVersion[0] >= 3 &&
|
|
||||||
(
|
|
||||||
($jcbVersion[0] == 3 && $jcbVersion[1] == 0 && $jcbVersion[2] >= 14) ||
|
|
||||||
($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-Pro v3.0.14 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 3.0.14 or higher installed
|
|
||||||
if (count($jcbVersion) == 3 && $jcbVersion[0] >= 3 &&
|
|
||||||
(
|
|
||||||
($jcbVersion[0] == 3 && $jcbVersion[1] == 0 && $jcbVersion[2] >= 14) ||
|
|
||||||
($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-Pro v3.0.14 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
|
// check the version of JCB
|
||||||
$manifest = ComponentbuilderHelper::manifest();
|
$manifest = ComponentbuilderHelper::manifest();
|
||||||
if (isset($manifest->version) && strpos($manifest->version, '.') !== false)
|
if (isset($manifest->version) && strpos($manifest->version, '.') !== false)
|
||||||
@ -464,12 +512,14 @@ class plgExtensionComponentbuilderPowersAutoloaderCompilerInstallerScript
|
|||||||
$blockInstall = false;
|
$blockInstall = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// allow install if all conditions are met
|
// allow install if all conditions are met
|
||||||
if ($blockInstall)
|
if ($blockInstall)
|
||||||
{
|
{
|
||||||
$app->enqueueMessage('Please upgrade to JCB-Pro v3.0.10 or higher before installing this plugin.', 'error');
|
$app->enqueueMessage('Please upgrade to JCB v3.0.10 or higher before installing this plugin.', 'error');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
Reference in New Issue
Block a user