*/
public function doQuery( $db ) {
$ids = array_map( 'intval', $this->ids );
- $queryInfo = array(
- 'tables' => array( 'revision', 'user' ),
+ $queryInfo = [
+ 'tables' => [ 'revision', 'user' ],
'fields' => array_merge( Revision::selectFields(), Revision::selectUserFields() ),
- 'conds' => array(
+ 'conds' => [
'rev_page' => $this->title->getArticleID(),
'rev_id' => $ids,
- ),
- 'options' => array( 'ORDER BY' => 'rev_id DESC' ),
- 'join_conds' => array(
+ ],
+ 'options' => [ 'ORDER BY' => 'rev_id DESC' ],
+ 'join_conds' => [
'page' => Revision::pageJoinCond(),
'user' => Revision::userJoinCond(),
- ),
- );
+ ],
+ ];
ChangeTags::modifyDisplayQuery(
$queryInfo['tables'],
$queryInfo['fields'],
}
// Check if any requested revisions are available fully deleted.
- $archived = $db->select( array( 'archive' ), Revision::selectArchiveFields(),
- array(
+ $archived = $db->select( [ 'archive' ], Revision::selectArchiveFields(),
+ [
'ar_rev_id' => $ids
- ),
+ ],
__METHOD__,
- array( 'ORDER BY' => 'ar_rev_id DESC' )
+ [ 'ORDER BY' => 'ar_rev_id DESC' ]
);
if ( $archived->numRows() == 0 ) {
return $archived;
} else {
// Combine the two! Whee
- $rows = array();
+ $rows = [];
foreach ( $live as $row ) {
$rows[$row->rev_id] = $row;
}
public function doPostCommitUpdates() {
$this->title->purgeSquid();
// Extensions that require referencing previous revisions may need this
- Hooks::run( 'ArticleRevisionVisibilitySet', array( $this->title, $this->ids ) );
+ Hooks::run( 'ArticleRevisionVisibilitySet', [ $this->title, $this->ids ] );
return Status::newGood();
}
}