X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2Frebuildrecentchanges.php;h=f4b0505e8bbaabd7055d5807b287db40940d58d1;hb=d0b98c611da7fa5715ab0de37e526c27cf5e9d8e;hp=203d79567bd07e516e0421280e1237053c61c5e9;hpb=27f8aa732e55f0655255152fa22655fa07424c2d;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/rebuildrecentchanges.php b/maintenance/rebuildrecentchanges.php index 203d79567b..f4b0505e8b 100644 --- a/maintenance/rebuildrecentchanges.php +++ b/maintenance/rebuildrecentchanges.php @@ -179,13 +179,6 @@ class RebuildRecentchanges extends Maintenance { // Some logs don't go in RC. This should check for that $basicRCLogs = array_diff( $wgLogTypes, array_keys( $wgLogRestrictions ) ); - // Escape...blah blah - $selectLogs = array(); - foreach ( $basicRCLogs as $logtype ) { - $safetype = $dbw->strencode( $logtype ); - $selectLogs[] = "'$safetype'"; - } - $cutoff = time() - $wgRCMaxAge; list( $logging, $page ) = $dbw->tableNamesN( 'logging', 'page' ); $dbw->insertSelect( @@ -219,7 +212,7 @@ class RebuildRecentchanges extends Maintenance { array( 'log_timestamp > ' . $dbw->addQuotes( $dbw->timestamp( $cutoff ) ), 'log_user=user_id', - 'log_type IN(' . implode( ',', $selectLogs ) . ')' + 'log_type' => $basicRCLogs, ), __METHOD__, array(), // INSERT options