r42708 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r42707‎ | r42708 | r42709 >
Date:01:56, 28 October 2008
Author:mrzman
Status:old
Tags:
Comment:
*Fix some variable typos
*Use <label>s with the search namespace checkboxes
*Remove extra htmlspecialchars(), XML::element() does this for us.
Modified paths:
  • /trunk/extensions/InputBox/InputBox.classes.php (modified) (history)

Diff [purge]

Index: trunk/extensions/InputBox/InputBox.classes.php
@@ -32,7 +32,7 @@
3333 /* Functions */
3434
3535 public function __construct( $parser ) {
36 - $this->_parser = $parser;
 36+ $this->mParser = $parser;
3737 }
3838
3939 public function render() {
@@ -56,9 +56,9 @@
5757 array(
5858 'class' => 'error'
5959 ),
60 - strlen( $this->mtype ) > 0
61 - ? htmlspecialchars( wfMsgForContent( 'inputbox-error-bad-type', $this->mType ) )
62 - : htmlspecialchars( wfMsgForContent( 'inputbox-error-no-type' ) )
 60+ strlen( $this->mType ) > 0
 61+ ? wfMsgForContent( 'inputbox-error-bad-type', $this->mType )
 62+ : wfMsgForContent( 'inputbox-error-no-type' )
6363 )
6464 );
6565 }
@@ -129,11 +129,12 @@
130130 array(
131131 'type' => 'checkbox',
132132 'name' => 'ns' . $i,
133 - 'value' => 1
 133+ 'value' => 1,
 134+ 'id' => 'mw-inputbox-ns' . $i
134135 ) + $checked
135136 );
136137 // Label
137 - $htmlOut .= '&nbsp;' . htmlspecialchars( $userNamespace );
 138+ $htmlOut .= '&nbsp;' . Xml::label( $userNamespace, 'mw-inputbox-ns' . $i );
138139 }
139140 }
140141 }
@@ -454,7 +455,7 @@
455456 'buttonlabel' => array( 'mButtonLabel', '' ),
456457 'searchbuttonlabel' => array( 'mSearchButtonLabel', '' ),
457458 'fulltextbutton' => array( 'mFullTextButton', '' ),
458 - 'namespaces' => array( '_namespaces', '' ),
 459+ 'namespaces' => array( 'mNamespaces', '' ),
459460 'labeltext' => array( 'mLabelText', '' ),
460461 'hidden' => array( 'mHidden', '' ),
461462 'id' => array( 'mID', '' ),

Status & tagging log