aboutsummaryrefslogtreecommitdiffstats
path: root/maintenance/purgeList.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/purgeList.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/purgeList.php')
-rw-r--r--maintenance/purgeList.php18
1 files changed, 9 insertions, 9 deletions
diff --git a/maintenance/purgeList.php b/maintenance/purgeList.php
index a733d67ba53c..21d116963dd9 100644
--- a/maintenance/purgeList.php
+++ b/maintenance/purgeList.php
@@ -56,7 +56,7 @@ class PurgeList extends Maintenance {
*/
private function doPurge() {
$stdin = $this->getStdin();
- $urls = array();
+ $urls = [];
while ( !feof( $stdin ) ) {
$page = trim( fgets( $stdin ) );
@@ -89,25 +89,25 @@ class PurgeList extends Maintenance {
$dbr = $this->getDB( DB_SLAVE );
$startId = 0;
if ( $namespace === false ) {
- $conds = array();
+ $conds = [];
} else {
- $conds = array( 'page_namespace' => $namespace );
+ $conds = [ 'page_namespace' => $namespace ];
}
while ( true ) {
$res = $dbr->select( 'page',
- array( 'page_id', 'page_namespace', 'page_title' ),
- $conds + array( 'page_id > ' . $dbr->addQuotes( $startId ) ),
+ [ 'page_id', 'page_namespace', 'page_title' ],
+ $conds + [ 'page_id > ' . $dbr->addQuotes( $startId ) ],
__METHOD__,
- array(
+ [
'LIMIT' => $this->mBatchSize,
'ORDER BY' => 'page_id'
- )
+ ]
);
if ( !$res->numRows() ) {
break;
}
- $urls = array();
+ $urls = [];
foreach ( $res as $row ) {
$title = Title::makeTitle( $row->page_namespace, $row->page_title );
$url = $title->getInternalURL();
@@ -129,7 +129,7 @@ class PurgeList extends Maintenance {
if ( $this->hasOption( 'verbose' ) ) {
$this->output( $url . "\n" );
}
- $u = new CdnCacheUpdate( array( $url ) );
+ $u = new CdnCacheUpdate( [ $url ] );
$u->doUpdate();
usleep( $delay * 1e6 );
}