mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-18 04:31:06 +01:00
fixed PHP Strict Standards: Declaration of etemplate_widget_*::set_attrs() should be compatible with etemplate_widget::set_attrs()
This commit is contained in:
parent
4bcd9a2265
commit
3557cd4ac8
@ -48,12 +48,13 @@ class etemplate_widget_menupopup extends etemplate_widget
|
||||
* Reimplemented to parse our differnt attributes
|
||||
*
|
||||
* @param string|XMLReader $xml
|
||||
* @param boolean $cloned=true true: object does NOT need to be cloned, false: to set attribute, set them in cloned object
|
||||
* @return etemplate_widget_template current object or clone, if any attribute was set
|
||||
* @todo Use legacy_attributes instead of leaving it to typeOptions method to parse them
|
||||
*/
|
||||
public function set_attrs($xml)
|
||||
public function set_attrs($xml, $cloned=true)
|
||||
{
|
||||
parent::set_attrs($xml);
|
||||
parent::set_attrs($xml, $cloned);
|
||||
|
||||
// set attrs[multiple] from attrs[options], unset options only if it just contains number or rows
|
||||
if ($this->attrs['options'] > 1)
|
||||
@ -94,7 +95,7 @@ class etemplate_widget_menupopup extends etemplate_widget
|
||||
|
||||
switch ($widget_type)
|
||||
{
|
||||
case 'select-account':
|
||||
case 'select-account':
|
||||
// If in allowed options, skip account check to support app-specific options
|
||||
if(count($allowed) > 0 && in_array($val,$allowed)) continue;
|
||||
|
||||
|
@ -175,7 +175,7 @@ class etemplate_widget_nextmatch extends etemplate_widget
|
||||
{
|
||||
$cat_app = $value['cat_app'] ? $value['cat_app'] : $GLOBALS['egw_info']['flags']['current_app'];
|
||||
$value['options-cat_id'] = array();
|
||||
|
||||
|
||||
// Add 'All', if not already there
|
||||
if(!$value['options-cat_id'][''] && !($value['options-cat_id'][0] && $value['options-cat_id'][0]['value'] == ''))
|
||||
{
|
||||
@ -369,7 +369,7 @@ class etemplate_widget_nextmatch extends etemplate_widget
|
||||
if ($knownUids)
|
||||
{
|
||||
// row_id not set for nextmatch --> just skip them, we can't identify the rows
|
||||
if (!$row_id)
|
||||
if (!$row_id)
|
||||
{
|
||||
foreach($knownUids as $uid)
|
||||
{
|
||||
@ -1024,9 +1024,17 @@ class etemplate_widget_nextmatch_filterheader extends etemplate_widget_menupopup
|
||||
*/
|
||||
class etemplate_widget_nextmatch_accountfilter extends etemplate_widget_menupopup
|
||||
{
|
||||
public function set_attrs($xml)
|
||||
/**
|
||||
* Parse and set extra attributes from xml in template object
|
||||
*
|
||||
* @param string|XMLReader $xml
|
||||
* @param boolean $cloned=true true: object does NOT need to be cloned, false: to set attribute, set them in cloned object
|
||||
* @return etemplate_widget_template current object or clone, if any attribute was set
|
||||
*/
|
||||
public function set_attrs($xml, $cloned=true)
|
||||
{
|
||||
parent::set_attrs($xml);
|
||||
parent::set_attrs($xml, $cloned);
|
||||
|
||||
$this->attrs['type'] = 'select-account';
|
||||
}
|
||||
}
|
||||
|
@ -49,11 +49,12 @@ class etemplate_widget_textbox extends etemplate_widget
|
||||
* Reimplemented to handle legacy read-only by setting size < 0
|
||||
*
|
||||
* @param string|XMLReader $xml
|
||||
* @return etemplate_widget_textbox current object or clone, if any attribute was set
|
||||
* @param boolean $cloned=true true: object does NOT need to be cloned, false: to set attribute, set them in cloned object
|
||||
* @return etemplate_widget_template current object or clone, if any attribute was set
|
||||
*/
|
||||
public function set_attrs($xml)
|
||||
public function set_attrs($xml, $cloned=true)
|
||||
{
|
||||
parent::set_attrs($xml);
|
||||
parent::set_attrs($xml, $cloned);
|
||||
|
||||
// Legacy handling only
|
||||
// A negative size triggered the HTML readonly attibute, but not etemplate readonly,
|
||||
|
@ -51,12 +51,13 @@ class etemplate_widget_tree extends etemplate_widget
|
||||
* Reimplemented to parse our differnt attributes
|
||||
*
|
||||
* @param string|XMLReader $xml
|
||||
* @param boolean $cloned=true true: object does NOT need to be cloned, false: to set attribute, set them in cloned object
|
||||
* @return etemplate_widget_template current object or clone, if any attribute was set
|
||||
*/
|
||||
public function set_attrs($xml)
|
||||
public function set_attrs($xml, $cloned=true)
|
||||
{
|
||||
$this->attrs['type'] = $xml->localName;
|
||||
parent::set_attrs($xml);
|
||||
parent::set_attrs($xml, $cloned);
|
||||
|
||||
// set attrs[multiple] from attrs[options]
|
||||
if ($this->attrs['options'] > 1)
|
||||
|
Loading…
Reference in New Issue
Block a user