From 91f1c4c9036a56eb3af5a7fbce567282501c2dd0 Mon Sep 17 00:00:00 2001 From: Tim Starling Date: Fri, 5 Feb 2010 04:40:57 +0000 Subject: [PATCH] Fix for r61957: initialise array variables explicitly. --- includes/api/ApiQueryLogEvents.php | 2 +- includes/api/ApiQueryRecentChanges.php | 2 +- includes/api/ApiQueryUserContributions.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/includes/api/ApiQueryLogEvents.php b/includes/api/ApiQueryLogEvents.php index a0c1c4ffcd..d6672b21d9 100644 --- a/includes/api/ApiQueryLogEvents.php +++ b/includes/api/ApiQueryLogEvents.php @@ -70,7 +70,7 @@ class ApiQueryLogEvents extends ApiQueryBase { 'page' => array( 'LEFT JOIN', array( 'log_namespace=page_namespace', 'log_title=page_title' ) ) ) ); - $index['logging'] = 'times'; // default, may change + $index = array( 'logging' => 'times' ); // default, may change $this->addFields( array ( 'log_type', diff --git a/includes/api/ApiQueryRecentChanges.php b/includes/api/ApiQueryRecentChanges.php index 0eb7dbd5ee..0d284d6bbb 100644 --- a/includes/api/ApiQueryRecentChanges.php +++ b/includes/api/ApiQueryRecentChanges.php @@ -114,7 +114,7 @@ class ApiQueryRecentChanges extends ApiQueryBase { */ $db = $this->getDB(); $this->addTables( 'recentchanges' ); - $index['recentchanges'] = 'rc_timestamp'; // May change + $index = array( 'recentchanges' => 'rc_timestamp' ); // May change $this->addWhereRange( 'rc_timestamp', $params['dir'], $params['start'], $params['end'] ); $this->addWhereFld( 'rc_namespace', $params['namespace'] ); $this->addWhereFld( 'rc_deleted', 0 ); diff --git a/includes/api/ApiQueryUserContributions.php b/includes/api/ApiQueryUserContributions.php index 4a52f287f0..79ceb86189 100644 --- a/includes/api/ApiQueryUserContributions.php +++ b/includes/api/ApiQueryUserContributions.php @@ -193,7 +193,7 @@ class ApiQueryContributions extends ApiQueryBase { $this->addWhereIf( 'rc_patrolled != 0', isset( $show['patrolled'] ) ); } $this->addOption( 'LIMIT', $this->params['limit'] + 1 ); - $index['revision'] = 'usertext_timestamp'; + $index = array( 'revision' => 'usertext_timestamp' ); // Mandatory fields: timestamp allows request continuation // ns+title checks if the user has access rights for this page -- 2.20.1