MediaWiki  master
RevisionList.php
Go to the documentation of this file.
1 <?php
24 
26  public function getType() {
27  return 'revision';
28  }
29 
34  public function doQuery( $db ) {
35  $conds = [ 'rev_page' => $this->title->getArticleID() ];
36  if ( $this->ids !== null ) {
37  $conds['rev_id'] = array_map( 'intval', $this->ids );
38  }
39  $revQuery = Revision::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 
50  public function newItem( $row ) {
51  return new RevisionItem( $this, $row );
52  }
53 }
newItem( $row)
List for revision table items for a single page.
static getQueryInfo( $options=[])
Return the tables, fields, and join conditions to be selected to create a new revision object...
Definition: Revision.php:315
Item class for a live revision table row.
$revQuery