global $wgLoadBalancer;
static $called = false;
if ( $called ){
- exit();
+ exit( -1 );
}
$called = true;
if ( !$error ) {
$wgLoadBalancer->closeAll();
}
- exit();
+ exit( -1 );
}
/**
$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 !== "";' ) );
$result = $this->readDump( $input );
if( WikiError::isError( $result ) ) {
- $this->progress( $result->getMessage() );
+ wfDie( $result->getMessage() );
}
$this->report( true );
$offset += strlen( $chunk );
} while( $chunk !== false && !feof( $input ) );
xml_parser_free( $parser );
+
+ return true;
}
function getText( $id ) {