From bafbe61efdb80a975b6c22bab3784ba33b9e802f Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Wed, 18 Jul 2007 18:46:07 +0000 Subject: [PATCH] remove spurious htmlspecialchars() on input; remove unnecessary null checks --- includes/SpecialImport.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/includes/SpecialImport.php b/includes/SpecialImport.php index 36e027397b..7b1d68b73f 100644 --- a/includes/SpecialImport.php +++ b/includes/SpecialImport.php @@ -37,7 +37,7 @@ function wfSpecialImport( $page = '' ) { if( $wgRequest->wasPosted() && $wgRequest->getVal( 'action' ) == 'submit') { $isUpload = false; - $articleName = htmlspecialchars( $wgRequest->getText( 'articlename' ) ); + $articleName = $wgRequest->getText( 'articlename' ); $namespace = $wgRequest->getIntOrNull( 'namespace' ); switch( $wgRequest->getVal( "source" ) ) { @@ -71,7 +71,7 @@ function wfSpecialImport( $page = '' ) { if( !is_null( $namespace ) ) { $importer->setTargetNamespace( $namespace ); } - if( !is_null( $articleName ) ) { + if( $articleName !== '' ) { $importer->setTargetArticleName( $articleName ); } $reporter = new ImportReporter( $importer, $isUpload, $interwiki, $frompage ); @@ -527,7 +527,7 @@ class WikiImporter { * Set a target articlename to override the defaults */ function setTargetArticleName( $articleName ) { - $this->mTargetArticleName = is_null( $articleName ) ? null : $articleName; + $this->mTargetArticleName = $articleName; } /** -- 2.20.1