* To fix this, make the prop=revisions query slightly less performance-zealous and allow WHERE rev_timestamp <= 'foo' when sorting and rangescanning by rev_id
* Make adding ORDER BY in ApiQueryBase::addWhereRange() optional
* Move a RELEASE-NOTES entry to the right section
* File dupe messages for remote repos are now shown only once.
* (bug 14980) Messages 'shareduploadwiki' and 'shareduploadwiki-desc' are now
used as a parameter in 'sharedupload' for easier styling and customization.
+* (bug 17482) Formatting error in Special:Preferences#Misc (Opera)
== API changes in 1.15 ==
* (bug 16858) Revamped list=deletedrevs to make listing deleted contributions
* Added mainmodule and pagesetmodule parameters to action=paraminfo
* (bug 17502) meta=siteinfo&siprop=namespacealiases no longer lists namespace
aliases already listed in siprop=namespaces
-* (bug 17482) Formatting error in Special:Preferences#Misc (Opera)
+* (bug 17529) rvend ignored when rvstartid is specified
=== Languages updated in 1.15 ===
* this is the lower boundary, otherwise it's the upper boundary
* @param $end string Value to end the list at. If $dir == 'newer' this
* is the upper boundary, otherwise it's the lower boundary
+ * @param $sort bool If false, don't add an ORDER BY clause
*/
- protected function addWhereRange($field, $dir, $start, $end) {
+ protected function addWhereRange($field, $dir, $start, $end, $sort = true) {
$isDirNewer = ($dir === 'newer');
$after = ($isDirNewer ? '>=' : '<=');
$before = ($isDirNewer ? '<=' : '>=');
if (!is_null($end))
$this->addWhere($field . $before . $db->addQuotes($end));
- $order = $field . ($isDirNewer ? '' : ' DESC');
- if (!isset($this->options['ORDER BY']))
- $this->addOption('ORDER BY', $order);
- else
- $this->addOption('ORDER BY', $this->options['ORDER BY'] . ', ' . $order);
+ if ($sort) {
+ $order = $field . ($isDirNewer ? '' : ' DESC');
+ if (!isset($this->options['ORDER BY']))
+ $this->addOption('ORDER BY', $order);
+ else
+ $this->addOption('ORDER BY', $this->options['ORDER BY'] . ', ' . $order);
+ }
}
/**
if (is_null($params['startid']) && is_null($params['endid']))
$this->addWhereRange('rev_timestamp', $params['dir'],
$params['start'], $params['end']);
- else
+ else {
$this->addWhereRange('rev_id', $params['dir'],
$params['startid'], $params['endid']);
+ // One of start and end can be set
+ // If neither is set, this does nothing
+ $this->addWhereRange('rev_timestamp', $params['dir'],
+ $params['start'], $params['end'], false);
+ }
// must manually initialize unset limit
if (is_null($limit))