aboutsummaryrefslogtreecommitdiffstats
path: root/maintenance/rollbackEdits.php
diff options
context:
space:
mode:
authorKunal Mehta <legoktm@member.fsf.org>2016-02-17 01:09:32 -0800
committerKunal Mehta <legoktm@member.fsf.org>2016-02-17 01:33:00 -0800
commit6e9b4f0e9ce4ccd6089c18b205065ef7fa077484 (patch)
tree58645fbce5c12d01b0d0fa87e338d4745e08920d /maintenance/rollbackEdits.php
parent2fd379fa95f223c6b3f3c8eff6de068eca9e1a1a (diff)
downloadmediawikicore-6e9b4f0e9ce4ccd6089c18b205065ef7fa077484.tar.gz
mediawikicore-6e9b4f0e9ce4ccd6089c18b205065ef7fa077484.zip
Convert all array() syntax to []
Per wikitech-l consensus: https://lists.wikimedia.org/pipermail/wikitech-l/2016-February/084821.html Notes: * Disabled CallTimePassByReference due to false positives (T127163) Change-Id: I2c8ce713ce6600a0bb7bf67537c87044c7a45c4b
Diffstat (limited to 'maintenance/rollbackEdits.php')
-rw-r--r--maintenance/rollbackEdits.php14
1 files changed, 7 insertions, 7 deletions
diff --git a/maintenance/rollbackEdits.php b/maintenance/rollbackEdits.php
index a2ddb93379d6..10c107e6740b 100644
--- a/maintenance/rollbackEdits.php
+++ b/maintenance/rollbackEdits.php
@@ -55,8 +55,8 @@ class RollbackEdits extends Maintenance {
$bot = $this->hasOption( 'bot' );
$summary = $this->getOption( 'summary', $this->mSelf . ' mass rollback' );
- $titles = array();
- $results = array();
+ $titles = [];
+ $results = [];
if ( $this->hasOption( 'titles' ) ) {
foreach ( explode( '|', $this->getOption( 'titles' ) ) as $title ) {
$t = Title::newFromText( $title );
@@ -76,7 +76,7 @@ class RollbackEdits extends Maintenance {
return;
}
- $doer = User::newSystemUser( 'Maintenance script', array( 'steal' => true ) );
+ $doer = User::newSystemUser( 'Maintenance script', [ 'steal' => true ] );
foreach ( $titles as $t ) {
$page = WikiPage::factory( $t );
@@ -96,11 +96,11 @@ class RollbackEdits extends Maintenance {
*/
private function getRollbackTitles( $user ) {
$dbr = $this->getDB( DB_SLAVE );
- $titles = array();
+ $titles = [];
$results = $dbr->select(
- array( 'page', 'revision' ),
- array( 'page_namespace', 'page_title' ),
- array( 'page_latest = rev_id', 'rev_user_text' => $user ),
+ [ 'page', 'revision' ],
+ [ 'page_namespace', 'page_title' ],
+ [ 'page_latest = rev_id', 'rev_user_text' => $user ],
__METHOD__
);
foreach ( $results as $row ) {