MediaWiki  1.34.0
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 }
RevisionList\getType
getType()
Get the internal type name of this list.
Definition: RevisionList.php:26
RevisionListBase
List for revision table items for a single page.
Definition: RevisionListBase.php:29
RevisionList
Definition: RevisionList.php:25
$revQuery
$revQuery
Definition: testCompression.php:51
Wikimedia\Rdbms\IDatabase
Basic database interface for live and lazy-loaded relation database handles.
Definition: IDatabase.php:38
Revision\getQueryInfo
static getQueryInfo( $options=[])
Return the tables, fields, and join conditions to be selected to create a new revision object.
Definition: Revision.php:315
RevisionList\doQuery
doQuery( $db)
Definition: RevisionList.php:34
RevisionList\newItem
newItem( $row)
Create an item object from a DB result row.
Definition: RevisionList.php:50
RevisionItem
Item class for a live revision table row.
Definition: RevisionItem.php:28