mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-29 01:09:10 +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',
|
'menupopup' => 'select',
|
||||||
'description' => 'label'
|
'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
|
* 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)
|
// no sure where the data key gets set, but it gives a warning in xml serialization (empty array)
|
||||||
unset($cell['data']);
|
unset($cell['data']);
|
||||||
$cell['orient'] = $orient;
|
if (!empty($orient)) $cell['orient'] = $orient;
|
||||||
$cell['size'] = $options;
|
$cell['size'] = $options;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -309,6 +317,11 @@ class xul_io
|
|||||||
{
|
{
|
||||||
$attr = $this->attr2xul[$attr];
|
$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);
|
$this->set_attributes($attr_widget,$attr,$val);
|
||||||
}
|
}
|
||||||
if ($child)
|
if ($child)
|
||||||
|
Loading…
Reference in New Issue
Block a user