diff --git a/lam/templates/lists/listgroups.php b/lam/templates/lists/listgroups.php
index 43686f1d..030f1474 100644
--- a/lam/templates/lists/listgroups.php
+++ b/lam/templates/lists/listgroups.php
@@ -78,6 +78,7 @@ if ($_SESSION["config"]->get_MaxListEntries() <= 0)
else
$max_pageentrys = $_SESSION["config"]->get_MaxListEntries();
+// generate column attributes and descriptions
for ($i = 0; $i < sizeof($temp_array); $i++) {
// if value is predifined, look up description in hash_table
if (substr($temp_array[$i],0,1) == "#") {
@@ -93,6 +94,12 @@ for ($i = 0; $i < sizeof($temp_array); $i++) {
}
}
+// check search suffix
+if ($_POST['grp_suffix']) $grp_suffix = $_POST['grp_suffix']; // new suffix selected via combobox
+elseif ($_SESSION['grp_suffix']) $grp_suffix = $_SESSION['grp_suffix']; // old suffix from session
+else $grp_suffix = $_SESSION["config"]->get_GroupSuffix(); // default suffix
+session_register('grp_suffix');
+
// generate search filter for sort links
$searchfilter = "";
for ($k = 0; $k < sizeof($desc_array); $k++) {
@@ -115,7 +122,7 @@ for ($k = 0; $k < sizeof($desc_array); $k++) {
$filter = $filter . ")";
$attrs = $attr_array;
$sr = @ldap_search($_SESSION["ldap"]->server(),
- $_SESSION["config"]->get_GroupSuffix(),
+ $grp_suffix,
$filter, $attrs);
if ($sr) {
$info = ldap_get_entries($_SESSION["ldap"]->server, $sr);
@@ -215,9 +222,30 @@ draw_navigation_bar(sizeof($info));
echo ("
\n");
}
+// generate list of possible suffixes
+$sr = @ldap_search($_SESSION["ldap"]->server(),
+ $_SESSION["config"]->get_GroupSuffix(),
+ "objectClass=organizationalunit", array("DN"));
+if ($sr) {
+ $units = ldap_get_entries($_SESSION["ldap"]->server, $sr);
+ // delete first array entry which is "count"
+ array_shift($units);
+}
+
echo ("
\n"); echo ("\n"); if (sizeof($info) > 0) echo ("\n"); +// print combobox with possible sub-DNs +if (sizeof($units) > 1) { +echo (" " . _("Suffix") . ": "); +echo ("\n"); +echo (""); +} echo ("
\n"); echo ("\n"); echo "