From 04e94d54f7aae816e9eaf526bdb7d52aadf5c0f8 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Fri, 19 Dec 2008 02:03:36 +0000 Subject: [PATCH] * (bug 11733) Fixed parameter validation in importTextFile.php --- RELEASE-NOTES | 1 + maintenance/importTextFile.php | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 6870151016..55fbb7e79f 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -430,6 +430,7 @@ The following extensions are migrated into MediaWiki 1.14: images which do not specify width and height attributes. * (bug 15027) Internet domain names and IP addresses can now be indexed and searched sensibly with the default MySQL search backend. +* (bug 11733) Fixed parameter validation in importTextFile.php === API changes in 1.14 === diff --git a/maintenance/importTextFile.php b/maintenance/importTextFile.php index 5004c3c08d..0a0068d7f3 100644 --- a/maintenance/importTextFile.php +++ b/maintenance/importTextFile.php @@ -24,19 +24,19 @@ if( count( $args ) < 1 || isset( $options['help'] ) ) { $title = isset( $options['title'] ) ? $options['title'] : titleFromFilename( $filename ); $title = Title::newFromUrl( $title ); - echo( "\nUsing title '" . $title->getPrefixedText() . "'..." ); if( is_object( $title ) ) { + echo( "\nUsing title '" . $title->getPrefixedText() . "'..." ); if( !$title->exists() || !isset( $options['nooverwrite'] ) ) { $text = file_get_contents( $filename ); $user = isset( $options['user'] ) ? $options['user'] : 'Maintenance script'; $user = User::newFromName( $user ); - echo( "\nUsing username '" . $user->getName() . "'..." ); if( is_object( $user ) ) { + echo( "\nUsing username '" . $user->getName() . "'..." ); $wgUser =& $user; $comment = isset( $options['comment'] ) ? $options['comment'] : 'Importing text file'; $flags = 0 | ( isset( $options['norc'] ) ? EDIT_SUPPRESS_RC : 0 ); -- 2.20.1