Merge "Warn if stateful ParserOutput transforms are used"
[lhc/web/wiklou.git] / includes / RevisionList.php
index ccdedb8..fa454e0 100644 (file)
@@ -116,7 +116,7 @@ abstract class RevisionListBase extends ContextSource implements Iterator {
        }
 
        public function key() {
-               return $this->res ? $this->res->key(): 0;
+               return $this->res ? $this->res->key() : 0;
        }
 
        public function valid() {
@@ -296,15 +296,14 @@ class RevisionList extends RevisionListBase {
                if ( $this->ids !== null ) {
                        $conds['rev_id'] = array_map( 'intval', $this->ids );
                }
+               $revQuery = Revision::getQueryInfo( [ 'page', 'user' ] );
                return $db->select(
-                       [ 'revision', 'page', 'user' ],
-                       array_merge( Revision::selectFields(), Revision::selectUserFields() ),
+                       $revQuery['tables'],
+                       $revQuery['fields'],
                        $conds,
                        __METHOD__,
                        [ 'ORDER BY' => 'rev_id DESC' ],
-                       [
-                               'page' => Revision::pageJoinCond(),
-                               'user' => Revision::userJoinCond() ]
+                       $revQuery['joins']
                );
        }