From 7b631ca58dd4b0dc4ced6e11525451767f88d2a9 Mon Sep 17 00:00:00 2001 From: Roan Kattouw Date: Fri, 20 Feb 2009 21:18:07 +0000 Subject: [PATCH] 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 --- includes/api/ApiQueryLogEvents.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/includes/api/ApiQueryLogEvents.php b/includes/api/ApiQueryLogEvents.php index 6f6e39a185..5d491fc1ba 100644 --- a/includes/api/ApiQueryLogEvents.php +++ b/includes/api/ApiQueryLogEvents.php @@ -59,12 +59,14 @@ class ApiQueryLogEvents extends ApiQueryBase { $this->addWhere($hideLogs); // Order is significant here - $this->addTables(array('user', 'page', 'logging')); + $this->addTables(array('logging', 'user', 'page')); + $this->addOption('STRAIGHT_JOIN'); $this->addJoinConds(array( + 'user' => array('JOIN', + 'user_id=log_user'), 'page' => array('LEFT JOIN', array( 'log_namespace=page_namespace', 'log_title=page_title')))); - $this->addWhere('user_id=log_user'); $index = 'times'; // default, may change $this->addFields(array ( -- 2.20.1