fix listing of subdomains for customers, fixes #759

Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann
2019-11-20 09:33:28 +01:00
parent 5e01018f30
commit 620a22bf3e
4 changed files with 37 additions and 35 deletions

View File

@@ -331,15 +331,21 @@ abstract class ApiCommand extends ApiParameter
*
* @param array $sql_orderby
* optional array with index = fieldname and value = ASC|DESC
* @param boolean $append
* optional append to ORDER BY clause rather then create new one, default false [internal]
*
* @return string
*/
protected function getOrderBy()
protected function getOrderBy($append = false)
{
$orderby = $this->getParam('sql_orderby', true, array());
$order = "";
if (! empty($orderby)) {
$order .= " ORDER BY ";
if ($append) {
$order .= ", ";
} else {
$order .= " ORDER BY ";
}
foreach ($orderby as $field => $by) {
$sortfield = explode('.', $field);
foreach ($sortfield as $id => $sfield) {