MediaWiki REL1_37
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_PRIMARY );
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( $db, $groups=[], $wiki=false)
Get a Database object.
Item class for a archive table row.
Item class for a archive table row by ar_rev_id – actually used via RevDelRevisionList.
setBits( $bits)
Set the visibility of the item.
getId()
Get the ID, as it would appear in the ids URL parameter.
getIdField()
Get the DB field name associated with the ID list.
getRevisionRecord()
Get the RevisionRecord for the item.
const DB_PRIMARY
Definition defines.php:27