jenkins-bot has submitted this change and it was merged.

Change subject: Fix --pagelist for dumpBackup.php
......................................................................


Fix --pagelist for dumpBackup.php

Followup patch for I2473ee119c185d1b2b00ac4b1e70ee8a6cafe4a3,
which broke the --pagelist option for dumpBackup.

Somehow this slipped by in review.

Change-Id: Ifa1fd0f63f7b8db4d51a760e37ac0876430f2e88
---
M maintenance/dumpBackup.php
1 file changed, 3 insertions(+), 6 deletions(-)

Approvals:
  TTO: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/maintenance/dumpBackup.php b/maintenance/dumpBackup.php
index 6b5792a..18737a4 100644
--- a/maintenance/dumpBackup.php
+++ b/maintenance/dumpBackup.php
@@ -95,13 +95,10 @@
                $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 !== "";' ) );

-- 
To view, visit https://gerrit.wikimedia.org/r/262678
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ifa1fd0f63f7b8db4d51a760e37ac0876430f2e88
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Unicornisaurous <[email protected]>
Gerrit-Reviewer: Parent5446 <[email protected]>
Gerrit-Reviewer: TTO <[email protected]>
Gerrit-Reviewer: Unicornisaurous <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to