MediaWiki REL1_35
RevisionList.php
Go to the documentation of this file.
1<?php
25
27 public function getType() {
28 return 'revision';
29 }
30
35 public function doQuery( $db ) {
36 $conds = [ 'rev_page' => $this->title->getArticleID() ];
37 if ( $this->ids !== null ) {
38 $conds['rev_id'] = array_map( 'intval', $this->ids );
39 }
40 $revQuery = MediaWikiServices::getInstance()
41 ->getRevisionStore()
42 ->getQueryInfo( [ 'page', 'user' ] );
43 return $db->select(
44 $revQuery['tables'],
45 $revQuery['fields'],
46 $conds,
47 __METHOD__,
48 [ 'ORDER BY' => 'rev_id DESC' ],
49 $revQuery['joins']
50 );
51 }
52
53 public function newItem( $row ) {
54 return new RevisionItem( $this, $row );
55 }
56}
MediaWikiServices is the service locator for the application scope of MediaWiki.
Item class for a live revision table row.
List for revision table items for a single page.
newItem( $row)
Create an item object from a DB result row.
getType()
Get the internal type name of this list.
Basic database interface for live and lazy-loaded relation database handles.
Definition IDatabase.php:38