Add unit tests for if="var" support in XML query

This commit is contained in:
Kijin Sung 2025-02-15 22:42:11 +09:00
parent 658a28dfd8
commit ae0e13eca9
3 changed files with 67 additions and 1 deletions

View file

@ -245,7 +245,11 @@ class Query extends VariableBase
// Compose the ORDER BY clause.
if ($this->navigation && count($this->navigation->orderby) && !$count_only)
{
$result .= ' ORDER BY ' . $this->_arrangeOrderBy($this->navigation);
$order_by = $this->_arrangeOrderBy($this->navigation);
if ($order_by !== '')
{
$result .= ' ORDER BY ' . $order_by;
}
}
// Compose the LIMIT/OFFSET clause.