From 02a90736f98485d21a52c646df5f041c2a8c3ecb Mon Sep 17 00:00:00 2001 From: enriquecd Date: Tue, 19 Dec 2017 10:57:44 +0100 Subject: [PATCH] Alphabetic order in group selects - #1699 --- pandora_console/include/functions_users.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pandora_console/include/functions_users.php b/pandora_console/include/functions_users.php index 60e0fc7cb1..2f2fe980ae 100755 --- a/pandora_console/include/functions_users.php +++ b/pandora_console/include/functions_users.php @@ -169,14 +169,14 @@ function users_get_groups ($id_user = false, $privilege = "AR", $returnAllGroup } else { // Admin. if (is_user_admin($id_user)) { - $groups = db_get_all_rows_sql ("SELECT * FROM tgrupo"); + $groups = db_get_all_rows_sql ("SELECT * FROM tgrupo ORDER BY nombre"); } // Per-group permissions. else { $query = sprintf("SELECT tgrupo.*, tperfil.*, tusuario_perfil.tags FROM tgrupo, tusuario_perfil, tperfil WHERE (tgrupo.id_grupo = tusuario_perfil.id_grupo OR tusuario_perfil.id_grupo = 0) AND tusuario_perfil.id_perfil = tperfil.id_perfil - AND tusuario_perfil.id_usuario = '%s'", $id_user); + AND tusuario_perfil.id_usuario = '%s' ORDER BY tgrupo.nombre", $id_user); $groups = db_get_all_rows_sql ($query); // Get children groups.