From: Aryeh Gregor Date: Wed, 9 Jun 2010 20:49:00 +0000 (+0000) Subject: Make r66504 a little more concise X-Git-Tag: 1.31.0-rc.0~36560 X-Git-Url: http://git.cyclocoop.org/%22%20.%20generer_url_ecrire%28%22suivi_revisions%22%29%20.%20%22?a=commitdiff_plain;h=ba78c756686e5781c9024c8d440b81442719172e;p=lhc%2Fweb%2Fwiklou.git Make r66504 a little more concise --- diff --git a/includes/Xml.php b/includes/Xml.php index 22df1768b9..f7ddb4c05a 100644 --- a/includes/Xml.php +++ b/includes/Xml.php @@ -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 ); }