From: Bryan Tong Minh Date: Sun, 17 Feb 2008 18:43:31 +0000 (+0000) Subject: ApiQueryBase.php: Allow queries to have a where range that does not match the range... X-Git-Tag: 1.31.0-rc.0~49458 X-Git-Url: http://git.cyclocoop.org/%22.%24match%5B1%5D.%22?a=commitdiff_plain;h=ce2e97807c8251da199464aa4e3df699049d3a43;p=lhc%2Fweb%2Fwiklou.git ApiQueryBase.php: Allow queries to have a where range that does not match the range field --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index a69336238b..006c6afbe7 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -540,6 +540,7 @@ Full API documentation is available at http://www.mediawiki.org/wiki/API * Added siprop=namespacealiases to meta=siteinfo * Made multiple values for ucuser possible in list=usercontribs * (bug 12944) Added cmstart and cmend parameters to list=categorymembers +* Allow queries to have a where range that does not match the range field === Languages updated in 1.12 === diff --git a/includes/api/ApiQueryBase.php b/includes/api/ApiQueryBase.php index 69492dbe97..f964ea98d7 100644 --- a/includes/api/ApiQueryBase.php +++ b/includes/api/ApiQueryBase.php @@ -110,8 +110,9 @@ abstract class ApiQueryBase extends ApiBase { if (!is_null($end)) $this->addWhere($field . $before . $db->addQuotes($end)); - - $this->addOption('ORDER BY', $field . ($isDirNewer ? '' : ' DESC')); + + if (!isset($this->options['ORDER BY'])) + $this->addOption('ORDER BY', $field . ($isDirNewer ? '' : ' DESC')); } protected function addOption($name, $value = null) {