diff options
author | Pierre Schmitz <pierre@archlinux.de> | 2013-12-08 09:55:49 +0100 |
---|---|---|
committer | Pierre Schmitz <pierre@archlinux.de> | 2013-12-08 09:55:49 +0100 |
commit | 4ac9fa081a7c045f6a9f1cfc529d82423f485b2e (patch) | |
tree | af68743f2f4a47d13f2b0eb05f5c4aaf86d8ea37 /maintenance/cdb.php | |
parent | af4da56f1ad4d3ef7b06557bae365da2ea27a897 (diff) |
Update to MediaWiki 1.22.0
Diffstat (limited to 'maintenance/cdb.php')
-rw-r--r-- | maintenance/cdb.php | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/maintenance/cdb.php b/maintenance/cdb.php index c06c2cd0..d42f9f7a 100644 --- a/maintenance/cdb.php +++ b/maintenance/cdb.php @@ -23,12 +23,12 @@ */ /** */ -require_once( __DIR__ . '/commandLine.inc' ); +require_once __DIR__ . '/commandLine.inc'; function cdbShowHelp( $command ) { $commandList = array( 'load' => 'load a cdb file for reading', - 'get' => 'get a value for a key', + 'get' => 'get a value for a key', 'exit' => 'exit cdb', 'quit' => 'exit cdb', 'help' => 'help about a command', @@ -55,7 +55,9 @@ do { static $fileHandle; $line = Maintenance::readconsole(); - if ( $line === false ) exit; + if ( $line === false ) { + exit; + } $args = explode( ' ', $line ); $command = array_shift( $args ); @@ -67,25 +69,25 @@ do { cdbShowHelp( array_shift( $args ) ); break; case 'load': - if( !isset( $args[0] ) ) { + if ( !isset( $args[0] ) ) { print "Need a filename there buddy\n"; break; } $file = $args[0]; print "Loading cdb file $file..."; $fileHandle = CdbReader::open( $file ); - if( !$fileHandle ) { + if ( !$fileHandle ) { print "not a cdb file or unable to read it\n"; } else { print "ok\n"; } break; case 'get': - if( !$fileHandle ) { + if ( !$fileHandle ) { print "Need to load a cdb file first\n"; break; } - if( !isset( $args[0] ) ) { + if ( !isset( $args[0] ) ) { print "Need to specify a key, Luke\n"; break; } |