diff --git a/plugins/admin/systems/class_selectUserToPrinterDialog.inc b/plugins/admin/systems/class_selectUserToPrinterDialog.inc
index 143695676fbef9de278e853c578c52a5afcd2dc6..3469979c2761a6df6805de93636ca4543593f552 100644 (file)
class selectUserToPrinterDialog extends plugin
{
class selectUserToPrinterDialog extends plugin
{
- /* CLI vars */
- var $cli_summary = "Manage server basic objects";
- var $cli_description = "Some longer text\nfor help";
- var $cli_parameters = array("eins" => "Eins ist toll", "zwei" => "Zwei ist noch besser");
/* attribute list for save action */
var $ignore_account = TRUE;
var $attributes = array();
var $objectclasses = array("whatever");
var $regex = "*";
/* attribute list for save action */
var $ignore_account = TRUE;
var $attributes = array();
var $objectclasses = array("whatever");
var $regex = "*";
+ var $subtree = FALSE;
var $depselect = "/";
var $deplist = "/";
var $depselect = "/";
var $deplist = "/";
$this->regex=$_POST['regexPrinter'];
$this->depselect = $_POST['depselectPrinter'];
}
$this->regex=$_POST['regexPrinter'];
$this->depselect = $_POST['depselectPrinter'];
}
+ $this->subtree= isset($_POST['SubSearch']);
if((isset($_GET['search']))&&(!empty($_GET['search']))){
$this->regex=$_GET['search']."*";
if((isset($_GET['search']))&&(!empty($_GET['search']))){
$this->regex=$_GET['search']."*";
}
$tmp_printers= $this->getPrinter();
}
$tmp_printers= $this->getPrinter();
+ natcasesort($tmp_printers);
$smarty->assign("regexPrinter" , $this->regex);
$smarty->assign("deplistPrinter" , $this->config->idepartments);//deplist);
$smarty->assign("depselectPrinter" , $this->depselect);
$smarty->assign("regexPrinter" , $this->regex);
$smarty->assign("deplistPrinter" , $this->config->idepartments);//deplist);
$smarty->assign("depselectPrinter" , $this->depselect);
$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("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);
$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);
$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])){
while($printer = $ldap->fetch()){
if(($detailed ==true)){
if(isset($printer[$this->searchAppend])){