Go to the documentation of this file.
48 return 'deleterevision';
52 return RevisionRecord::DELETED_TEXT;
57 return $rev ? $rev->getTitle() : $target;
65 $ids = array_map(
'intval', $this->ids );
71 'rev_page' => $this->title->getArticleID(),
75 'ORDER BY' =>
'rev_id DESC',
76 'USE INDEX' => [
'revision' =>
'PRIMARY' ]
84 $queryInfo[
'join_conds'],
85 $queryInfo[
'options'],
94 $queryInfo[
'options'],
95 $queryInfo[
'join_conds']
97 if ( $live->numRows() >= count(
$ids ) ) {
103 $archiveQueryInfo = [
104 'tables' => $arQuery[
'tables'],
105 'fields' => $arQuery[
'fields'],
109 'options' => [
'ORDER BY' =>
'ar_rev_id DESC' ],
110 'join_conds' => $arQuery[
'joins'],
114 $archiveQueryInfo[
'tables'],
115 $archiveQueryInfo[
'fields'],
116 $archiveQueryInfo[
'conds'],
117 $archiveQueryInfo[
'join_conds'],
118 $archiveQueryInfo[
'options'],
123 $archived = $db->select(
124 $archiveQueryInfo[
'tables'],
125 $archiveQueryInfo[
'fields'],
126 $archiveQueryInfo[
'conds'],
128 $archiveQueryInfo[
'options'],
129 $archiveQueryInfo[
'join_conds']
132 if ( $archived->numRows() == 0 ) {
134 } elseif ( $live->numRows() == 0 ) {
139 foreach ( $live as $row ) {
140 $rows[$row->rev_id] = $row;
142 foreach ( $archived as $row ) {
143 $rows[$row->ar_rev_id] = $row;
151 if ( isset( $row->rev_id ) ) {
153 } elseif ( isset( $row->ar_rev_id ) ) {
157 throw new MWException(
'Invalid row type in RevDelRevisionList' );
162 if ( is_null( $this->currentRevId ) ) {
164 $this->currentRevId = $dbw->selectField(
165 'page',
'page_latest', $this->title->pageCond(), __METHOD__ );
171 return RevisionRecord::DELETED_RESTRICTED;
175 $this->title->invalidateCache();
180 $this->title->purgeSquid();
182 Hooks::run(
'ArticleRevisionVisibilitySet', [ $this->title, $this->ids, $visibilityChangeMap ] );
doPreCommitUpdates()
A hook for setVisibility(): do batch updates pre-commit.
static newFromId( $id, $flags=0)
Load a page revision from a given revision ID number.
doPostCommitUpdates(array $visibilityChangeMap)
A hook for setVisibility(): do any necessary updates post-commit.
static getArchiveQueryInfo()
Return the tables, fields, and join conditions to be selected to create a new archived revision objec...
getType()
Get the internal type name of this list.
static getQueryInfo( $options=[])
Return the tables, fields, and join conditions to be selected to create a new revision object.
wfGetDB( $db, $groups=[], $wiki=false)
Get a Database object.
static getRelationType()
Get the DB field name associated with the ID list.
List for revision table items.
static getRevdelConstant()
Get the revision deletion constant for this list type Override this function.
static newGood( $value=null)
Factory function for good results.
getSuppressBit()
Get the integer value of the flag used for suppression.
static getRestriction()
Get the user right required for this list type Override this function.
Item class for a archive table row by ar_rev_id – actually used via RevDelRevisionList.
newItem( $row)
Create an item object from a DB result row.
static run( $event, array $args=[], $deprecatedVersion=null)
Call hook functions defined in Hooks::register and $wgHooks.
static suggestTarget( $target, array $ids)
Suggest a target for the revision deletion Optionally override this function.