Release of v3.2.1-alpha2
Add view list and single name fix. Add component code name fix. Add reset list of powers. Fix missing Factory class in plugin. #1102.
This commit is contained in:
@ -1496,6 +1496,12 @@ class ComponentbuilderModelAdmin_view extends AdminModel
|
||||
{
|
||||
$data['system_name'] = $data['name_single'];
|
||||
}
|
||||
|
||||
// validate that the list and single view name are not the same
|
||||
if ($data['name_single'] === $data['name_list'])
|
||||
{
|
||||
$data['name_list'] .= '_s';
|
||||
}
|
||||
|
||||
// Set the GUID if empty or not valid
|
||||
if (empty($data['guid']) && $data['id'] > 0)
|
||||
|
@ -40,24 +40,21 @@ class JFormFieldCustomfolderlist extends JFormFieldList
|
||||
protected function getOptions()
|
||||
{
|
||||
// get custom folder folder
|
||||
$localfolder = JComponentHelper::getParams('com_componentbuilder')->get('custom_folder_path', JPATH_COMPONENT_ADMINISTRATOR.'/custom');
|
||||
$localfolder = ComponentHelper::getParams('com_componentbuilder')->get('custom_folder_path', JPATH_COMPONENT_ADMINISTRATOR.'/custom');
|
||||
// set the default
|
||||
$options[] = JHtml::_('select.option', '', JText::sprintf('COM_COMPONENTBUILDER_PLEASE_ADD_FOLDERS_TO_S',$localfolder));
|
||||
// import all needed classes
|
||||
jimport('joomla.filesystem.file');
|
||||
jimport('joomla.filesystem.folder');
|
||||
$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 (!\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[] = JHtml::_('select.option', $folder, $folder);
|
||||
$options[] = Html::_('select.option', $folder, $folder);
|
||||
}
|
||||
}
|
||||
return $options;
|
||||
|
@ -29,6 +29,7 @@ use VDM\Joomla\Utilities\ObjectHelper;
|
||||
use VDM\Joomla\Utilities\GuidHelper;
|
||||
use VDM\Joomla\FOF\Encrypt\AES;
|
||||
use VDM\Joomla\Utilities\ArrayHelper as UtilitiesArrayHelper;
|
||||
use VDM\Joomla\Utilities\String\ComponentCodeNameHelper;
|
||||
use VDM\Joomla\Utilities\GetHelper;
|
||||
use VDM\Joomla\Componentbuilder\Extrusion\Helper\Extrusion;
|
||||
|
||||
@ -1407,6 +1408,9 @@ class ComponentbuilderModelJoomla_component extends AdminModel
|
||||
{
|
||||
$data['system_name'] = $data['name'];
|
||||
}
|
||||
|
||||
// make sure that the component code name is safe.
|
||||
$data['name_code'] = ComponentCodeNameHelper::safe($data['name_code']);
|
||||
|
||||
// Set the GUID if empty or not valid
|
||||
if (empty($data['guid']) && $data['id'] > 0)
|
||||
|
Reference in New Issue
Block a user