r55451 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r55450‎ | r55451 | r55452 >
Date:21:57, 21 August 2009
Author:simetrical
Status:ok
Tags:
Comment:
Make Xml::hidden() a wrapper around Html::hidden()

HTML-specific stuff should go into the Html class; it doesn't belong in
Xml.
Modified paths:
  • /trunk/phase3/includes/Xml.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Xml.php
@@ -398,17 +398,10 @@
399399 }
400400
401401 /**
402 - * Convenience function to build an HTML hidden form field.
403 - * @param $name String: name attribute for the field
404 - * @param $value String: value for the hidden field
405 - * @param $attribs Array: optional custom attributes
406 - * @return string HTML
 402+ * @deprecated Synonymous to Html::hidden()
407403 */
408 - public static function hidden( $name, $value, $attribs=array() ) {
409 - return self::element( 'input', array(
410 - 'name' => $name,
411 - 'type' => 'hidden',
412 - 'value' => $value ) + $attribs );
 404+ public static function hidden( $name, $value, $attribs = array() ) {
 405+ return Html::hidden( $name, $value, $attribs );
413406 }
414407
415408 /**

Status & tagging log