From 30eefb34aaf9f70de1ebe5ecaba56e67b56c1552 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 1 Sep 2017 18:03:26 +0200 Subject: [PATCH] Fix payment suffix --- htdocs/public/payment/newpayment.php | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/htdocs/public/payment/newpayment.php b/htdocs/public/payment/newpayment.php index b6c525f1924..2519e4d0d46 100644 --- a/htdocs/public/payment/newpayment.php +++ b/htdocs/public/payment/newpayment.php @@ -62,24 +62,24 @@ $action=GETPOST('action','aZ09'); // tag (a free text, required if type is empty) // currency (iso code) -$suffix=GETPOST("suffix",'alpha'); -$amount=price2num(GETPOST("amount")); +$suffix=GETPOST("suffix",'aZ09'); +$amount=price2num(GETPOST("amount",'alpha')); if (! GETPOST("currency",'alpha')) $currency=$conf->currency; else $currency=GETPOST("currency",'alpha'); if (! $action) { - if (! GETPOST("amount") && ! GETPOST("source")) + if (! GETPOST("amount",'alpha') && ! GETPOST("source",'alpha')) { dol_print_error('',$langs->trans('ErrorBadParameters')." - amount or source"); exit; } - if (is_numeric($amount) && ! GETPOST("tag") && ! GETPOST("source")) + if (is_numeric($amount) && ! GETPOST("tag",'alpha') && ! GETPOST("source",'alpha')) { dol_print_error('',$langs->trans('ErrorBadParameters')." - tag or source"); exit; } - if (GETPOST("source") && ! GETPOST("ref")) + if (GETPOST("source",'alpha') && ! GETPOST("ref",'alpha')) { dol_print_error('',$langs->trans('ErrorBadParameters')." - ref"); exit; @@ -551,20 +551,21 @@ $width=0; // Define logo and logosmall $logosmall=$mysoc->logo_small; $logo=$mysoc->logo; -$paramlogo='PAYMENT_LOGO_'.$suffix; +$paramlogo='ONLINE_PAYMENT_LOGO_'.$suffix; if (! empty($conf->global->$paramlogo)) $logosmall=$conf->global->$paramlogo; -else if (! empty($conf->global->PAYMENT_LOGO)) $logosmall=$conf->global->PAYMENT_LOGO; +else if (! empty($conf->global->ONLINE_PAYMENT_LOGO)) $logosmall=$conf->global->ONLINE_PAYMENT_LOGO; //print ''."\n"; // Define urllogo $urllogo=''; if (! empty($logosmall) && is_readable($conf->mycompany->dir_output.'/logos/thumbs/'.$logosmall)) { $urllogo=DOL_URL_ROOT.'/viewimage.php?modulepart=mycompany&file='.urlencode('thumbs/'.$logosmall); + $width=128; } elseif (! empty($logo) && is_readable($conf->mycompany->dir_output.'/logos/'.$logo)) { $urllogo=DOL_URL_ROOT.'/viewimage.php?modulepart=mycompany&file='.urlencode($logo); - $width=96; + $width=128; } // Output html code for logo if ($urllogo)