From 40269c3c70e89d3bbf2483e73710f4b7db9568c0 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 15 Dec 2015 09:32:09 +0100 Subject: [PATCH] Fix Remove syntax warnings --- htdocs/core/class/dolreceiptprinter.class.php | 10 +++++++--- htdocs/core/js/lib_head.js.php | 2 +- htdocs/core/modules/dons/html_cerfafr.html | 2 +- htdocs/public/test/test_arrays.php | 10 ++++------ htdocs/public/test/test_forms.php | 4 ++-- 5 files changed, 15 insertions(+), 13 deletions(-) diff --git a/htdocs/core/class/dolreceiptprinter.class.php b/htdocs/core/class/dolreceiptprinter.class.php index 5bee14b74d4..90bf948e215 100644 --- a/htdocs/core/class/dolreceiptprinter.class.php +++ b/htdocs/core/class/dolreceiptprinter.class.php @@ -80,7 +80,7 @@ * Print customer points * Print number of points for this order * - * Conditional code at line start (if…then Print) + * Conditional code at line start (if�then Print) * Print the line IF a customer is affected to the order * Print the line IF a vendor is affected to the order * Print the line IF Happy Hour @@ -520,8 +520,12 @@ class dolReceiptPrinter extends Escpos $ret = $this->InitPrinter($printerid); if ($ret>0) { setEventMessages($this->error, $this->errors, 'errors'); - } else { - for ($line=0; $line < count($vals); $line++) { + } + else + { + $nboflines = count($vals); + for ($line=0; $line < $nboflines; $line++) + { switch ($vals[$line]['tag']) { case 'DOL_ALIGN_CENTER': $this->printer->setJustification(Escpos::JUSTIFY_CENTER); diff --git a/htdocs/core/js/lib_head.js.php b/htdocs/core/js/lib_head.js.php index 15a25bf10ed..b843f83e1d0 100644 --- a/htdocs/core/js/lib_head.js.php +++ b/htdocs/core/js/lib_head.js.php @@ -940,7 +940,7 @@ function confirmConstantAction(action, url, code, input, box, entity, yesButton, function copyToClipboard(text,text2) { text = text.replace(/
/g,"\n"); - var newElem = "

"+text2; + var newElem = '

'+text2; $("#dialog").html(newElem); $("#dialog").dialog(); $("#coords").select(); diff --git a/htdocs/core/modules/dons/html_cerfafr.html b/htdocs/core/modules/dons/html_cerfafr.html index ea9dbee01e3..df6f58af77d 100644 --- a/htdocs/core/modules/dons/html_cerfafr.html +++ b/htdocs/core/modules/dons/html_cerfafr.html @@ -151,8 +151,8 @@ (1) ou n'indiquez que les renseignements concernant l'organisme
(2) dons effectués par les entreprises - +
diff --git a/htdocs/public/test/test_arrays.php b/htdocs/public/test/test_arrays.php index 2801ebb8855..ac4d9eb3c54 100644 --- a/htdocs/public/test/test_arrays.php +++ b/htdocs/public/test/test_arrays.php @@ -65,8 +65,8 @@ else

This page is a sample of page using tables. It is designed to make test with
-- css (add parameter &theme=newtheme to test another theme or edit css of current theme)
-- jmobile (add parameter ">dol_use_jmobile=1&dol_optimize_smallscreen=1 to enable view with jmobile)
+- css (add parameter &theme=newtheme to test another theme or edit css of current theme)
+- jmobile (add parameter ">dol_use_jmobile=1&dol_optimize_smallscreen=1 to enable view with jmobile)
- no javascript / usage for bind people (add parameter ">nojs=1 to force disable javascript)
- dataTables
- tablednd
@@ -181,8 +181,8 @@ if (! empty($moreforfilter)) print ''; } -print '

'; ?> +
" id="tablelines3"> trans('title1'),0,$_SERVER["PHP_SELF"],'aaa','','','align="left"',$sortfield,$sortorder); ?> trans('title2'),0,$_SERVER["PHP_SELF"],'bbb','','','align="right"',$sortfield,$sortorder); ?> @@ -190,9 +190,7 @@ print '
-'; -?> +
getNomUrl(1); ?>b1c1
a2b2c2

diff --git a/htdocs/public/test/test_forms.php b/htdocs/public/test/test_forms.php index 7fec8e895b6..a697b371438 100644 --- a/htdocs/public/test/test_forms.php +++ b/htdocs/public/test/test_forms.php @@ -16,8 +16,8 @@ llxHeader();

This page is a sample of page using Dolibarr HTML widget methods. It is designed to make test with
-- css (add parameter &theme=newtheme to test another theme or edit css of current theme)
-- jmobile (add parameter ">dol_use_jmobile=1&dol_optimize_smallscreen=1 to enable view with jmobile)
+- css (add parameter &theme=newtheme to test another theme or edit css of current theme)
+- jmobile (add parameter ">dol_use_jmobile=1&dol_optimize_smallscreen=1 to enable view with jmobile)
- no javascript / usage for bind people (add parameter ">nojs=1 to force disable javascript)