maintenance/purgePage.php output page being purged
authoraddshore <adamshorland@gmail.com>
Mon, 4 Jun 2018 09:03:22 +0000 (10:03 +0100)
committerAddshore <addshorewiki@gmail.com>
Tue, 5 Jun 2018 12:01:41 +0000 (12:01 +0000)
This is useful when piping lists of pages into the script
to see progress.

Change-Id: I077249ad012d0c463306c0a1a1e38d00624c5170

maintenance/purgePage.php

index df1403c..d72b98a 100644 (file)
@@ -46,8 +46,8 @@ class PurgePage extends Maintenance {
                }
        }
 
-       private function purge( $title ) {
-               $title = Title::newFromText( $title );
+       private function purge( $titleText ) {
+               $title = Title::newFromText( $titleText );
 
                if ( is_null( $title ) ) {
                        $this->error( 'Invalid page title' );
@@ -67,9 +67,9 @@ class PurgePage extends Maintenance {
                }
 
                if ( $page->doPurge() ) {
-                       $this->output( "Purged\n" );
+                       $this->output( "Purged {$titleText}\n" );
                } else {
-                       $this->error( "Purge failed" );
+                       $this->error( "Purge failed for {$titleText}" );
                }
        }
 }