Release of v5.0.0-beta1

Add the compiler menu back. Fix the CustomfolderlistField #1094.
This commit is contained in:
2024-04-07 12:01:31 +02:00
parent 2b7b8f90e1
commit b988010b79
21 changed files with 59 additions and 184 deletions

View File

@@ -46,18 +46,15 @@ class CustomfolderlistField extends ListField
$localfolder = ComponentHelper::getParams('com_componentbuilder')->get('custom_folder_path', JPATH_COMPONENT_ADMINISTRATOR.'/custom');
// set the default
$options[] = Html::_('select.option', '', Text::sprintf('COM_COMPONENTBUILDER_PLEASE_ADD_FOLDERS_TO_S',$localfolder));
// import all needed classes
jimport('joomla.filesystem.file');
jimport('joomla.filesystem.folder');
// setup the folder if it does not exist
if (!JFolder::exists($localfolder))
if (!\JFolder::exists($localfolder))
{
JFolder::create($localfolder);
\JFolder::create($localfolder);
}
// now check if there are files in the folder
if ($folders = JFolder::folders($localfolder))
if ($folders = \JFolder::folders($localfolder))
{
$options = array();
$options = [];
foreach ($folders as $folder)
{
$options[] = Html::_('select.option', $folder, $folder);