Index: trunk/phase3/includes/api/ApiQueryBase.php |
— | — | @@ -183,8 +183,9 @@ |
184 | 184 | * this is the lower boundary, otherwise it's the upper boundary |
185 | 185 | * @param $end string Value to end the list at. If $dir == 'newer' this |
186 | 186 | * is the upper boundary, otherwise it's the lower boundary |
| 187 | + * @param $sort bool If false, don't add an ORDER BY clause |
187 | 188 | */ |
188 | | - protected function addWhereRange($field, $dir, $start, $end) { |
| 189 | + protected function addWhereRange($field, $dir, $start, $end, $sort = true) { |
189 | 190 | $isDirNewer = ($dir === 'newer'); |
190 | 191 | $after = ($isDirNewer ? '>=' : '<='); |
191 | 192 | $before = ($isDirNewer ? '<=' : '>='); |
— | — | @@ -196,11 +197,13 @@ |
197 | 198 | if (!is_null($end)) |
198 | 199 | $this->addWhere($field . $before . $db->addQuotes($end)); |
199 | 200 | |
200 | | - $order = $field . ($isDirNewer ? '' : ' DESC'); |
201 | | - if (!isset($this->options['ORDER BY'])) |
202 | | - $this->addOption('ORDER BY', $order); |
203 | | - else |
204 | | - $this->addOption('ORDER BY', $this->options['ORDER BY'] . ', ' . $order); |
| 201 | + if ($sort) { |
| 202 | + $order = $field . ($isDirNewer ? '' : ' DESC'); |
| 203 | + if (!isset($this->options['ORDER BY'])) |
| 204 | + $this->addOption('ORDER BY', $order); |
| 205 | + else |
| 206 | + $this->addOption('ORDER BY', $this->options['ORDER BY'] . ', ' . $order); |
| 207 | + } |
205 | 208 | } |
206 | 209 | |
207 | 210 | /** |
Index: trunk/phase3/includes/api/ApiQueryRevisions.php |
— | — | @@ -176,9 +176,14 @@ |
177 | 177 | if (is_null($params['startid']) && is_null($params['endid'])) |
178 | 178 | $this->addWhereRange('rev_timestamp', $params['dir'], |
179 | 179 | $params['start'], $params['end']); |
180 | | - else |
| 180 | + else { |
181 | 181 | $this->addWhereRange('rev_id', $params['dir'], |
182 | 182 | $params['startid'], $params['endid']); |
| 183 | + // One of start and end can be set |
| 184 | + // If neither is set, this does nothing |
| 185 | + $this->addWhereRange('rev_timestamp', $params['dir'], |
| 186 | + $params['start'], $params['end'], false); |
| 187 | + } |
183 | 188 | |
184 | 189 | // must manually initialize unset limit |
185 | 190 | if (is_null($limit)) |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -189,6 +189,7 @@ |
190 | 190 | * File dupe messages for remote repos are now shown only once. |
191 | 191 | * (bug 14980) Messages 'shareduploadwiki' and 'shareduploadwiki-desc' are now |
192 | 192 | used as a parameter in 'sharedupload' for easier styling and customization. |
| 193 | +* (bug 17482) Formatting error in Special:Preferences#Misc (Opera) |
193 | 194 | |
194 | 195 | == API changes in 1.15 == |
195 | 196 | * (bug 16858) Revamped list=deletedrevs to make listing deleted contributions |
— | — | @@ -223,7 +224,7 @@ |
224 | 225 | * Added mainmodule and pagesetmodule parameters to action=paraminfo |
225 | 226 | * (bug 17502) meta=siteinfo&siprop=namespacealiases no longer lists namespace |
226 | 227 | aliases already listed in siprop=namespaces |
227 | | -* (bug 17482) Formatting error in Special:Preferences#Misc (Opera) |
| 228 | +* (bug 17529) rvend ignored when rvstartid is specified |
228 | 229 | |
229 | 230 | === Languages updated in 1.15 === |
230 | 231 | |