From: Roan Kattouw Date: Fri, 20 Feb 2009 21:18:07 +0000 (+0000) Subject: API: Add a STRAIGHT_JOIN to list=logevents on Domas's request. Also make an implicit... X-Git-Tag: 1.31.0-rc.0~42753 X-Git-Url: https://git.cyclocoop.org/%7B%7B%20url_for%28%27votes%27%2C%20votes=%27waiting%27%29%20%7D%7D?a=commitdiff_plain;h=7b631ca58dd4b0dc4ced6e11525451767f88d2a9;p=lhc%2Fweb%2Fwiklou.git 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 --- 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 (