Fixed gh-262 that broke the saving of php values in custom field

This commit is contained in:
Llewellyn van der Merwe 2018-04-13 22:06:45 +02:00
parent 04aefa256b
commit a0890ea87f
No known key found for this signature in database
GPG Key ID: CAD7B16D27AF28C5
7 changed files with 23 additions and 46 deletions

View File

@ -130,7 +130,7 @@ Component Builder is mapped as a component in itself on my local development env
+ *Version*: 2.7.3
+ *Copyright*: Copyright (C) 2015. All Rights Reserved
+ *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
+ *Line count*: **182289**
+ *Line count*: **182266**
+ *Field count*: **1012**
+ *File count*: **1199**
+ *Folder count*: **193**

View File

@ -130,7 +130,7 @@ Component Builder is mapped as a component in itself on my local development env
+ *Version*: 2.7.3
+ *Copyright*: Copyright (C) 2015. All Rights Reserved
+ *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
+ *Line count*: **182289**
+ *Line count*: **182266**
+ *Field count*: **1012**
+ *File count*: **1199**
+ *Folder count*: **193**

View File

@ -903,8 +903,8 @@ class ComponentbuilderModelField extends JModelAdmin
// make sure we have the correct values
if (ComponentbuilderHelper::checkArray($property) && isset($property['name']) && ComponentbuilderHelper::checkString($property['name']) && isset($property['value']))
{
// fix the name
$property['name'] = ComponentbuilderHelper::safeString($property['name']);
// fix the name (TODO)
// $property['name'] = ComponentbuilderHelper::safeString($property['name']);
// some fixes, just in case (more can be added)
switch ($property['name'])
{

View File

@ -49,20 +49,6 @@ class JFormFieldAdminviewfolderlist extends JFormFieldList
*/
public function getOptions()
{
// get custom folder files
$localfolder = JPATH_COMPONENT_ADMINISTRATOR.'/views';
// set the default
$options = array();
// import all needed classes
jimport('joomla.filesystem.folder');
// now check if there are files in the folder
if (JFolder::exists($localfolder) && $folders = JFolder::folders($localfolder))
{
foreach ($folders as $folder)
{
$options[] = JHtml::_('select.option', $folder, ComponentbuilderHelper::safeString($folder, 'W'));
}
}
return $options;
return null;
}
}

View File

@ -49,20 +49,6 @@ class JFormFieldSiteviewfolderlist extends JFormFieldList
*/
public function getOptions()
{
// get custom folder files
$localfolder = JPATH_COMPONENT_SITE.'/views';
// set the default
$options = array();
// import all needed classes
jimport('joomla.filesystem.folder');
// now check if there are files in the folder
if (JFolder::exists($localfolder) && $folders = JFolder::folders($localfolder))
{
foreach ($folders as $folder)
{
$options[] = JHtml::_('select.option', $folder, ComponentbuilderHelper::safeString($folder, 'W'));
}
}
return $options;
return null;
}
}

View File

@ -1378,6 +1378,11 @@ class ComponentbuilderModelImport_joomla_components extends JModelLegacy
{
unset($item->metakey);
}
// remove not_required
if (isset($item->not_required))
{
unset($item->not_required);
}
// actions to effect all
if (isset($item->asset_id))
{

File diff suppressed because one or more lines are too long