From 64c31d8f164ba6015fb16b5f346378d39f3953f7 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Niklas=20Laxstr=C3=B6m?= Date: Sat, 8 Oct 2011 11:41:10 +0000 Subject: [PATCH] Small cleanups to XmlSelect --- includes/Xml.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/includes/Xml.php b/includes/Xml.php index c2fa8191d9..c5150ad5b2 100644 --- a/includes/Xml.php +++ b/includes/Xml.php @@ -466,7 +466,7 @@ class Xml { if( $selected ) { $attribs['selected'] = 'selected'; } - return self::element( 'option', $attribs, $text ); + return Html::element( 'option', $attribs, $text ); } /** @@ -888,7 +888,7 @@ class XmlSelect { * @return array|null */ public function getAttribute( $name ) { - if ( isset($this->attributes[$name]) ) { + if ( isset( $this->attributes[$name] ) ) { return $this->attributes[$name]; } else { return null; @@ -932,7 +932,7 @@ class XmlSelect { foreach( $options as $label => $value ) { if ( is_array( $value ) ) { $contents = self::formatOptions( $value, $default ); - $data .= Xml::tags( 'optgroup', array( 'label' => $label ), $contents ) . "\n"; + $data .= Html::rawElement( 'optgroup', array( 'label' => $label ), $contents ) . "\n"; } else { $data .= Xml::option( $label, $value, $value === $default ) . "\n"; } @@ -951,7 +951,7 @@ class XmlSelect { $contents .= self::formatOptions( $options, $this->default ); } - return Xml::tags( 'select', $this->attributes, rtrim( $contents ) ); + return Html::rawElement( 'select', $this->attributes, rtrim( $contents ) ); } } -- 2.20.1