diff --git a/gosa-plugins/goto/personal/environment/class_selectPrinterDialog.inc b/gosa-plugins/goto/personal/environment/class_selectPrinterDialog.inc
index a3bac86f052b53c981f10c07881e8c9e30f00197..71023aa93325192df62398aab5936b4b5e6982ea 100644 (file)
/* Load possible departments */
$ui= get_userinfo();
$this->ui = $ui;
/* 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;
$ids = $this->config->idepartments;
$first = "";
$found = FALSE;
}
$printer_list = $this->getPrinter();
}
$printer_list = $this->getPrinter();
+ asort($printer_list);
$smarty->assign("regexPrinter" ,$this->regex);
$smarty->assign("deplistPrinter" ,$this->deplist);
$smarty->assign("depselectPrinter",$this->depselect);
$smarty->assign("gotoPrinters",$printer_list);
$smarty->assign("regexPrinter" ,$this->regex);
$smarty->assign("deplistPrinter" ,$this->deplist);
$smarty->assign("depselectPrinter",$this->depselect);
$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("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("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__)));
$smarty->assign("deplist", $this->config->idepartments);
$display.= $smarty->fetch(get_template_path('selectPrinterDialog.tpl', TRUE,dirname(__FILE__)));
$message= plugin::check();
if(empty($_POST['gotoPrinter'])){
$message= plugin::check();
if(empty($_POST['gotoPrinter'])){
- $message[] = _("Please select a printer or press cancel.");
+ $message[] = _("Please select a printer!");
}
return $message;
}
}
return $message;
}
if ($this->subtreesearch){
$res = get_list($filter,$module,$base,$attrs, GL_SIZELIMIT | GL_SUBSEARCH);
} else {
if ($this->subtreesearch){
$res = get_list($filter,$module,$base,$attrs, GL_SIZELIMIT | GL_SUBSEARCH);
} else {
- $base= get_ou('printerou').$base;
+ $base= get_ou('printerRDN').$base;
$res = get_list($filter,$module,$base,$attrs, GL_SIZELIMIT );
}
foreach($res as $printer) {
$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(!preg_match("/w/",$acl)){
continue;
}
-
if(isset($this->AlreadyAssigned[$printer['cn'][0]])) continue;
if(isset($this->AlreadyAssigned[$printer['cn'][0]])) continue;
-
if($detailed ==true){
$a_return[$printer['cn'][0]] = $printer;
}else{
if($detailed ==true){
$a_return[$printer['cn'][0]] = $printer;
}else{
}
}
}
}
-
-
-
-
// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
?>
// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
?>