Skip to content

Commit 55e6b63

Browse files
committed
Fixed: FS#1016 - Client list dropdown misses reasonable sorting
1 parent 8860e8a commit 55e6b63

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed

interface/web/dns/dns_soa_edit.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ function onShowEnd() {
7272
// If user is admin, we will allow him to select to whom this record belongs
7373
if($_SESSION["s"]["user"]["typ"] == 'admin') {
7474
// Getting Domains of the user
75-
$sql = "SELECT groupid, name FROM sys_group WHERE client_id > 0";
75+
$sql = "SELECT groupid, name FROM sys_group WHERE client_id > 0 ORDER by name";
7676
$clients = $app->db->queryAllRecords($sql);
7777
$client_select = '';
7878
if($_SESSION["s"]["user"]["typ"] == 'admin') $client_select .= "<option value='0'></option>";
@@ -90,7 +90,7 @@ function onShowEnd() {
9090
$client = $app->db->queryOneRecord("SELECT client.client_id, client.contact_name FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = $client_group_id");
9191

9292
// Fill the client select field
93-
$sql = "SELECT groupid, name FROM sys_group, client WHERE sys_group.client_id = client.client_id AND client.parent_client_id = ".$client['client_id'];
93+
$sql = "SELECT groupid, name FROM sys_group, client WHERE sys_group.client_id = client.client_id AND client.parent_client_id = ".$client['client_id']." ORDER BY name";
9494
$clients = $app->db->queryAllRecords($sql);
9595
$client_select = '<option value="'.$client['client_id'].'">'.$client['contact_name'].'</option>';
9696
if(is_array($clients)) {

interface/web/dns/dns_wizard.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@
8181
$app->tpl->setVar("server_id",$server_id_option);
8282

8383
// load the list of clients
84-
$sql = "SELECT groupid, name FROM sys_group WHERE client_id > 0";
84+
$sql = "SELECT groupid, name FROM sys_group WHERE client_id > 0 ORDER BY name";
8585
$clients = $app->db->queryAllRecords($sql);
8686
$client_select = '';
8787
if($_SESSION["s"]["user"]["typ"] == 'admin') $client_select .= "<option value='0'></option>";

interface/web/mail/mail_domain_edit.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ function onShowEnd() {
7272
if($_SESSION["s"]["user"]["typ"] == 'admin') {
7373
// Getting Clients of the user
7474
if($_SESSION["s"]["user"]["typ"] == 'admin') {
75-
$sql = "SELECT groupid, name FROM sys_group WHERE client_id > 0";
75+
$sql = "SELECT groupid, name FROM sys_group WHERE client_id > 0 ORDER BY name";
7676
} else {
7777
$client_group_id = $_SESSION["s"]["user"]["default_group"];
7878
$sql = "SELECT client.client_id, limit_web_domain, default_webserver FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = $client_group_id";
@@ -92,7 +92,7 @@ function onShowEnd() {
9292

9393
// Get the limits of the client
9494
$client_group_id = $_SESSION["s"]["user"]["default_group"];
95-
$client = $app->db->queryOneRecord("SELECT client.client_id, contact_name FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = $client_group_id");
95+
$client = $app->db->queryOneRecord("SELECT client.client_id, contact_name FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = $client_group_id order by contact_name");
9696

9797
// Set the webserver to the default server of the client
9898
$tmp = $app->db->queryOneRecord("SELECT server_name FROM server WHERE server_id = $client[default_webserver]");

interface/web/sites/database_edit.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ function onShowEnd() {
9393
unset($tmp);
9494

9595
// Fill the client select field
96-
$sql = "SELECT groupid, name FROM sys_group, client WHERE sys_group.client_id = client.client_id AND client.parent_client_id = ".$client['client_id'];
96+
$sql = "SELECT groupid, name FROM sys_group, client WHERE sys_group.client_id = client.client_id AND client.parent_client_id = ".$client['client_id']." ORDER BY name";
9797
$clients = $app->db->queryAllRecords($sql);
9898
$client_select = '<option value="'.$client['client_id'].'">'.$client['contact_name'].'</option>';
9999
if(is_array($clients)) {
@@ -130,7 +130,7 @@ function onShowEnd() {
130130
unset($ips);
131131

132132
// Fill the client select field
133-
$sql = "SELECT groupid, name FROM sys_group WHERE client_id > 0";
133+
$sql = "SELECT groupid, name FROM sys_group WHERE client_id > 0 ORDER BY name";
134134
$clients = $app->db->queryAllRecords($sql);
135135
$client_select = "<option value='0'></option>";
136136
if(is_array($clients)) {

interface/web/sites/web_domain_edit.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ function onShowEnd() {
111111
unset($tmp);
112112

113113
// Fill the client select field
114-
$sql = "SELECT groupid, name FROM sys_group, client WHERE sys_group.client_id = client.client_id AND client.parent_client_id = ".$client['client_id'];
114+
$sql = "SELECT groupid, name FROM sys_group, client WHERE sys_group.client_id = client.client_id AND client.parent_client_id = ".$client['client_id']." ORDER BY name";
115115
$clients = $app->db->queryAllRecords($sql);
116116
$client_select = '<option value="'.$client['client_id'].'">'.$client['contact_name'].'</option>';
117117
if(is_array($clients)) {
@@ -166,7 +166,7 @@ function onShowEnd() {
166166
unset($ips);
167167

168168
// Fill the client select field
169-
$sql = "SELECT groupid, name FROM sys_group WHERE client_id > 0";
169+
$sql = "SELECT groupid, name FROM sys_group WHERE client_id > 0 ORDER BY name";
170170
$clients = $app->db->queryAllRecords($sql);
171171
$client_select = "<option value='0'></option>";
172172
if(is_array($clients)) {

0 commit comments

Comments
 (0)