diff --git a/lam/templates/lists/listgroups.php b/lam/templates/lists/listgroups.php index f6ef204a..396ecfe4 100644 --- a/lam/templates/lists/listgroups.php +++ b/lam/templates/lists/listgroups.php @@ -201,10 +201,12 @@ for ($i = $table_begin; $i < $table_end; $i++) { if ((! $_GET['norefresh']) && (is_array($grp_info[$i][strtolower($attr_array[$k])]))) array_shift($grp_info[$i][strtolower($attr_array[$k])]); // generate links for group members if (strtolower($attr_array[$k]) == "memberuid") { + // sort array + sort($grp_info[$i][strtolower($attr_array[$k])]); + // make a link for each member of the group $linklist = array(); for ($d = 0; $d < sizeof($grp_info[$i][strtolower($attr_array[$k])]); $d++) { $user = $grp_info[$i][strtolower($attr_array[$k])][$d]; // user name - // make a link for each member of the group $linklist[$d] = "" . $user . ""; } echo implode("; ", $linklist); @@ -212,9 +214,11 @@ for ($i = $table_begin; $i < $table_end; $i++) { // print all other attributes else { if (is_array($grp_info[$i][strtolower($attr_array[$k])])) { - echo implode("; ", $grp_info[$i][strtolower($attr_array[$k])]); + // sort array + sort($grp_info[$i][strtolower($attr_array[$k])]); + echo utf8_decode(implode("; ", $grp_info[$i][strtolower($attr_array[$k])])); } - else echo $grp_info[$i][strtolower($attr_array[$k])]; + else echo utf8_decode($grp_info[$i][strtolower($attr_array[$k])]); } } echo (""); diff --git a/lam/templates/lists/listhosts.php b/lam/templates/lists/listhosts.php index 371710c1..33051827 100644 --- a/lam/templates/lists/listhosts.php +++ b/lam/templates/lists/listhosts.php @@ -204,8 +204,12 @@ for ($i = $table_begin; $i < $table_end; $i++) { if (sizeof($hst_info[$i][strtolower($attr_array[$k])]) > 0) { // delete first array entry which is "count" if ((! $_GET['norefresh']) && (is_array($hst_info[$i][strtolower($attr_array[$k])]))) array_shift($hst_info[$i][strtolower($attr_array[$k])]); - if (is_array($hst_info[$i][strtolower($attr_array[$k])])) echo implode("; ", $hst_info[$i][strtolower($attr_array[$k])]); - else echo $hst_info[$i][strtolower($attr_array[$k])]; + if (is_array($hst_info[$i][strtolower($attr_array[$k])])) { + // sort array + sort($hst_info[$i][strtolower($attr_array[$k])]); + echo utf8_decode(implode("; ", $hst_info[$i][strtolower($attr_array[$k])])); + } + else echo utf8_decode($hst_info[$i][strtolower($attr_array[$k])]); } echo (""); } diff --git a/lam/templates/lists/listusers.php b/lam/templates/lists/listusers.php index 29218cc3..4e06e0c3 100644 --- a/lam/templates/lists/listusers.php +++ b/lam/templates/lists/listusers.php @@ -270,6 +270,8 @@ if ($user_count != 0) { if (is_array($userinfo[$i][strtolower($attr_array[$k])])) { // delete first array entry which is "count" array_shift($userinfo[$i][strtolower($attr_array[$k])]); + // sort array + sort($userinfo[$i][strtolower($attr_array[$k])]); if (($trans_primary == "on") && (strtolower($attr_array[$k]) == "gidnumber")) { // translate GID number to group name if ($trans_primary_hash[$userinfo[$i][strtolower($attr_array[$k])][0]]) {