Fix count error when searching by extra_vars

https://xetown.com/questions/1519425
This commit is contained in:
Kijin Sung 2021-01-31 01:34:56 +09:00
parent 6b0ef1f468
commit 800f323b9c
2 changed files with 3 additions and 4 deletions

View file

@ -232,13 +232,13 @@ class Query extends VariableBase
}
// Compose the ORDER BY clause.
if ($this->navigation && count($this->navigation->orderby) && ($count_only != 1 || $count_wrap))
if ($this->navigation && count($this->navigation->orderby) && !$count_only)
{
$result .= ' ORDER BY ' . $this->_arrangeOrderBy($this->navigation);
}
// Compose the LIMIT/OFFSET clause.
if ($this->navigation && $this->navigation->list_count && ($count_only != 1 || $count_wrap))
if ($this->navigation && $this->navigation->list_count && !$count_only)
{
$result .= ' LIMIT ' . $this->_arrangeLimitOffset($this->navigation);
}