r78632 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r78631‎ | r78632 | r78633 >
Date:19:57, 20 December 2010
Author:yaron
Status:deferred
Tags:
Comment:
Simplified hiddenFieldHTML() and buttonHTML() functions
Modified paths:
  • /trunk/extensions/SemanticForms/includes/SF_FormUtils.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticForms/includes/SF_FormUtils.php
@@ -31,15 +31,7 @@
3232 }
3333
3434 static function hiddenFieldHTML( $input_name, $cur_value ) {
35 - $input = self::buttonHTML( array(
36 - 'type' => 'hidden',
37 - 'name' => $input_name,
38 - 'value' => $cur_value,
39 - ) );
40 - return <<<END
41 - $input
42 -
43 -END;
 35+ return "\t\t\t" . Xml::hidden( $input_name, $cur_value ) . "\n";
4436 }
4537
4638 /**
@@ -142,8 +134,7 @@
143135 * Helper function to display a simple button
144136 */
145137 static function buttonHTML( $values ) {
146 - $button_html = Xml::element( 'input', $values, '' );
147 - return " $button_html\n";
 138+ return "\t\t" . Xml::element( 'input', $values, '' ) . "\n";
148139 }
149140
150141 static function saveButtonHTML( $is_disabled, $label = null, $attr = array() ) {

Status & tagging log