X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=includes%2Fcontent%2FContentHandler.php;h=3cfac8f90bb569f27dc65711794cc06abdd9f709;hb=5caebf049326344eea2878e55c9e0f38e8fcab98;hp=edfc81cc950f2dd023a3a2188c082da2c49f2fd5;hpb=f1a57a507377157c2c8a57899bf08ac0a304e3d2;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 ) {