From: cajus Date: Wed, 23 May 2007 07:10:57 +0000 (+0000) Subject: Added subsearch to selectUserToPrinter X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=4d63c006df30ed2b189baba58a7984e2856ad88d;p=gosa.git Added subsearch to selectUserToPrinter git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@6443 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/admin/systems/class_selectUserToPrinterDialog.inc b/plugins/admin/systems/class_selectUserToPrinterDialog.inc index 8f1c8eca2..f4964c15b 100644 --- a/plugins/admin/systems/class_selectUserToPrinterDialog.inc +++ b/plugins/admin/systems/class_selectUserToPrinterDialog.inc @@ -12,6 +12,7 @@ class selectUserToPrinterDialog extends plugin var $attributes = array(); var $objectclasses = array("whatever"); var $regex = "*"; + var $subtree = FALSE; var $depselect = "/"; var $deplist = "/"; @@ -74,6 +75,7 @@ class selectUserToPrinterDialog extends plugin $this->regex=$_POST['regexPrinter']; $this->depselect = $_POST['depselectPrinter']; } + $this->subtree= isset($_POST['SubSearch']); if((isset($_GET['search']))&&(!empty($_GET['search']))){ $this->regex=$_GET['search']."*"; @@ -127,6 +129,7 @@ class selectUserToPrinterDialog extends plugin $smarty->assign("infoimage" , get_template_path('images/info.png')); $smarty->assign("launchimage" , get_template_path('images/small_filter.png')); $smarty->assign("deplist" , $deps); + $smarty->assign("subtree", $this->subtree?"checked":""); $display.= $smarty->fetch(get_template_path('selectUserToPrinterDialog.tpl', TRUE,dirname(__FILE__))); return($display); @@ -166,7 +169,11 @@ class selectUserToPrinterDialog extends plugin $attrs = $this->searchAttrs; $cat = $this->search_cat; - $res = get_list($filter,$cat,$base,$attrs); + if ($this->subtree){ + $res= get_list($filter,$cat,$base,$attrs, GL_SUBSEARCH); + } else { + $res= get_list($filter,$cat,$base,$attrs); + } foreach($res as $printer){ if(($detailed ==true)){ if(isset($printer[$this->searchAppend])){ diff --git a/plugins/admin/systems/selectUserToPrinterDialog.tpl b/plugins/admin/systems/selectUserToPrinterDialog.tpl index 0d387ef4d..5cd8e152a 100644 --- a/plugins/admin/systems/selectUserToPrinterDialog.tpl +++ b/plugins/admin/systems/selectUserToPrinterDialog.tpl @@ -25,6 +25,13 @@ {$alphabet}
+ + + + +
+  {t}Ignore subtrees{/t} +