File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -161,9 +161,10 @@ function client_servers($field, $record) {
161161 $ sql = "SELECT $ server_type as server_id FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = ? " ;
162162 $ client = $ app ->db ->queryOneRecord ($ sql , $ client_group_id );
163163 if ($ client ['server_id ' ] > 0 ) {
164- //* Select the default server for the client
165- $ sql = "SELECT server_id,server_name FROM server WHERE server_id = ? " ;
166- $ records = $ app ->db ->queryAllRecords ($ sql , $ client ['server_id ' ]);
164+ ///* Select the available servers for the client
165+ $ clientservers = $ client ['server_id ' ];
166+ $ sql = "SELECT server_id,server_name FROM server WHERE server_id IN ( $ clientservers) ORDER BY server_name " ;
167+ $ records = $ app ->db ->queryAllRecords ($ sql );
167168 } else {
168169 //* Not able to find the clients defaults, use this as fallback and add a warning message to the log
169170 $ app ->log ('Unable to find default server for client in custom_datasource.inc.php ' , 1 );
You can’t perform that action at this time.
0 commit comments