From: hickert
Date: Tue, 17 Oct 2006 04:20:07 +0000 (+0000)
Subject: Readded roomNumber update
X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=6a8b6c262fd81b4055c2c3179c80bb0f7eebf2e7;p=gosa.git
Readded roomNumber update
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@4885 594d385d-05f5-0310-b6e9-bd551577e9d8
---
diff --git a/plugins/admin/ogroups/class_ogroup.inc b/plugins/admin/ogroups/class_ogroup.inc
index 8d5c5b3ee..03174fbd5 100644
--- a/plugins/admin/ogroups/class_ogroup.inc
+++ b/plugins/admin/ogroups/class_ogroup.inc
@@ -71,6 +71,7 @@ class ogroup extends plugin
"W" => "workstations",
"T" => "terminals",
"F" => "phones",
+ "_" => "subtrees",
"P" => "printers") as $key => $val){
if (preg_match("/$key/", $this->gosaGroupObjects)){
@@ -238,7 +239,7 @@ class ogroup extends plugin
}
if (isset($_POST['dselect'])){
foreach( array("accounts", "groups", "applications", "departments",
- "servers", "workstations", "terminals", "printers",
+ "servers", "workstations", "terminals", "printers","subtrees",
"phones") as $type){
if (isset($_POST[$type])) {
@@ -268,7 +269,7 @@ class ogroup extends plugin
$smarty->assign("deplist", $this->config->idepartments);
$smarty->assign("alphabet", generate_alphabet());
foreach( array("dselect", "regex", "accounts", "groups", "applications",
- "departments", "servers", "workstations", "terminals",
+ "departments", "servers", "workstations", "terminals","subtrees",
"printers", "phones") as $type){
$smarty->assign("$type", $ogfilter[$type]);
}
@@ -411,8 +412,15 @@ class ogroup extends plugin
/* Perform search for selected objectClasses */
foreach($objectClasses as $class=> $basedn){
- $ldap->ls("(&(objectClass=".$class.")(|(uid=$regex)(cn=$regex)(ou=$regex)))",$basedn.$ogfilter['dselect'] ,
- array("dn", "cn", "description", "objectClass", "sn", "givenName", "uid","ou"));
+
+ if($ogfilter['subtrees'] == "checked"){
+ $ldap->cd($ogfilter['dselect']);
+ $ldap->search("(&(objectClass=".$class.")(|(uid=$regex)(cn=$regex)(ou=$regex)))",
+ array("dn", "cn", "description", "objectClass", "sn", "givenName", "uid","ou"));
+ }else{
+ $ldap->ls("(&(objectClass=".$class.")(|(uid=$regex)(cn=$regex)(ou=$regex)))",$basedn.$ogfilter['dselect'] ,
+ array("dn", "cn", "description", "objectClass", "sn", "givenName", "uid","ou"));
+ }
/* fetch results and append them to the list */
while($attrs = $ldap->fetch()){
diff --git a/plugins/admin/ogroups/ogroup_objects.tpl b/plugins/admin/ogroups/ogroup_objects.tpl
index cf248fe78..fc5f158a1 100644
--- a/plugins/admin/ogroups/ogroup_objects.tpl
+++ b/plugins/admin/ogroups/ogroup_objects.tpl
@@ -34,6 +34,10 @@
{t}Show printers{/t}
{t}Show phones{/t}
+
+ {t}Ignore subtrees{/t}
+
+
|