remove spurious htmlspecialchars() on input; remove unnecessary null checks
authorBrion Vibber <brion@users.mediawiki.org>
Wed, 18 Jul 2007 18:46:07 +0000 (18:46 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Wed, 18 Jul 2007 18:46:07 +0000 (18:46 +0000)
includes/SpecialImport.php

index 36e0273..7b1d68b 100644 (file)
@@ -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;
        }
 
        /**