X-Git-Url: https://git.cyclocoop.org/%27.WWW_URL.%27admin/?a=blobdiff_plain;f=maintenance%2FrollbackEdits.php;h=10c107e6740b3149dc58a3fe641ee30a4ea190ad;hb=2379efaad6bddc93e7f08ca42f017890169b44e4;hp=a2ddb93379d65773c6940cf94c0ddce62d96bf87;hpb=995449ef039b769a613ddf3731ece1e4c20d358c;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/rollbackEdits.php b/maintenance/rollbackEdits.php index a2ddb93379..10c107e674 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 ) {