X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FpopulateCategory.php;h=508960d725d7ee465118f76ec08091826bb0b964;hb=8e0ef3e187b4b8ebe847dbc8ae1ec2b96ed58ae0;hp=5dccdd65ec96d452fe4bba872926456ea4ec2bda;hpb=313dde5d06c42be1eb7da9127ec92bb5d360ddab;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/populateCategory.php b/maintenance/populateCategory.php index 5dccdd65ec..508960d725 100644 --- a/maintenance/populateCategory.php +++ b/maintenance/populateCategory.php @@ -93,9 +93,9 @@ TEXT $throttle = intval( $throttle ); if ( $begin !== '' ) { - $where = 'cl_to > ' . $dbw->addQuotes( $begin ); + $where = [ 'cl_to > ' . $dbw->addQuotes( $begin ) ]; } else { - $where = null; + $where = [ '1 = 1' ]; } $i = 0; @@ -133,22 +133,16 @@ TEXT usleep( $throttle * 1000 ); } - if ( $dbw->insert( + $dbw->insert( 'updatelog', [ 'ul_key' => 'populate category' ], __METHOD__, - 'IGNORE' - ) ) { - $this->output( "Category population complete.\n" ); - - return true; - } else { - $this->output( "Could not insert category population row.\n" ); + [ 'IGNORE' ] + ); - return false; - } + return true; } } -$maintClass = "PopulateCategory"; +$maintClass = PopulateCategory::class; require_once RUN_MAINTENANCE_IF_MAIN;