X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FpopulatePPSortKey.php;h=591fbd4b3948e75039311f69487769115dd15a71;hb=7afced64454ad30d688540f7626448ac2faefebb;hp=fd7974dabf6ecfe63a0f4f72e6f54e75091ebdfb;hpb=a3d8d1a1b1e4ea659c80ba4ca8cfb008aabfeeac;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/populatePPSortKey.php b/maintenance/populatePPSortKey.php index fd7974dabf..591fbd4b39 100644 --- a/maintenance/populatePPSortKey.php +++ b/maintenance/populatePPSortKey.php @@ -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,8 @@ class PopulatePPSortKey extends LoggedUpdateMaintenance { $lastProp = $row->pp_propname; } - $this->output( "Done!\n" ); + $this->output( "Populating page_props.pp_sortkey complete.\n" ); + return true; } protected function getUpdateKey() { @@ -101,5 +101,5 @@ class PopulatePPSortKey extends LoggedUpdateMaintenance { } } -$maintClass = 'PopulatePPSortKey'; +$maintClass = PopulatePPSortKey::class; require_once RUN_MAINTENANCE_IF_MAIN;