Index: trunk/phase3/includes/api/ApiQueryLogEvents.php |
— | — | @@ -94,8 +94,7 @@ |
95 | 95 | |
96 | 96 | $limit = $params['limit']; |
97 | 97 | $this->addOption('LIMIT', $limit +1); |
98 | | - |
99 | | - $index = false; |
| 98 | + |
100 | 99 | $user = $params['user']; |
101 | 100 | if (!is_null($user)) { |
102 | 101 | $userid = User::idFromName($user); |
— | — | @@ -114,7 +113,7 @@ |
115 | 114 | $this->addWhereFld('log_title', $titleObj->getDBkey()); |
116 | 115 | |
117 | 116 | // Use the title index in preference to the user index if there is a conflict |
118 | | - $index = 'page_time'; |
| 117 | + $index = is_null($user) ? 'page_time' : array('page_time','user_time'); |
119 | 118 | } |
120 | 119 | if ( $index ) { |
121 | 120 | $this->addOption( 'USE INDEX', array( 'logging' => $index ) ); |