MediaWiki REL1_39
RevisionList.php
Go to the documentation of this file.
1<?php
24
27 public function getType() {
28 return 'revision';
29 }
30
32 public function doQuery( $db ) {
33 $conds = [ 'rev_page' => $this->page->getId() ];
34 if ( $this->ids !== null ) {
35 $conds['rev_id'] = array_map( 'intval', $this->ids );
36 }
37 $revQuery = MediaWikiServices::getInstance()
38 ->getRevisionStore()
39 ->getQueryInfo( [ 'page', 'user' ] );
40 return $db->select(
41 $revQuery['tables'],
42 $revQuery['fields'],
43 $conds,
44 __METHOD__,
45 [ 'ORDER BY' => 'rev_id DESC' ],
46 $revQuery['joins']
47 );
48 }
49
51 public function newItem( $row ) {
52 return new RevisionItem( $this, $row );
53 }
54}
Service locator for MediaWiki core services.
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.RevisionItemBase
doQuery( $db)
Do the DB query to iterate through the objects.IResultWrapper
getType()
Get the internal type name of this list.Equal to the table name. Override this function....