summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 27b0be9)
raw | patch | inline | side by side (parent: 27b0be9)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 17 Oct 2006 04:20:07 +0000 (04:20 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 17 Oct 2006 04:20:07 +0000 (04:20 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@4885 594d385d-05f5-0310-b6e9-bd551577e9d8
plugins/admin/ogroups/class_ogroup.inc | patch | blob | history | |
plugins/admin/ogroups/ogroup_objects.tpl | patch | blob | history |
index 8d5c5b3ee4e93a0991ae1898dfacfd0d157663b6..03174fbd579e6f7dfa7fb4509bf5ba7e140e133b 100644 (file)
"W" => "workstations",
"T" => "terminals",
"F" => "phones",
+ "_" => "subtrees",
"P" => "printers") as $key => $val){
if (preg_match("/$key/", $this->gosaGroupObjects)){
}
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])) {
$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]);
}
/* 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()){
index cf248fe7819a6334b28956d0f69d8a1d38d2a695..fc5f158a16e062611d8246e40592af7b3c581f42 100644 (file)
<input type=checkbox name="printers" value="1" {$printers} onClick="mainform.submit()" title="{t}Select to see printers{/t}">{t}Show printers{/t}<br>
<input type=checkbox name="phones" value="1" {$phones} onClick="mainform.submit()" title="{t}Select to see phones{/t}">{t}Show phones{/t}<br>
</p>
+ <p class="contentboxb" style="border-top:1px solid #B0B0B0; background-color:#F8F8F8">
+ <input type=checkbox name="subtrees" value="1" {$subtrees} onClick="mainform.submit()" title="{t}Select to search within subtrees{/t}">{t}Ignore subtrees{/t}<br>
+ </p>
+
<table summary="" width="100%" style="border-top:1px solid #B0B0B0;background-color:#F8F8F8"><tr><td width="50%"><img alt="" src="{$tree_image}" align=middle title="{t}Display objects of department{/t}">
<select name="dselect" size=1 onChange="mainform.submit()" title="{t}Choose the department the search will be based on{/t}">
{html_options options=$deplist selected=$dselect}