Make r66504 a little more concise
[lhc/web/wiklou.git] / includes / Xml.php
index 22df176..f7ddb4c 100644 (file)
@@ -275,7 +275,8 @@ class Xml {
         * @return string HTML
         */
        public static function input( $name, $size=false, $value=false, $attribs=array() ) {
-               $attributes = array();
+               $attributes = array( 'name' => $name );
+
                if( $size ) {
                        $attributes['size'] = $size;
                }
@@ -284,8 +285,6 @@ class Xml {
                        $attributes['value'] = $value;
                }
 
-               $attributes['name'] = $name;
-
                return self::element( 'input', $attributes + $attribs );
        }