Browse Source

Fix #3236

Juanjo Menent 10 years ago
parent
commit
ef6b96b4c7
2 changed files with 7 additions and 1 deletions
  1. 1 0
      htdocs/langs/en_US/printing.lang
  2. 6 1
      htdocs/printing/admin/printing.php

+ 1 - 0
htdocs/langs/en_US/printing.lang

@@ -10,6 +10,7 @@ PrintTestDesc=List of Printers.
 FileWasSentToPrinter=File %s was sent to printer
 NoActivePrintingModuleFound=No active module to print document
 PleaseSelectaDriverfromList=Please select a driver from list.
+PleaseConfigureDriverfromList=Please configure the selected driver from list.
 SetupDriver=Driver setup
 TestDriver=Test
 TargetedPrinter=Targeted printer

+ 6 - 1
htdocs/printing/admin/printing.php

@@ -229,7 +229,12 @@ if ($mode == 'test' && $user->admin)
         $langs->load($driver);
         $printer = new $classname($db);
         //print '<pre>'.print_r($printer, true).'</pre>';
-        print $printer->listAvailablePrinters();
+        if (count($printer->getlist_available_printers)) {
+            print $printer->listAvailablePrinters();
+        }
+        else {
+            print $langs->trans('PleaseConfigureDriverfromList');
+        }
 
     } else {
         print $langs->trans('PleaseSelectaDriverfromList');