mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-10 16:08:34 +01:00
explicit whitelist for certain attributes and widget-types used to supress rows and cols everywhere but textbox and suppress orient if empty
This commit is contained in:
parent
abba55b569
commit
c764604231
@ -120,6 +120,14 @@ class xul_io
|
||||
'menupopup' => 'select',
|
||||
'description' => 'label'
|
||||
);
|
||||
|
||||
/**
|
||||
* explicit whitelist for certain attributes and widget types
|
||||
*/
|
||||
var $attr_whitelist = array(
|
||||
'rows' => array('textbox'),
|
||||
'cols' => array('textbox'),
|
||||
);
|
||||
/**
|
||||
* Keys of currently processed template on export, to resolve relative names
|
||||
*
|
||||
@ -275,7 +283,7 @@ class xul_io
|
||||
}
|
||||
// no sure where the data key gets set, but it gives a warning in xml serialization (empty array)
|
||||
unset($cell['data']);
|
||||
$cell['orient'] = $orient;
|
||||
if (!empty($orient)) $cell['orient'] = $orient;
|
||||
$cell['size'] = $options;
|
||||
break;
|
||||
|
||||
@ -309,6 +317,11 @@ class xul_io
|
||||
{
|
||||
$attr = $this->attr2xul[$attr];
|
||||
}
|
||||
// check if attribute has an explicit whitelist and widget type is in it
|
||||
if (isset($this->attr_whitelist[$attr]) && !in_array($type, $this->attr_whitelist[$attr]))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
$this->set_attributes($attr_widget,$attr,$val);
|
||||
}
|
||||
if ($child)
|
||||
|
Loading…
Reference in New Issue
Block a user