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" ) ) {
if( !is_null( $namespace ) ) {
$importer->setTargetNamespace( $namespace );
}
- if( !is_null( $articleName ) ) {
+ if( $articleName !== '' ) {
$importer->setTargetArticleName( $articleName );
}
$reporter = new ImportReporter( $importer, $isUpload, $interwiki, $frompage );
* Set a target articlename to override the defaults
*/
function setTargetArticleName( $articleName ) {
- $this->mTargetArticleName = is_null( $articleName ) ? null : $articleName;
+ $this->mTargetArticleName = $articleName;
}
/**