X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FpopulateCategory.php;h=f2a00078e8efdfe4cbbae244cb96c6eb0ba150a8;hb=977b389d6a6ed441891fba350c3a6e28d1f21315;hp=5a8ef90c0cf8cc5f5e4863a140d20b982abff702;hpb=480ab87dbc2974ad9465af2808f21bf83397142e;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/populateCategory.php b/maintenance/populateCategory.php index 5a8ef90c0c..f2a00078e8 100644 --- a/maintenance/populateCategory.php +++ b/maintenance/populateCategory.php @@ -71,7 +71,7 @@ TEXT public function execute() { $begin = $this->getOption( 'begin', '' ); $throttle = $this->getOption( 'throttle', 0 ); - $force = $this->getOption( 'force', false ); + $force = $this->hasOption( 'force' ); $dbw = $this->getDB( DB_MASTER ); @@ -79,7 +79,7 @@ TEXT $row = $dbw->selectRow( 'updatelog', '1', - array( 'ul_key' => 'populate category' ), + [ 'ul_key' => 'populate category' ], __METHOD__ ); if ( $row ) { @@ -106,9 +106,9 @@ TEXT 'cl_to', $where, __METHOD__, - array( + [ 'ORDER BY' => 'cl_to' - ) + ] ); if ( !$row ) { # Done, hopefully. @@ -135,7 +135,7 @@ TEXT if ( $dbw->insert( 'updatelog', - array( 'ul_key' => 'populate category' ), + [ 'ul_key' => 'populate category' ], __METHOD__, 'IGNORE' ) ) { @@ -150,5 +150,5 @@ TEXT } } -$maintClass = "PopulateCategory"; +$maintClass = PopulateCategory::class; require_once RUN_MAINTENANCE_IF_MAIN;