X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FpopulateCategory.php;h=ce1506ca49d3e4287fec8d4f138208c1166faea7;hb=a469e81971a11b931716897d65e1fa3fdfe378e2;hp=f2a00078e8efdfe4cbbae244cb96c6eb0ba150a8;hpb=4eff5204d9ec6eb09df70d2fe017a2146cfa4238;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; } }