X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=gosa-plugins%2Fgoto%2Fpersonal%2Fenvironment%2Fclass_selectPrinterDialog.inc;h=b4da61ca1b797729710c4fd83c15404ceb802e87;hb=7b0a3278f618c4ca532c6c5f842661e1b5d436b6;hp=b1ebc49602c8e82bfab3c3041e95d12a5dc7fb95;hpb=118c8f12fdf0da25908fd63a1fa3a5e09651c861;p=gosa.git diff --git a/gosa-plugins/goto/personal/environment/class_selectPrinterDialog.inc b/gosa-plugins/goto/personal/environment/class_selectPrinterDialog.inc index b1ebc4960..b4da61ca1 100644 --- a/gosa-plugins/goto/personal/environment/class_selectPrinterDialog.inc +++ b/gosa-plugins/goto/personal/environment/class_selectPrinterDialog.inc @@ -2,11 +2,6 @@ class selectPrinterDialog 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(); @@ -42,7 +37,7 @@ class selectPrinterDialog extends plugin /* Load possible departments */ $ui= get_userinfo(); $this->ui = $ui; - $tdeps= $ui->get_module_departments("users"); + $tdeps= $ui->get_module_departments("printer"); $ids = $this->config->idepartments; $first = ""; $found = FALSE; @@ -84,18 +79,20 @@ class selectPrinterDialog extends plugin $this->regex=preg_replace("/\*\*/","*",$this->regex); } + $printer_list = $this->getPrinter(); + $smarty->assign("regexPrinter" ,$this->regex); $smarty->assign("deplistPrinter" ,$this->deplist); $smarty->assign("depselectPrinter",$this->depselect); - $smarty->assign("gotoPrinters",$this->getPrinter()); - $smarty->assign("gotoPrinterKeys",array_flip($this->getPrinter())); + $smarty->assign("gotoPrinters",$printer_list); + $smarty->assign("gotoPrinterKeys",array_flip($printer_list)); $smarty->assign("apply", apply_filter()); $smarty->assign("alphabet", generate_alphabet()); $smarty->assign("subtrees", $this->subtreesearch?"checked":""); - $smarty->assign("search_image", get_template_path('images/search.png')); - $smarty->assign("tree_image", get_template_path('images/tree.png')); + $smarty->assign("search_image", get_template_path('images/lists/search.png')); + $smarty->assign("tree_image", get_template_path('images/lists/search-subtree.png')); $smarty->assign("infoimage", get_template_path('images/info.png')); - $smarty->assign("launchimage", get_template_path('images/small_filter.png')); + $smarty->assign("launchimage", get_template_path('images/lists/action.png')); $smarty->assign("deplist", $this->config->idepartments); $display.= $smarty->fetch(get_template_path('selectPrinterDialog.tpl', TRUE,dirname(__FILE__))); @@ -107,7 +104,7 @@ class selectPrinterDialog extends plugin $message= plugin::check(); if(empty($_POST['gotoPrinter'])){ - $message[] = _("Please select a printer or press cancel."); + $message[] = _("Please select a printer!"); } return $message; } @@ -134,20 +131,16 @@ class selectPrinterDialog extends plugin if ($this->subtreesearch){ $res = get_list($filter,$module,$base,$attrs, GL_SIZELIMIT | GL_SUBSEARCH); } else { - $base= get_ou('printerou').$base; - $res = get_list($filter,$module,$base,$attrs, GL_SIZELIMIT); + $base= get_ou('printerRDN').$base; + $res = get_list($filter,$module,$base,$attrs, GL_SIZELIMIT ); } foreach($res as $printer) { - - $acl = $this->ui->get_permissions($printer['dn'],"printer/printgeneric","gotoUserPrinter"); - + $acl = $this->ui->get_permissions($printer['dn'],"printer/printgeneric","gotoUserPrinter");; if(!preg_match("/w/",$acl)){ continue; } - if(isset($this->AlreadyAssigned[$printer['cn'][0]])) continue; - if($detailed ==true){ $a_return[$printer['cn'][0]] = $printer; }else{ @@ -162,9 +155,5 @@ class selectPrinterDialog extends plugin } } - - - - // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler: ?>