r91406 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r91405‎ | r91406 | r91407 >
Date:14:27, 4 July 2011
Author:yaron
Status:deferred
Tags:
Comment:
Follow-up to r87595 - restored compatibility for MW < 1.16 in hiddenFieldHTML() method
Modified paths:
  • /trunk/extensions/SemanticForms/includes/SF_FormUtils.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticForms/includes/SF_FormUtils.php
@@ -39,7 +39,12 @@
4040 }
4141
4242 static function hiddenFieldHTML( $input_name, $cur_value ) {
43 - return "\t\t\t" . Html::Hidden( $input_name, $cur_value ) . "\n";
 43+ // 'Html' class was added in MW 1.16
 44+ if ( class_exists( 'Html' ) ) {
 45+ return "\t" . Html::hidden( $input_name, $cur_value ) . "\n";
 46+ } else {
 47+ return "\t" . Xml::hidden( $input_name, $cur_value ) . "\n";
 48+ }
4449 }
4550
4651 /**

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r87595Xml::hidden() --> Html::hidden()...reedy23:13, 6 May 2011