* 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 ===
$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'])) . "%'");
$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'])) . "%'");