r71997 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r71996‎ | r71997 | r71998 >
Date:00:28, 31 August 2010
Author:kaldari
Status:ok
Tags:
Comment:
using getText() for form inputs, instead of getVal()
Modified paths:
  • /trunk/extensions/CentralNotice/SpecialNoticeTemplate.php (modified) (history)

Diff [purge]

Index: trunk/extensions/CentralNotice/SpecialNoticeTemplate.php
@@ -76,10 +76,9 @@
7777 }
7878
7979 // Handle adding banner
80 - // FIXME: getText()? weak comparison
8180 if ( $method == 'addTemplate' ) {
82 - $newTemplateName = $wgRequest->getVal( 'templateName' );
83 - $newTemplateBody = $wgRequest->getVal( 'templateBody' );
 81+ $newTemplateName = $wgRequest->getText( 'templateName' );
 82+ $newTemplateBody = $wgRequest->getText( 'templateBody' );
8483 if ( $newTemplateName != '' && $newTemplateBody != '' ) {
8584 $this->addTemplate(
8685 $newTemplateName,
@@ -96,8 +95,8 @@
9796 // Handle editing banner
9897 if ( $method == 'editTemplate' ) {
9998 $this->editTemplate(
100 - $wgRequest->getVal( 'template' ),
101 - $wgRequest->getVal( 'templateBody' ),
 99+ $wgRequest->getText( 'template' ),
 100+ $wgRequest->getText( 'templateBody' ),
102101 $wgRequest->getBool( 'displayAnon' ),
103102 $wgRequest->getBool( 'displayAccount' )
104103 );

Status & tagging log