Added none as the fallback if an editor gets unpublished.
This commit is contained in:
@ -364,11 +364,18 @@ class ComponentbuilderModelJoomla_component extends JModelAdmin
|
||||
|
||||
// update all editors to use this components global editor
|
||||
$global_editor = JComponentHelper::getParams('com_componentbuilder')->get('editor', 'none');
|
||||
// now get all the editor fields
|
||||
$editors = $form->getXml()->xpath("//field[@type='editor']");
|
||||
foreach ($editors as $editor)
|
||||
// check if we found any
|
||||
if (ComponentbuilderHelper::checkArray($editors))
|
||||
{
|
||||
$name = (string) $editor['name'];
|
||||
$form->setFieldAttribute($name, 'editor', $global_editor);
|
||||
foreach ($editors as $editor)
|
||||
{
|
||||
// get the field names
|
||||
$name = (string) $editor['name'];
|
||||
// set the field editor value (with none as fallback)
|
||||
$form->setFieldAttribute($name, 'editor', $global_editor . '|none');
|
||||
}
|
||||
}
|
||||
|
||||
return $form;
|
||||
|
Reference in New Issue
Block a user