MediaWiki  master
RevDelArchivedRevisionItem.php
Go to the documentation of this file.
1 <?php
27  public function getIdField() {
28  return 'ar_rev_id';
29  }
30 
31  public function getId() {
32  return $this->getRevisionRecord()->getId();
33  }
34 
35  public function setBits( $bits ) {
36  $dbw = wfGetDB( DB_MASTER );
37  $dbw->update( 'archive',
38  [ 'ar_deleted' => $bits ],
39  [ 'ar_rev_id' => $this->row->ar_rev_id,
40  'ar_deleted' => $this->getBits()
41  ],
42  __METHOD__ );
43 
44  return (bool)$dbw->affectedRows();
45  }
46 }
wfGetDB
wfGetDB( $db, $groups=[], $wiki=false)
Get a Database object.
Definition: GlobalFunctions.php:2475
RevDelArchivedRevisionItem\getIdField
getIdField()
Get the DB field name associated with the ID list.
Definition: RevDelArchivedRevisionItem.php:27
DB_MASTER
const DB_MASTER
Definition: defines.php:26
RevDelArchiveItem
Item class for a archive table row.
Definition: RevDelArchiveItem.php:28
RevDelArchivedRevisionItem\getId
getId()
Get the ID, as it would appear in the ids URL parameter.
Definition: RevDelArchivedRevisionItem.php:31
RevDelArchivedRevisionItem
Item class for a archive table row by ar_rev_id – actually used via RevDelRevisionList.
Definition: RevDelArchivedRevisionItem.php:26
RevDelArchivedRevisionItem\setBits
setBits( $bits)
Set the visibility of the item.
Definition: RevDelArchivedRevisionItem.php:35
RevDelRevisionItem\getRevisionRecord
getRevisionRecord()
Get the RevisionRecord for the item.
Definition: RevDelRevisionItem.php:57