r62011 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r62010‎ | r62011 | r62012 >
Date:04:40, 5 February 2010
Author:tstarling
Status:ok
Tags:
Comment:
Fix for r61957: initialise array variables explicitly.
Modified paths:
  • /trunk/phase3/includes/api/ApiQueryLogEvents.php (modified) (history)
  • /trunk/phase3/includes/api/ApiQueryRecentChanges.php (modified) (history)
  • /trunk/phase3/includes/api/ApiQueryUserContributions.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/api/ApiQueryRecentChanges.php
@@ -114,7 +114,7 @@
115115 */
116116 $db = $this->getDB();
117117 $this->addTables( 'recentchanges' );
118 - $index['recentchanges'] = 'rc_timestamp'; // May change
 118+ $index = array( 'recentchanges' => 'rc_timestamp' ); // May change
119119 $this->addWhereRange( 'rc_timestamp', $params['dir'], $params['start'], $params['end'] );
120120 $this->addWhereFld( 'rc_namespace', $params['namespace'] );
121121 $this->addWhereFld( 'rc_deleted', 0 );
Index: trunk/phase3/includes/api/ApiQueryLogEvents.php
@@ -70,7 +70,7 @@
7171 'page' => array( 'LEFT JOIN',
7272 array( 'log_namespace=page_namespace',
7373 'log_title=page_title' ) ) ) );
74 - $index['logging'] = 'times'; // default, may change
 74+ $index = array( 'logging' => 'times' ); // default, may change
7575
7676 $this->addFields( array (
7777 'log_type',
Index: trunk/phase3/includes/api/ApiQueryUserContributions.php
@@ -193,7 +193,7 @@
194194 $this->addWhereIf( 'rc_patrolled != 0', isset( $show['patrolled'] ) );
195195 }
196196 $this->addOption( 'LIMIT', $this->params['limit'] + 1 );
197 - $index['revision'] = 'usertext_timestamp';
 197+ $index = array( 'revision' => 'usertext_timestamp' );
198198
199199 // Mandatory fields: timestamp allows request continuation
200200 // ns+title checks if the user has access rights for this page

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r61957Fix for r58399 (missing index on change_tag table), using the patch from bug ...tstarling23:30, 3 February 2010

Status & tagging log