r24245 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r24244‎ | r24245 | r24246 >
Date:18:46, 18 July 2007
Author:brion
Status:old
Tags:
Comment:
remove spurious htmlspecialchars() on input; remove unnecessary null checks
Modified paths:
  • /trunk/phase3/includes/SpecialImport.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/SpecialImport.php
@@ -37,7 +37,7 @@
3838
3939 if( $wgRequest->wasPosted() && $wgRequest->getVal( 'action' ) == 'submit') {
4040 $isUpload = false;
41 - $articleName = htmlspecialchars( $wgRequest->getText( 'articlename' ) );
 41+ $articleName = $wgRequest->getText( 'articlename' );
4242 $namespace = $wgRequest->getIntOrNull( 'namespace' );
4343
4444 switch( $wgRequest->getVal( "source" ) ) {
@@ -71,7 +71,7 @@
7272 if( !is_null( $namespace ) ) {
7373 $importer->setTargetNamespace( $namespace );
7474 }
75 - if( !is_null( $articleName ) ) {
 75+ if( $articleName !== '' ) {
7676 $importer->setTargetArticleName( $articleName );
7777 }
7878 $reporter = new ImportReporter( $importer, $isUpload, $interwiki, $frompage );
@@ -527,7 +527,7 @@
528528 * Set a target articlename to override the defaults
529529 */
530530 function setTargetArticleName( $articleName ) {
531 - $this->mTargetArticleName = is_null( $articleName ) ? null : $articleName;
 531+ $this->mTargetArticleName = $articleName;
532532 }
533533
534534 /**

Follow-up revisions

RevisionCommit summaryAuthorDate
r24250Revert r24237, r24239, r24245 for the moment. We expect transwiki system to c...brion20:05, 18 July 2007
r24276Merged revisions 24213-24275 via svnmerge from...david20:20, 19 July 2007

Status & tagging log