diff --git a/lam/templates/lists/listgroups.php b/lam/templates/lists/listgroups.php index 988b4d7a..b8e4849b 100644 --- a/lam/templates/lists/listgroups.php +++ b/lam/templates/lists/listgroups.php @@ -33,7 +33,7 @@ session_save_path("../../sess"); setlanguage(); // get sorting column when register_globals is off -$list = $_GET['list']; +$sort = $_GET['sort']; // copy HTTP-GET variables to HTTP-POST $_POST = $_POST + $_GET; @@ -121,7 +121,7 @@ if ($sr) { if ($info["count"] == 0) StatusMessage("WARN", "", _("No Groups found!")); // delete first array entry which is "count" array_shift($info); - // sort rows by sort column ($list) + // sort rows by sort column ($sort) usort($info, "cmp_array"); } else StatusMessage("ERROR", _("LDAP Search failed! Please check your preferences."), _("No Groups found!")); @@ -136,12 +136,12 @@ echo "\n"; echo ""; // table header for ($k = 0; $k < sizeof($desc_array); $k++) { - if (strtolower($attr_array[$k]) == $list) { + if (strtolower($attr_array[$k]) == $sort) { echo ""; + "sort=" . strtolower($attr_array[$k]) . $searchfilter . "\">" . $desc_array[$k] . ""; } else echo ""; + "sort=" . strtolower($attr_array[$k]) . $searchfilter . "\">" . $desc_array[$k] . ""; } echo "\n"; @@ -223,20 +223,20 @@ echo "\n"; function draw_navigation_bar ($count) { global $max_pageentrys; global $page; - global $list; + global $sort; global $searchfilter; echo ("
" . $desc_array[$k] . "" . $desc_array[$k] . "
\n"); echo ("\n"); echo (""); @@ -250,7 +250,7 @@ function draw_navigation_bar ($count) { echo (" " . ($i + 1)); else echo (" " . ($i + 1) . "\n"); + "&sort=" . $sort . "\">" . ($i + 1) . "\n"); } echo ("
  "); if ($page != 1) - echo ("<=\n"); + echo ("<=\n"); else echo ("<="); echo (" "); if ($page < ($count / $max_pageentrys)) - echo ("=>\n"); + echo ("=>\n"); else echo ("=>
\n"); } @@ -259,13 +259,13 @@ function draw_navigation_bar ($count) { // rows are sorted with the first attribute entry of the sort column // if objects have attributes with multiple values the others are ignored function cmp_array($a, $b) { - // list specifies the sort column - global $list; + // sort specifies the sort column + global $sort; global $attr_array; - // sort by first attribute with name $list - if (!$list) $list = strtolower($attr_array[0]); - if ($a[$list][0] == $b[$list][0]) return 0; - else if ($a[$list][0] == max($a[$list][0], $b[$list][0])) return 1; + // sort by first attribute with name $sort + if (!$sort) $sort = strtolower($attr_array[0]); + if ($a[$sort][0] == $b[$sort][0]) return 0; + else if ($a[$sort][0] == max($a[$sort][0], $b[$sort][0])) return 1; else return -1; } diff --git a/lam/templates/lists/listhosts.php b/lam/templates/lists/listhosts.php index 170de1fe..a0e653d7 100644 --- a/lam/templates/lists/listhosts.php +++ b/lam/templates/lists/listhosts.php @@ -33,7 +33,7 @@ session_save_path("../../sess"); setlanguage(); // get sorting column when register_globals is off -$list = $_GET['list']; +$sort = $_GET['sort']; // copy HTTP-GET variables to HTTP-POST $_POST = $_POST + $_GET; @@ -121,7 +121,7 @@ if ($sr) { if ($info["count"] == 0) StatusMessage("WARN", "", _("No Samba Hosts found!")); // delete first array entry which is "count" array_shift($info); - // sort rows by sort column ($list) + // sort rows by sort column ($sort) usort($info, "cmp_array"); } else StatusMessage("ERROR", _("LDAP Search failed! Please check your preferences."), _("No Samba Hosts found!")); @@ -136,12 +136,12 @@ echo "\n"; echo ""; // table header for ($k = 0; $k < sizeof($desc_array); $k++) { - if (strtolower($attr_array[$k]) == $list) { + if (strtolower($attr_array[$k]) == $sort) { echo ""; + "sort=" . strtolower($attr_array[$k]) . $searchfilter . "\">" . $desc_array[$k] . ""; } else echo ""; + "sort=" . strtolower($attr_array[$k]) . $searchfilter . "\">" . $desc_array[$k] . ""; } echo "\n"; @@ -206,20 +206,20 @@ echo "\n"; function draw_navigation_bar ($count) { global $max_pageentrys; global $page; - global $list; + global $sort; global $searchfilter; echo ("
" . $desc_array[$k] . "" . $desc_array[$k] . "
\n"); echo ("\n"); echo (""); @@ -233,7 +233,7 @@ function draw_navigation_bar ($count) { echo (" " . ($i + 1)); else echo (" " . ($i + 1) . "\n"); + "&sort=" . $sort . "\">" . ($i + 1) . "\n"); } echo ("
  "); if ($page != 1) - echo ("<=\n"); + echo ("<=\n"); else echo ("<="); echo (" "); if ($page < ($count / $max_pageentrys)) - echo ("=>\n"); + echo ("=>\n"); else echo ("=>
\n"); } @@ -242,13 +242,13 @@ function draw_navigation_bar ($count) { // rows are sorted with the first attribute entry of the sort column // if objects have attributes with multiple values the others are ignored function cmp_array($a, $b) { - // list specifies the sort column - global $list; + // sort specifies the sort column + global $sort; global $attr_array; - // sort by first attribute with name $list - if (!$list) $list = strtolower($attr_array[0]); - if ($a[$list][0] == $b[$list][0]) return 0; - else if ($a[$list][0] == max($a[$list][0], $b[$list][0])) return 1; + // sort by first attribute with name $sort + if (!$sort) $sort = strtolower($attr_array[0]); + if ($a[$sort][0] == $b[$sort][0]) return 0; + else if ($a[$sort][0] == max($a[$sort][0], $b[$sort][0])) return 1; else return -1; }