summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 229ecbc)
raw | patch | inline | side by side (parent: 229ecbc)
author | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 23 May 2007 07:00:45 +0000 (07:00 +0000) | ||
committer | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 23 May 2007 07:00:45 +0000 (07:00 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@6442 594d385d-05f5-0310-b6e9-bd551577e9d8
plugins/admin/systems/class_selectUserToPrinterDialog.inc | patch | blob | history | |
plugins/admin/systems/selectUserToPrinterDialog.tpl | patch | blob | history |
diff --git a/plugins/admin/systems/class_selectUserToPrinterDialog.inc b/plugins/admin/systems/class_selectUserToPrinterDialog.inc
index e601e8745a87e54587882b86aefcfaeb9b4943e7..3469979c2761a6df6805de93636ca4543593f552 100644 (file)
var $attributes = array();
var $objectclasses = array("whatever");
var $regex = "*";
+ var $subtree = FALSE;
var $depselect = "/";
var $deplist = "/";
$this->regex=$_POST['regexPrinter'];
$this->depselect = $_POST['depselectPrinter'];
}
+ $this->subtree= isset($_POST['SubSearch']);
if((isset($_GET['search']))&&(!empty($_GET['search']))){
$this->regex=$_GET['search']."*";
$smarty->assign("infoimage" , get_template_path('images/info.png'));
$smarty->assign("launchimage" , get_template_path('images/small_filter.png'));
$smarty->assign("deplist" , $this->config->idepartments);
+ $smarty->assign("subtree", $this->subtree?"checked":"");
$display.= $smarty->fetch(get_template_path('selectUserToPrinterDialog.tpl', TRUE,dirname(__FILE__)));
return($display);
$a_return=array();
$ldap = $this->config->get_ldap_link();
$ldap->cd($this->depselect);
- #$ldap->search("(&".$this->searchObjects."(cn=".$this->regex."))", $this->depselect, $this->searchAttrs);
- $ldap->ls("(&".$this->searchObjects."(cn=".$this->regex."))", $this->baseAddition.$this->depselect, $this->searchAttrs);
+ if ($this->subtree){
+ $ldap->search("(&".$this->searchObjects."(cn=".$this->regex."))", $this->searchAttrs);
+ } else {
+ $ldap->ls("(&".$this->searchObjects."(cn=".$this->regex."))", $this->baseAddition.$this->depselect, $this->searchAttrs);
+ }
while($printer = $ldap->fetch()){
if(($detailed ==true)){
if(isset($printer[$this->searchAppend])){
diff --git a/plugins/admin/systems/selectUserToPrinterDialog.tpl b/plugins/admin/systems/selectUserToPrinterDialog.tpl
index 0d387ef4d3defb1292176638bc0e184dbe5146ab..5cd8e152ab1554b44a4c2f52900fd6b031b5037f 100644 (file)
<table summary="" style="width:100%;border-top:1px solid #B0B0B0;background-color:#F8F8F8">
{$alphabet}
</table>
+ <table summary="" width="100%" style="border-top:1px solid #B0B0B0;background-color:#F8F8F8">
+ <tr>
+ <td>
+ <input type='checkbox' name='SubSearch' value='1' title='{t}Select to search within subtrees{/t}' onClick='document.mainform.submit();' {$subtree}> {t}Ignore subtrees{/t}
+ </td>
+ </tr>
+ </table>
<table summary="" width="100%" style="border-top:1px solid #B0B0B0;background-color:#F8F8F8">
<tr>
<td>