forked from joomla/Component-Builder
Fixed gh-262 that broke the saving of php values in custom field
This commit is contained in:
parent
04aefa256b
commit
a0890ea87f
@ -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**
|
||||
|
@ -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**
|
||||
|
@ -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'])
|
||||
{
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
@ -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
Loading…
Reference in New Issue
Block a user