some more die-with-proper-return-code
This commit is contained in:
parent
92724d269e
commit
8c63b503b1
3 changed files with 6 additions and 5 deletions
|
|
@ -550,7 +550,7 @@ function wfAbruptExit( $error = false ){
|
|||
global $wgLoadBalancer;
|
||||
static $called = false;
|
||||
if ( $called ){
|
||||
exit();
|
||||
exit( -1 );
|
||||
}
|
||||
$called = true;
|
||||
|
||||
|
|
@ -571,7 +571,7 @@ function wfAbruptExit( $error = false ){
|
|||
if ( !$error ) {
|
||||
$wgLoadBalancer->closeAll();
|
||||
}
|
||||
exit();
|
||||
exit( -1 );
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -48,8 +48,7 @@ if ( isset( $options['pagelist'] ) ) {
|
|||
$pages = file( $options['pagelist'] );
|
||||
chdir( $olddir );
|
||||
if ( $pages === false ) {
|
||||
print "Unable to open file {$options['pagelist']}\n";
|
||||
exit;
|
||||
wfDie( "Unable to open file {$options['pagelist']}\n" );
|
||||
}
|
||||
$pages = array_map( 'trim', $pages );
|
||||
$dumper->pages = array_filter( $pages, create_function( '$x', 'return $x !== "";' ) );
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ class TextPassDumper extends BackupDumper {
|
|||
$result = $this->readDump( $input );
|
||||
|
||||
if( WikiError::isError( $result ) ) {
|
||||
$this->progress( $result->getMessage() );
|
||||
wfDie( $result->getMessage() );
|
||||
}
|
||||
|
||||
$this->report( true );
|
||||
|
|
@ -113,6 +113,8 @@ class TextPassDumper extends BackupDumper {
|
|||
$offset += strlen( $chunk );
|
||||
} while( $chunk !== false && !feof( $input ) );
|
||||
xml_parser_free( $parser );
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
function getText( $id ) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue