For MediaWiki (recent comments | status changes | tags | authors | states | release notes | statistics)
Index: trunk/phase3/includes/api/ApiQueryAllCategories.php =================================================================== --- trunk/phase3/includes/api/ApiQueryAllCategories.php (revision 42141) +++ trunk/phase3/includes/api/ApiQueryAllCategories.php (revision 42142) @@ -56,8 +56,9 @@ $this->addTables('category'); $this->addFields('cat_title'); - if (!is_null($params['from'])) - $this->addWhere('cat_title>=' . $db->addQuotes($this->titlePartToKey($params['from']))); + $dir = ($params['dir'] == 'descending' ? 'older' : 'newer'); + $from = (is_null($params['from']) ? null : $this->titlePartToKey($params['from'])); + $this->addWhereRange('cat_title', $dir, $from, null); if (isset ($params['prefix'])) $this->addWhere("cat_title LIKE '" . $db->escapeLike($this->titlePartToKey($params['prefix'])) . "%'"); Index: trunk/phase3/includes/api/ApiQueryAllimages.php =================================================================== --- trunk/phase3/includes/api/ApiQueryAllimages.php (revision 42141) +++ trunk/phase3/includes/api/ApiQueryAllimages.php (revision 42142) @@ -61,8 +61,9 @@ $params = $this->extractRequestParams(); // Image filters - if (!is_null($params['from'])) - $this->addWhere('img_name>=' . $db->addQuotes($this->titlePartToKey($params['from']))); + $dir = ($params['dir'] == 'descending' ? 'older' : 'newer'); + $from = (is_null($params['from']) ? null : $this->titlePartToKey($params['from'])); + $this->addWhereRange('img_name', $dir, $from, null); if (isset ($params['prefix'])) $this->addWhere("img_name LIKE '" . $db->escapeLike($this->titlePartToKey($params['prefix'])) . "%'"); Index: trunk/phase3/RELEASE-NOTES =================================================================== --- trunk/phase3/RELEASE-NOTES (revision 42141) +++ trunk/phase3/RELEASE-NOTES (revision 42142) @@ -337,6 +337,8 @@ * The maxage and smaxage parameters are now properly validated * (bug 15945) list=recentchanges doesn't check $wgUseRCPatrol, $wgUseNPPatrol and patrolmarks right +* (bug 15985) acfrom and aifrom parameters didn't work when sorting in + descending order. === Languages updated in 1.14 ===