Fix minor bug in direct printing with google cloud print

This commit is contained in:
Laurent Destailleur 2016-06-26 21:18:44 +02:00
parent 8878c73732
commit bc38bc63ca
3 changed files with 12 additions and 5 deletions

View File

@ -316,6 +316,9 @@ if ((! empty($_REQUEST['unused']) && $_REQUEST['unused'] == 'true') || (isset($a
if (preg_match('/^EMailText/', $value)) $qualifiedforclean=0;
if (preg_match('/ById$/', $value)) $qualifiedforclean=0;
if (preg_match('/ByLogin$/', $value)) $qualifiedforclean=0;
// printing
if (preg_match('/PrintingDriverDesc$/', $value)) $qualifiedforclean=0;
if (preg_match('/PrintTestDesc$/', $value)) $qualifiedforclean=0;
// products
if (preg_match('/GlobalVariableUpdaterType$/', $value)) $qualifiedforclean=0;
if (preg_match('/GlobalVariableUpdaterHelp$/', $value)) $qualifiedforclean=0;

View File

@ -1,6 +1,6 @@
<?php
/* Copyright (C) 2014 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2014 Frederic France <frederic.france@free.fr>
/* Copyright (C) 2014-2016 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2014 Frederic France <frederic.france@free.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -44,7 +44,8 @@ if ($action == 'print_file' and $user->rights->printing->read)
$printer = new $classname($db);
//print '<pre>'.print_r($printer, true).'</pre>';
if (! empty($conf->global->{$printer->active})) {
if (! empty($conf->global->{$printer->active}))
{
$subdir=(GETPOST('printer', 'alpha')=='expedition'?'sending':'');
$module = GETPOST('printer', 'alpha');
if ($module =='commande_fournisseur') {
@ -56,10 +57,11 @@ if ($action == 'print_file' and $user->rights->printing->read)
//print '<pre>'.print_r($printer->errors, true).'</pre>';
setEventMessages($printer->error, $printer->errors, 'errors');
}
if ($ret==0) {
if ($ret==0)
{
//print '<pre>'.print_r($printer->errors, true).'</pre>';
setEventMessages($printer->error, $printer->errors);
setEventMessages($langs->trans("FileWasSentToPrinter", basename(GETPOST('file'))).' '.$langs->trans("ViaModule").' '.$printer->name, null);
setEventMessages($langs->trans("FileWasSentToPrinter", basename(GETPOST('file'))).' '.$langs->transnoentitiesnoconv("ViaModule").' '.$printer->name, null);
$printed++;
}
}

View File

@ -51,3 +51,5 @@ IPP_Supported=Type of media
DirectPrintingJobsDesc=This page lists printing jobs found for available printers.
GoogleAuthNotConfigured=Google OAuth setup not done. Enable module OAuth and set a Google ID/Secret.
GoogleAuthConfigured=Google OAuth credentials found into setup of module OAuth.
PrintingDriverDescprintgcp=Configuration variables for printing driver Google Cloud Print.
PrintTestDescprintgcp=List of Printers for Google Cloud Print.