From 85ce1f3332a77909584eee86ef5f9b0253b25eec Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 26 Jun 2017 09:20:16 +0200 Subject: [PATCH 1/3] Fix missing var init --- htdocs/admin/tools/export.php | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/htdocs/admin/tools/export.php b/htdocs/admin/tools/export.php index ebc4061fe6d..7e2fa8ee79d 100644 --- a/htdocs/admin/tools/export.php +++ b/htdocs/admin/tools/export.php @@ -88,6 +88,7 @@ if (!empty($ExecTimeLimit)) @set_time_limit($ExecTimeLimit); // Need more than 240 on Windows 7/64 error_reporting($err); } +$MemoryLimit=0; if (!empty($MemoryLimit)) { @ini_set('memory_limit', $MemoryLimit); @@ -120,10 +121,10 @@ $utils = new Utils($db); // MYSQL if ($what == 'mysql') { - + $cmddump=GETPOST("mysqldump"); // Do not sanitize here with 'alpha', will be sanitize later by dol_sanitizePathName and escapeshellarg $cmddump=dol_sanitizePathName($cmddump); - + if (! empty($dolibarr_main_restrict_os_commands)) { $arrayofallowedcommand=explode(',', $dolibarr_main_restrict_os_commands); @@ -142,13 +143,13 @@ if ($what == 'mysql') $errormsg=$langs->trans('CommandIsNotInsideAllowedCommands'); } } - + if (! $errormsg && $cmddump) { dolibarr_set_const($db, 'SYSTEMTOOLS_MYSQLDUMP', $cmddump,'chaine',0,'',$conf->entity); } - if (! $errormsg) + if (! $errormsg) { $utils->dumpDatabase(GETPOST('compression','alpha'), $what, 0, $file); $errormsg=$utils->error; @@ -172,13 +173,13 @@ if ($what == 'postgresql') { $cmddump=GETPOST("postgresqldump"); // Do not sanitize here with 'alpha', will be sanitize later by dol_sanitizePathName and escapeshellarg $cmddump=dol_sanitizePathName($cmddump); - + if (! $errormsg && $cmddump) { dolibarr_set_const($db, 'SYSTEMTOOLS_POSTGRESQLDUMP', $cmddump,'chaine',0,'',$conf->entity); } - if (! $errormsg) + if (! $errormsg) { $utils->dumpDatabase(GETPOST('compression','alpha'), $what, 0, $file); $errormsg=$utils->error; From 4a21457b8a7b7980ef3f8ddc0683804312c3b542 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 26 Jun 2017 09:28:02 +0200 Subject: [PATCH 2/3] Fix position of page nb --- htdocs/core/lib/pdf.lib.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/core/lib/pdf.lib.php b/htdocs/core/lib/pdf.lib.php index c4257c3c7f8..1b79cc9163d 100644 --- a/htdocs/core/lib/pdf.lib.php +++ b/htdocs/core/lib/pdf.lib.php @@ -1039,10 +1039,10 @@ function pdf_pagefoot(&$pdf,$outputlangs,$paramfreetext,$fromcompany,$marge_bass // Show page nb only on iso languages (so default Helvetica font) if (strtolower(pdf_getPDFFont($outputlangs)) == 'helvetica') { - $pdf->SetXY(-20,-$posy); + $pdf->SetXY($dims['wk']-$dims['rm']-15, -$posy); //print 'xxx'.$pdf->PageNo().'-'.$pdf->getAliasNbPages().'-'.$pdf->getAliasNumPage();exit; - if (empty($conf->global->MAIN_USE_FPDF)) $pdf->MultiCell(13, 2, $pdf->PageNo().'/'.$pdf->getAliasNbPages(), 0, 'R', 0); - else $pdf->MultiCell(13, 2, $pdf->PageNo().'/{nb}', 0, 'R', 0); + if (empty($conf->global->MAIN_USE_FPDF)) $pdf->MultiCell(15, 2, $pdf->PageNo().'/'.$pdf->getAliasNbPages(), 0, 'R', 0); + else $pdf->MultiCell(15, 2, $pdf->PageNo().'/{nb}', 0, 'R', 0); } return $marginwithfooter; @@ -1246,7 +1246,7 @@ function pdf_getlinedesc($object,$i,$outputlangs,$hideref=0,$hidedesc=0,$issuppl if (empty($hideref)) { - if ($issupplierline) + if ($issupplierline) { //$ref_prodserv = $prodser->ref.($ref_supplier ? ' ('.$outputlangs->transnoentitiesnoconv("SupplierRef").' '.$ref_supplier.')' : ''); // Show local ref and supplier ref if (! empty($conf->global->PDF_HIDE_PRODUCT_REF_IN_SUPPLIER_LINES)) $ref_prodserv =$ref_supplier; From 3a6314b1a02b6634b948e5a2f8158731c125c2fe Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 26 Jun 2017 13:29:18 +0200 Subject: [PATCH 3/3] Fix data --- htdocs/install/mysql/migration/4.0.0-5.0.0.sql | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/htdocs/install/mysql/migration/4.0.0-5.0.0.sql b/htdocs/install/mysql/migration/4.0.0-5.0.0.sql index b5978efac99..5f62c766a01 100644 --- a/htdocs/install/mysql/migration/4.0.0-5.0.0.sql +++ b/htdocs/install/mysql/migration/4.0.0-5.0.0.sql @@ -270,3 +270,8 @@ ALTER TABLE llx_product_fournisseur_price ADD COLUMN default_vat_code varchar(10 ALTER TABLE llx_events MODIFY COLUMN ip varchar(250); + + +UPDATE llx_bank SET label= '(SupplierInvoicePayment)' WHERE label= 'Règlement fournisseur'; +UPDATE llx_bank SET label= '(CustomerInvoicePayment)' WHERE label= 'Règlement client'; +