47 return 'deleterevision';
56 return $rev ?
$rev->getTitle() : $target;
64 $ids = array_map(
'intval', $this->ids );
70 'rev_page' => $this->title->getArticleID(),
74 'ORDER BY' =>
'rev_id DESC',
75 'USE INDEX' => [
'revision' =>
'PRIMARY' ]
79 ChangeTags::modifyDisplayQuery(
83 $queryInfo[
'join_conds'],
84 $queryInfo[
'options'],
93 $queryInfo[
'options'],
94 $queryInfo[
'join_conds']
96 if ( $live->numRows() >= count(
$ids ) ) {
102 $archiveQueryInfo = [
103 'tables' => $arQuery[
'tables'],
104 'fields' => $arQuery[
'fields'],
108 'options' => [
'ORDER BY' =>
'ar_rev_id DESC' ],
109 'join_conds' => $arQuery[
'joins'],
112 ChangeTags::modifyDisplayQuery(
113 $archiveQueryInfo[
'tables'],
114 $archiveQueryInfo[
'fields'],
115 $archiveQueryInfo[
'conds'],
116 $archiveQueryInfo[
'join_conds'],
117 $archiveQueryInfo[
'options'],
122 $archived = $db->select(
123 $archiveQueryInfo[
'tables'],
124 $archiveQueryInfo[
'fields'],
125 $archiveQueryInfo[
'conds'],
127 $archiveQueryInfo[
'options'],
128 $archiveQueryInfo[
'join_conds']
131 if ( $archived->numRows() == 0 ) {
133 } elseif ( $live->numRows() == 0 ) {
138 foreach ( $live as $row ) {
139 $rows[$row->rev_id] = $row;
141 foreach ( $archived as $row ) {
142 $rows[$row->ar_rev_id] = $row;
150 if ( isset( $row->rev_id ) ) {
152 } elseif ( isset( $row->ar_rev_id ) ) {
156 throw new MWException(
'Invalid row type in RevDelRevisionList' );
161 if ( is_null( $this->currentRevId ) ) {
163 $this->currentRevId = $dbw->selectField(
164 'page',
'page_latest', $this->title->pageCond(), __METHOD__ );
174 $this->title->invalidateCache();
175 return Status::newGood();
179 $this->title->purgeSquid();
181 Hooks::run(
'ArticleRevisionVisibilitySet', [ $this->title, $this->ids, $visibilityChangeMap ] );
182 return Status::newGood();
wfGetDB( $db, $groups=[], $wiki=false)
Get a Database object.
Item class for a archive table row by ar_rev_id – actually used via RevDelRevisionList.
Abstract base class for a list of deletable items.
Item class for a live revision table row.
List for revision table items.
getSuppressBit()
Get the integer value of the flag used for suppression.
doPostCommitUpdates(array $visibilityChangeMap)
A hook for setVisibility(): do any necessary updates post-commit.
static getRevdelConstant()
Get the revision deletion constant for this list type Override this function.
static getRelationType()
Get the DB field name associated with the ID list.
static suggestTarget( $target, array $ids)
Suggest a target for the revision deletion Optionally override this function.
static getRestriction()
Get the user right required for this list type Override this function.
doPreCommitUpdates()
A hook for setVisibility(): do batch updates pre-commit.
getType()
Get the internal type name of this list.
newItem( $row)
Create an item object from a DB result row.
static getArchiveQueryInfo()
Return the tables, fields, and join conditions to be selected to create a new archived revision objec...
static getQueryInfo( $options=[])
Return the tables, fields, and join conditions to be selected to create a new revision object.
static newFromId( $id, $flags=0)
Load a page revision from a given revision ID number.
do that in ParserLimitReportFormat instead use this to modify the parameters of the image all existing parser cache entries will be invalid To avoid you ll need to handle that somehow(e.g. with the RejectParserCacheValue hook) because MediaWiki won 't do it for you. & $defaults also a ContextSource after deleting those rows but within the same transaction $rows
presenting them properly to the user as errors is done by the caller return true use this to change the list i e etc $rev
The wiki should then use memcached to cache various data To use multiple just add more items to the array To increase the weight of a make its entry a array("192.168.0.1:11211", 2))