Update on v1.2.1 (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
818a4a9237
commit
4bae832fe1
@ -23,6 +23,7 @@ use VDM\Joomla\Utilities\JsonHelper;
|
||||
use VDM\Joomla\Utilities\ArrayHelper;
|
||||
use VDM\Joomla\Utilities\StringHelper;
|
||||
use VDM\Joomla\Utilities\GetHelper;
|
||||
use Joomla\CMS\Filesystem\Folder;
|
||||
|
||||
/**
|
||||
* Extension - Componentbuilder Language Packaging plugin.
|
||||
@ -443,7 +444,7 @@ class PlgExtensionComponentbuilderLanguagePackaging extends CMSPlugin
|
||||
// set the lang xml name for later
|
||||
$langXMLNames[$main_path] = $langCodeName . '_' . $this->activeComponentsNames[$id] ;
|
||||
// we must check if old folder is found and remove it
|
||||
if (!isset($this->languageTracker[$main_path]) && JFolder::exists($main_path))
|
||||
if (!isset($this->languageTracker[$main_path]) && is_dir($main_path))
|
||||
{
|
||||
// remove the main folder
|
||||
ComponentbuilderHelper::removeFolder($main_path);
|
||||
@ -451,9 +452,9 @@ class PlgExtensionComponentbuilderLanguagePackaging extends CMSPlugin
|
||||
$this->languageTracker[$main_path] = true;
|
||||
}
|
||||
// check if exist and create if not
|
||||
if (!JFolder::exists($main_path))
|
||||
if (!is_dir($main_path))
|
||||
{
|
||||
JFolder::create($main_path);
|
||||
Folder::create($main_path);
|
||||
// count the folder created
|
||||
CFactory::_('Utilities.Counter')->folder++;
|
||||
}
|
||||
@ -480,9 +481,9 @@ class PlgExtensionComponentbuilderLanguagePackaging extends CMSPlugin
|
||||
{
|
||||
$client_path = $main_path . $act['target_client'] . '/';
|
||||
// check if exist and create if not
|
||||
if (!JFolder::exists($client_path))
|
||||
if (!is_dir($client_path))
|
||||
{
|
||||
JFolder::create($client_path);
|
||||
Folder::create($client_path);
|
||||
// count the folder created
|
||||
$this->folderCount++;
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<extension type="plugin" version="3.10" group="extension" method="upgrade">
|
||||
<name>PLG_EXTENSION_COMPONENTBUILDERLANGUAGEPACKAGING</name>
|
||||
<creationDate>29th September, 2024</creationDate>
|
||||
<creationDate>7th October, 2024</creationDate>
|
||||
<author>Llewellyn van der Merwe</author>
|
||||
<authorEmail>joomla@vdm.io</authorEmail>
|
||||
<authorUrl>https://dev.vdm.io</authorUrl>
|
||||
|
@ -50,7 +50,7 @@ class plgExtensionComponentbuilderLanguagePackagingInstallerScript
|
||||
{
|
||||
// check that componentbuilder is installed
|
||||
$pathToCore = JPATH_ADMINISTRATOR . '/components/com_componentbuilder/helpers/componentbuilder.php';
|
||||
if (!JFile::exists($pathToCore))
|
||||
if (!is_file($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;
|
||||
|
Loading…
Reference in New Issue
Block a user