From a3f2fa1b16d35d12f21ee270c3837f0bbb860443 Mon Sep 17 00:00:00 2001 From: rzeka Date: Tue, 28 Apr 2015 14:14:12 +0200 Subject: [PATCH] Better customers sorting based on name and company --- admin_domains.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/admin_domains.php b/admin_domains.php index 06d11d24..e8ae6e97 100644 --- a/admin_domains.php +++ b/admin_domains.php @@ -397,7 +397,7 @@ if ($page == 'domains' $documentroot = $_POST['documentroot']; } } elseif (isset($_POST['documentroot']) - && ($_POST['documentroot'] == '') + && ($_POST['documentroot'] == '') && (Settings::Get('system.documentroot_use_default_value') == 1) ) { $documentroot = makeCorrectDir($customer['documentroot'] . '/' . $domain); @@ -832,7 +832,7 @@ if ($page == 'domains' SELECT `customerid`, `loginname`, `name`, `firstname`, `company` FROM `" . TABLE_PANEL_CUSTOMERS . "` " . ($userinfo['customers_see_all'] ? '' : " WHERE `adminid` = '" . (int)$userinfo['adminid'] . "' ") . - " ORDER BY `name` ASC" + " ORDER BY COALESCE(NULLIF(`name`,''), `company`) ASC" ); $params = array(); if ($userinfo['customers_see_all'] == '0') {