X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FRevisionList.php;h=fa454e07e3b6d6fa8acfa3a2c4b2d1e3fd2cdb66;hb=8f4ae0d51c8b4c4f77753e157312a91176f5a719;hp=ccdedb8e6165c3a010a9f50e64b438d3c1fb3cee;hpb=c6b1dede111e00d8993c4177c9678d17d035e5ed;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/RevisionList.php b/includes/RevisionList.php index ccdedb8e61..fa454e07e3 100644 --- a/includes/RevisionList.php +++ b/includes/RevisionList.php @@ -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'] ); }