X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fcontent%2FContentHandler.php;h=3cfac8f90bb569f27dc65711794cc06abdd9f709;hb=b37772a99128afe1699a60718ebe2a6f8469aa8f;hp=edfc81cc950f2dd023a3a2188c082da2c49f2fd5;hpb=74426f3cf796b149f1ae445e41815bbe148640b2;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/content/ContentHandler.php b/includes/content/ContentHandler.php index edfc81cc95..3cfac8f90b 100644 --- a/includes/content/ContentHandler.php +++ b/includes/content/ContentHandler.php @@ -332,6 +332,13 @@ abstract class ContentHandler { return self::$handlers[$modelId]; } + /** + * Clean up handlers cache. + */ + public static function cleanupHandlersCache() { + self::$handlers = []; + } + /** * Returns the localized name for a given content model. * @@ -986,13 +993,17 @@ abstract class ContentHandler { // Find out if there was only one contributor // Only scan the last 20 revisions - $res = $dbr->select( 'revision', 'rev_user_text', + $revQuery = Revision::getQueryInfo(); + $res = $dbr->select( + $revQuery['tables'], + [ 'rev_user_text' => $revQuery['fields']['rev_user_text'] ], [ 'rev_page' => $title->getArticleID(), $dbr->bitAnd( 'rev_deleted', Revision::DELETED_USER ) . ' = 0' ], __METHOD__, - [ 'LIMIT' => 20 ] + [ 'LIMIT' => 20 ], + $revQuery['joins'] ); if ( $res === false ) {