Release of v4.0.0-rc6

Fix the customfolderlist field. #1120.
This commit is contained in:
2024-05-06 07:43:47 +02:00
parent 43f7b5c54d
commit a0df7bc893
9 changed files with 46 additions and 21 deletions

View File

@@ -16,6 +16,7 @@ use Joomla\CMS\Language\Text;
use Joomla\CMS\HTML\HTMLHelper as Html;
use Joomla\CMS\Component\ComponentHelper;
use VDM\Component\Componentbuilder\Administrator\Helper\ComponentbuilderHelper;
use Joomla\CMS\Filesystem\Folder;
// No direct access to this file
\defined('_JEXEC') or die;
@@ -47,12 +48,12 @@ class CustomfolderlistField extends ListField
// set the default
$options[] = Html::_('select.option', '', Text::sprintf('COM_COMPONENTBUILDER_PLEASE_ADD_FOLDERS_TO_S',$localfolder));
// setup the folder if it does not exist
if (!\JFolder::exists($localfolder))
if (!Folder::exists($localfolder))
{
\JFolder::create($localfolder);
Folder::create($localfolder);
}
// now check if there are files in the folder
if ($folders = \JFolder::folders($localfolder))
if ($folders = Folder::folders($localfolder))
{
$options = [];
foreach ($folders as $folder)