Merge "ServiceWiring: Use RequestContext instead of $wgUser global"
[lhc/web/wiklou.git] / includes / cache / MessageCache.php
index e78dfa1..157d88e 100644 (file)
@@ -540,7 +540,10 @@ class MessageCache {
                $res = $dbr->select(
                        $revQuery['tables'],
                        $revQuery['fields'],
-                       array_merge( $conds, [ 'page_len <= ' . intval( $wgMaxMsgCacheEntrySize ) ] ),
+                       array_merge( $conds, [
+                               'page_len <= ' . intval( $wgMaxMsgCacheEntrySize ),
+                               'page_latest = rev_id' // get the latest revision only
+                       ] ),
                        __METHOD__ . "($code)-small",
                        [],
                        $revQuery['joins']