Update on v1.2.0 (changes towards the next release)
Here's an update on the current version, which includes changes towards the next release still in development.
This commit is contained in:
parent
b39c9c5355
commit
2cd4de00ca
@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<extension type="plugin" version="3.10" group="extension" method="upgrade">
|
<extension type="plugin" version="3.10" group="extension" method="upgrade">
|
||||||
<name>PLG_EXTENSION_COMPONENTBUILDERLANGUAGEPACKAGING</name>
|
<name>PLG_EXTENSION_COMPONENTBUILDERLANGUAGEPACKAGING</name>
|
||||||
<creationDate>10th March, 2024</creationDate>
|
<creationDate>11th March, 2024</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>
|
||||||
|
43
script.php
43
script.php
@ -48,49 +48,6 @@ class plgExtensionComponentbuilderLanguagePackagingInstallerScript
|
|||||||
|
|
||||||
if ('install' === $route)
|
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
|
// 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))
|
||||||
|
Loading…
Reference in New Issue
Block a user