Release of v3.2.1-rc6

Fix the customfolderlist field. #1120.
This commit is contained in:
2024-05-06 07:40:18 +02:00
parent 6e0e8ae860
commit 96ce50bc12
9 changed files with 47 additions and 21 deletions

View File

@ -15,6 +15,8 @@ defined('_JEXEC') or die('Restricted access');
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\HTML\HTMLHelper as Html;
use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\Filesystem\Folder;
// import the list field type
jimport('joomla.form.helper');
@ -44,12 +46,12 @@ class JFormFieldCustomfolderlist extends JFormFieldList
// 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)