diff options
author | Pierre Schmitz <pierre@archlinux.de> | 2011-06-22 11:28:20 +0200 |
---|---|---|
committer | Pierre Schmitz <pierre@archlinux.de> | 2011-06-22 11:28:20 +0200 |
commit | 9db190c7e736ec8d063187d4241b59feaf7dc2d1 (patch) | |
tree | 46d1a0dee7febef5c2d57a9f7b972be16a163b3d /maintenance/importTextFile.php | |
parent | 78677c7bbdcc9739f6c10c75935898a20e1acd9e (diff) |
update to MediaWiki 1.17.0
Diffstat (limited to 'maintenance/importTextFile.php')
-rw-r--r-- | maintenance/importTextFile.php | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/maintenance/importTextFile.php b/maintenance/importTextFile.php index 955d01f4..3b77eb5f 100644 --- a/maintenance/importTextFile.php +++ b/maintenance/importTextFile.php @@ -11,30 +11,30 @@ $options = array( 'help', 'nooverwrite', 'norc' ); $optionsWithArgs = array( 'title', 'user', 'comment' ); -require_once( dirname(__FILE__) . '/commandLine.inc' ); +require_once( dirname( __FILE__ ) . '/commandLine.inc' ); echo( "Import Text File\n\n" ); -if( count( $args ) < 1 || isset( $options['help'] ) ) { +if ( count( $args ) < 1 || isset( $options['help'] ) ) { showHelp(); } else { $filename = $args[0]; echo( "Using {$filename}..." ); - if( is_file( $filename ) ) { + if ( is_file( $filename ) ) { $title = isset( $options['title'] ) ? $options['title'] : titleFromFilename( $filename ); $title = Title::newFromURL( $title ); - if( is_object( $title ) ) { + if ( is_object( $title ) ) { echo( "\nUsing title '" . $title->getPrefixedText() . "'..." ); - if( !$title->exists() || !isset( $options['nooverwrite'] ) ) { + if ( !$title->exists() || !isset( $options['nooverwrite'] ) ) { $text = file_get_contents( $filename ); $user = isset( $options['user'] ) ? $options['user'] : 'Maintenance script'; $user = User::newFromName( $user ); - if( is_object( $user ) ) { + if ( is_object( $user ) ) { echo( "\nUsing username '" . $user->getName() . "'..." ); $wgUser =& $user; |