From: Brion Vibber Date: Wed, 18 Jul 2007 18:46:07 +0000 (+0000) Subject: remove spurious htmlspecialchars() on input; remove unnecessary null checks X-Git-Tag: 1.31.0-rc.0~52028 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/exercices/journal.php?a=commitdiff_plain;h=bafbe61efdb80a975b6c22bab3784ba33b9e802f;p=lhc%2Fweb%2Fwiklou.git remove spurious htmlspecialchars() on input; remove unnecessary null checks --- 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; } /**