Followup patch for I2473ee119c185d1b2b00ac4b1e70ee8a6cafe4a3,
which broke the --pagelist option for dumpBackup.
Somehow this slipped by in review.
Change-Id: Ifa1fd0f63f7b8db4d51a760e37ac0876430f2e88
$this->reporting = !$this->hasOption( 'quiet' );
if ( $this->hasOption( 'pagelist' ) ) {
- $olddir = getcwd();
- chdir( $originalDir );
- $pages = file( $this->getOption( 'quiet' ) );
- chdir( $olddir );
+ $filename = $this->getOption( 'pagelist' );
+ $pages = file( $filename );
if ( $pages === false ) {
- echo "Unable to open file {$options['pagelist']}\n";
- die( 1 );
+ $this->fatalError( "Unable to open file {$filename}\n" );
}
$pages = array_map( 'trim', $pages );
$this->pages = array_filter( $pages, create_function( '$x', 'return $x !== "";' ) );