X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FpopulateCategory.php;h=ce1506ca49d3e4287fec8d4f138208c1166faea7;hb=c1bfb7d319766cf46877459b2149a66ac7099295;hp=f2a00078e8efdfe4cbbae244cb96c6eb0ba150a8;hpb=07a791ffd1d80c6a8f2ca4dfdbc3f2002ac869fe;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/populateCategory.php b/maintenance/populateCategory.php index f2a00078e8..ce1506ca49 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,20 +133,14 @@ 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" ); + ); - return false; - } + return true; } }