Merge "mw.Feedback: If the message is posted remotely, link the title correctly"
[lhc/web/wiklou.git] / maintenance / populatePPSortKey.php
index fd7974d..1ba7054 100644 (file)
@@ -23,8 +23,6 @@
 
 require_once __DIR__ . '/Maintenance.php';
 
-use Wikimedia\Rdbms\IDatabase;
-
 /**
  * Usage:
  *  populatePPSortKey.php
@@ -43,6 +41,7 @@ class PopulatePPSortKey extends LoggedUpdateMaintenance {
                $lastPageValue = 0;
                $editedRowCount = 0;
 
+               $this->output( "Populating page_props.pp_sortkey...\n" );
                while ( true ) {
                        $conditions = [ 'pp_sortkey IS NULL' ];
                        if ( $lastPageValue !== 0 ) {
@@ -58,7 +57,7 @@ class PopulatePPSortKey extends LoggedUpdateMaintenance {
                                __METHOD__,
                                [
                                        'ORDER BY' => 'pp_page, pp_propname',
-                                       'LIMIT' => $this->mBatchSize
+                                       'LIMIT' => $this->getBatchSize()
                                ]
                        );
 
@@ -93,7 +92,7 @@ class PopulatePPSortKey extends LoggedUpdateMaintenance {
                        $lastProp = $row->pp_propname;
                }
 
-               $this->output( "Done!\n" );
+               $this->output( "Populating page_props.pp_sortkey complete.\n" );
        }
 
        protected function getUpdateKey() {
@@ -101,5 +100,5 @@ class PopulatePPSortKey extends LoggedUpdateMaintenance {
        }
 }
 
-$maintClass = 'PopulatePPSortKey';
+$maintClass = PopulatePPSortKey::class;
 require_once RUN_MAINTENANCE_IF_MAIN;