X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FpopulateCategory.php;h=5dccdd65ec96d452fe4bba872926456ea4ec2bda;hb=2c1c8238707f0a5d5e09f4fb0b8a252fdfa6577f;hp=481e07363b35df27fad3e642a4717ff507d97419;hpb=d676a1ca6ec1163f391f9a1305cddd503b7c5a22;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/populateCategory.php b/maintenance/populateCategory.php index 481e07363b..5dccdd65ec 100644 --- a/maintenance/populateCategory.php +++ b/maintenance/populateCategory.php @@ -35,7 +35,8 @@ class PopulateCategory extends Maintenance { public function __construct() { parent::__construct(); - $this->mDescription = <<addDescription( + <<addOption( 'begin', 'Only do categories whose names are alphabetically after the provided name', @@ -69,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 ); @@ -77,7 +79,7 @@ TEXT; $row = $dbw->selectRow( 'updatelog', '1', - array( 'ul_key' => 'populate category' ), + [ 'ul_key' => 'populate category' ], __METHOD__ ); if ( $row ) { @@ -104,9 +106,9 @@ TEXT; 'cl_to', $where, __METHOD__, - array( + [ 'ORDER BY' => 'cl_to' - ) + ] ); if ( !$row ) { # Done, hopefully. @@ -133,7 +135,7 @@ TEXT; if ( $dbw->insert( 'updatelog', - array( 'ul_key' => 'populate category' ), + [ 'ul_key' => 'populate category' ], __METHOD__, 'IGNORE' ) ) {