From e7aac12ed5ba7c5e4530d5730611800b6132b0d2 Mon Sep 17 00:00:00 2001 From: cajus Date: Fri, 31 Oct 2008 15:33:26 +0000 Subject: [PATCH] Fixed sorting in printer lists git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@12849 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-plugins/goto/personal/environment/class_environment.inc | 4 ++-- .../goto/personal/environment/class_selectPrinterDialog.inc | 2 +- gosa-plugins/goto/personal/environment/environment.tpl | 4 ++-- .../goto/personal/environment/selectPrinterDialog.tpl | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/gosa-plugins/goto/personal/environment/class_environment.inc b/gosa-plugins/goto/personal/environment/class_environment.inc index e3bdb3b14..c6f82a34a 100644 --- a/gosa-plugins/goto/personal/environment/class_environment.inc +++ b/gosa-plugins/goto/personal/environment/class_environment.inc @@ -996,7 +996,6 @@ class environment extends plugin } $smarty->assign("gotoPrinter",$this->printOutPrinterDevices()); - $smarty->assign("gotoPrinterKeys",array_flip($this->printOutPrinterDevices())); /* General behavior */ if(is_object($this->dialog)){ @@ -1360,7 +1359,7 @@ class environment extends plugin if(is_array($this->gotoPrinter)){ foreach($this->gotoPrinter as $printer){ - if($printer['mode'] == "admin"){ + if($printer['mode'] == 'admin'){ $a_return[$printer['cn'][0]]= $printer['cn'][0]." - "._("Administrator"); }else{ $a_return[$printer['cn'][0]]= $printer['cn'][0]; @@ -1370,6 +1369,7 @@ class environment extends plugin } } } + asort($a_return); return($a_return); } diff --git a/gosa-plugins/goto/personal/environment/class_selectPrinterDialog.inc b/gosa-plugins/goto/personal/environment/class_selectPrinterDialog.inc index b4da61ca1..71023aa93 100644 --- a/gosa-plugins/goto/personal/environment/class_selectPrinterDialog.inc +++ b/gosa-plugins/goto/personal/environment/class_selectPrinterDialog.inc @@ -80,12 +80,12 @@ class selectPrinterDialog extends plugin } $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("gotoPrinterKeys",array_flip($printer_list)); $smarty->assign("apply", apply_filter()); $smarty->assign("alphabet", generate_alphabet()); $smarty->assign("subtrees", $this->subtreesearch?"checked":""); diff --git a/gosa-plugins/goto/personal/environment/environment.tpl b/gosa-plugins/goto/personal/environment/environment.tpl index 18622d63b..1e27d4846 100644 --- a/gosa-plugins/goto/personal/environment/environment.tpl +++ b/gosa-plugins/goto/personal/environment/environment.tpl @@ -345,7 +345,7 @@ {render acl=$gotoPrinterACL} {/render} @@ -378,7 +378,7 @@ {render acl=$gotoPrinterACL} {/render} diff --git a/gosa-plugins/goto/personal/environment/selectPrinterDialog.tpl b/gosa-plugins/goto/personal/environment/selectPrinterDialog.tpl index e1b5b207e..02bb97bab 100644 --- a/gosa-plugins/goto/personal/environment/selectPrinterDialog.tpl +++ b/gosa-plugins/goto/personal/environment/selectPrinterDialog.tpl @@ -13,7 +13,7 @@


-- 2.30.2