r47590 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r47589‎ | r47590 | r47591 >
Date:21:18, 20 February 2009
Author:catrope
Status:ok
Tags:
Comment:
API: Add a STRAIGHT_JOIN to list=logevents on Domas's request. Also make an implicit JOIN explicit so the LEFT JOIN still goes against the right table
Modified paths:
  • /trunk/phase3/includes/api/ApiQueryLogEvents.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/api/ApiQueryLogEvents.php
@@ -59,12 +59,14 @@
6060 $this->addWhere($hideLogs);
6161
6262 // Order is significant here
63 - $this->addTables(array('user', 'page', 'logging'));
 63+ $this->addTables(array('logging', 'user', 'page'));
 64+ $this->addOption('STRAIGHT_JOIN');
6465 $this->addJoinConds(array(
 66+ 'user' => array('JOIN',
 67+ 'user_id=log_user'),
6568 'page' => array('LEFT JOIN',
6669 array( 'log_namespace=page_namespace',
6770 'log_title=page_title'))));
68 - $this->addWhere('user_id=log_user');
6971 $index = 'times'; // default, may change
7072
7173 $this->addFields(array (

Status & tagging log