Completed
Branch develop (68d67a)
by
unknown
16:20
created
htdocs/public/test/test_exec.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -66,13 +66,13 @@
 block discarded – undo
66 66
 
67 67
 print "*** TEST READ OF /tmp/test.txt FILE<br>\n";
68 68
 
69
-$out='';
70
-$ret=0;
69
+$out = '';
70
+$ret = 0;
71 71
 
72 72
 $file = '/tmp/test.txt';
73
-$f=fopen($file, 'r');
73
+$f = fopen($file, 'r');
74 74
 if ($f) {
75
-	$s=fread($f, 4096);
75
+	$s = fread($f, 4096);
76 76
 	print $s;
77 77
 	fclose($f);
78 78
 } else {
Please login to merge, or discard this patch.
htdocs/admin/agenda_other.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@
 block discarded – undo
36 36
 
37 37
 $action = GETPOST('action', 'aZ09');
38 38
 $value = GETPOST('value', 'alpha');
39
-$modulepart = GETPOST('modulepart', 'aZ09');	// Used by actions_setmoduleoptions.inc.php
39
+$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php
40 40
 
41 41
 $param = GETPOST('param', 'alpha');
42 42
 $cancel = GETPOST('cancel', 'alpha');
Please login to merge, or discard this patch.
htdocs/core/lib/tax.lib.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -801,7 +801,7 @@  discard block
 block discarded – undo
801 801
 			while ($assoc = $db->fetch_array($resql)) {
802 802
 				$rate_key = $assoc['rate'];
803 803
 				if ($f_rate == 'tva_tx' && !empty($assoc['vat_src_code']) && !preg_match('/\(/', $rate_key)) {
804
-					$rate_key .= ' (' . $assoc['vat_src_code'] . ')';
804
+					$rate_key .= ' ('.$assoc['vat_src_code'].')';
805 805
 				}
806 806
 
807 807
 				// Code to avoid warnings when array entry not defined
@@ -986,7 +986,7 @@  discard block
 block discarded – undo
986 986
 			while ($assoc = $db->fetch_array($resql)) {
987 987
 				$rate_key = $assoc['rate'];
988 988
 				if ($f_rate == 'tva_tx' && !empty($assoc['vat_src_code']) && !preg_match('/\(/', $rate_key)) {
989
-					$rate_key .= ' (' . $assoc['vat_src_code'] . ')';
989
+					$rate_key .= ' ('.$assoc['vat_src_code'].')';
990 990
 				}
991 991
 
992 992
 				// Code to avoid warnings when array entry not defined
@@ -1113,7 +1113,7 @@  discard block
 block discarded – undo
1113 1113
 				while ($assoc = $db->fetch_array($resql)) {
1114 1114
 					$rate_key = $assoc['rate'];
1115 1115
 					if ($f_rate == 'tva_tx' && !empty($assoc['vat_src_code']) && !preg_match('/\(/', $rate_key)) {
1116
-						$rate_key .= ' (' . $assoc['vat_src_code'] . ')';
1116
+						$rate_key .= ' ('.$assoc['vat_src_code'].')';
1117 1117
 					}
1118 1118
 
1119 1119
 					// Code to avoid warnings when array entry not defined
Please login to merge, or discard this patch.
htdocs/product/admin/stock_mouvement_extrafields.php 1 patch
Braces   +24 added lines, -8 removed lines patch added patch discarded remove patch
@@ -29,16 +29,28 @@  discard block
 block discarded – undo
29 29
 // Load Dolibarr environment
30 30
 $res = 0;
31 31
 // Try main.inc.php into web root known defined into CONTEXT_DOCUMENT_ROOT (not always defined)
32
-if (!$res && !empty($_SERVER["CONTEXT_DOCUMENT_ROOT"])) $res = @include $_SERVER["CONTEXT_DOCUMENT_ROOT"]."/main.inc.php";
32
+if (!$res && !empty($_SERVER["CONTEXT_DOCUMENT_ROOT"])) {
33
+	$res = @include $_SERVER["CONTEXT_DOCUMENT_ROOT"]."/main.inc.php";
34
+}
33 35
 // Try main.inc.php into web root detected using web root calculated from SCRIPT_FILENAME
34 36
 $tmp = empty($_SERVER['SCRIPT_FILENAME']) ? '' : $_SERVER['SCRIPT_FILENAME']; $tmp2 = realpath(__FILE__); $i = strlen($tmp) - 1; $j = strlen($tmp2) - 1;
35 37
 while ($i > 0 && $j > 0 && isset($tmp[$i]) && isset($tmp2[$j]) && $tmp[$i] == $tmp2[$j]) { $i--; $j--; }
36
-if (!$res && $i > 0 && file_exists(substr($tmp, 0, ($i + 1))."/main.inc.php")) $res = @include substr($tmp, 0, ($i + 1))."/main.inc.php";
37
-if (!$res && $i > 0 && file_exists(dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php")) $res = @include dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php";
38
+if (!$res && $i > 0 && file_exists(substr($tmp, 0, ($i + 1))."/main.inc.php")) {
39
+	$res = @include substr($tmp, 0, ($i + 1))."/main.inc.php";
40
+}
41
+if (!$res && $i > 0 && file_exists(dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php")) {
42
+	$res = @include dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php";
43
+}
38 44
 // Try main.inc.php using relative path
39
-if (!$res && file_exists("../../main.inc.php")) $res = @include "../../main.inc.php";
40
-if (!$res && file_exists("../../../main.inc.php")) $res = @include "../../../main.inc.php";
41
-if (!$res) die("Include of main fails");
45
+if (!$res && file_exists("../../main.inc.php")) {
46
+	$res = @include "../../main.inc.php";
47
+}
48
+if (!$res && file_exists("../../../main.inc.php")) {
49
+	$res = @include "../../../main.inc.php";
50
+}
51
+if (!$res) {
52
+	die("Include of main fails");
53
+}
42 54
 
43 55
 require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
44 56
 require_once DOL_DOCUMENT_ROOT.'/core/lib/stock.lib.php';
@@ -52,13 +64,17 @@  discard block
 block discarded – undo
52 64
 // List of supported format
53 65
 $tmptype2label = ExtraFields::$type2label;
54 66
 $type2label = array('');
55
-foreach ($tmptype2label as $key => $val) $type2label[$key] = $langs->transnoentitiesnoconv($val);
67
+foreach ($tmptype2label as $key => $val) {
68
+	$type2label[$key] = $langs->transnoentitiesnoconv($val);
69
+}
56 70
 
57 71
 $action = GETPOST('action', 'aZ09');
58 72
 $attrname = GETPOST('attrname', 'alpha');
59 73
 $elementtype = 'stock_mouvement'; //Must be the $table_element of the class that manage extrafield
60 74
 
61
-if (!$user->admin) accessforbidden();
75
+if (!$user->admin) {
76
+	accessforbidden();
77
+}
62 78
 
63 79
 
64 80
 /*
Please login to merge, or discard this patch.
htdocs/product/reassort.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -159,10 +159,10 @@  discard block
 block discarded – undo
159 159
 	}
160 160
 	$sql .= "(";
161 161
 	$sql .= " SELECT cp.fk_categorie, cp.fk_product";
162
-	$sql .= " FROM " . MAIN_DB_PREFIX . "categorie_product as cp";
162
+	$sql .= " FROM ".MAIN_DB_PREFIX."categorie_product as cp";
163 163
 	$sql .= " WHERE cp.fk_product = p.rowid"; // Join for the needed table to filter by categ
164 164
 	if ($search_categ > 0) {
165
-		$sql .= " AND cp.fk_categorie = " . ((int) $search_categ);
165
+		$sql .= " AND cp.fk_categorie = ".((int) $search_categ);
166 166
 	}
167 167
 	$sql .= ")";
168 168
 }
@@ -210,8 +210,8 @@  discard block
 block discarded – undo
210 210
 }
211 211
 if ($search_stock_physique != '') {
212 212
 	//$natural_search_physique = natural_search('HAVING SUM(' . $db->ifsql('s.reel IS NULL', '0', 's.reel') . ')', $search_stock_physique, 1, 1);
213
-	$natural_search_physique = natural_search('SUM(' . $db->ifsql('s.reel IS NULL', '0', 's.reel') . ')', $search_stock_physique, 1, 1);
214
-	$natural_search_physique = " " . substr($natural_search_physique, 1, -1); // remove first "(" and last ")" characters
213
+	$natural_search_physique = natural_search('SUM('.$db->ifsql('s.reel IS NULL', '0', 's.reel').')', $search_stock_physique, 1, 1);
214
+	$natural_search_physique = " ".substr($natural_search_physique, 1, -1); // remove first "(" and last ")" characters
215 215
 	if (!empty($sql_having)) {
216 216
 		$sql_having .= " AND";
217 217
 	} else {
@@ -298,7 +298,7 @@  discard block
 block discarded – undo
298 298
 		$param .= "&sbarcode=".urlencode($sbarcode);
299 299
 	}
300 300
 	if ($search_stock_physique) {
301
-		$param .= '&search_stock_physique=' . urlencode($search_stock_physique);
301
+		$param .= '&search_stock_physique='.urlencode($search_stock_physique);
302 302
 	}
303 303
 
304 304
 	llxHeader("", $texte, $helpurl);
Please login to merge, or discard this patch.
htdocs/product/stock/class/api_stockmovements.class.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -156,7 +156,7 @@
 block discarded – undo
156 156
 	 * $price Can be set to update AWP (Average Weighted Price) when you make a stock increase
157 157
 	 * $dlc Eat-by date. Will be used if lot does not exists yet and will be created.
158 158
 	 * $dluo Sell-by date. Will be used if lot does not exists yet and will be created.
159
-		 *
159
+	 *
160 160
 	 * @param int $product_id Id product id {@min 1} {@from body} {@required true}
161 161
 	 * @param int $warehouse_id Id warehouse {@min 1} {@from body} {@required true}
162 162
 	 * @param float $qty Qty to add (Use negative value for a stock decrease) {@from body} {@required true}
Please login to merge, or discard this patch.
htdocs/install/step5.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -214,8 +214,8 @@
 block discarded – undo
214 214
 			$newuser->admin = 1;
215 215
 			$newuser->entity = 0;
216 216
 
217
-			$conf->global->USER_MAIL_REQUIRED = 0; 			// Force global option to be sure to create a new user with no email
218
-			$conf->global->USER_PASSWORD_GENERATED = '';	// To not use any rule for password validation
217
+			$conf->global->USER_MAIL_REQUIRED = 0; // Force global option to be sure to create a new user with no email
218
+			$conf->global->USER_PASSWORD_GENERATED = ''; // To not use any rule for password validation
219 219
 
220 220
 			$result = $newuser->create($createuser, 1);
221 221
 			if ($result > 0) {
Please login to merge, or discard this patch.
htdocs/paypal/lib/paypal.lib.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -503,7 +503,7 @@
 block discarded – undo
503 503
 	// Turning on or off the ssl target certificate
504 504
 	if ($ssl_verifypeer < 0) {
505 505
 		global $dolibarr_main_prod;
506
-		$ssl_verifypeer =  ($dolibarr_main_prod ? true : false);
506
+		$ssl_verifypeer = ($dolibarr_main_prod ? true : false);
507 507
 	}
508 508
 	if (!empty($conf->global->MAIN_CURL_DISABLE_VERIFYPEER)) {
509 509
 		$ssl_verifypeer = 0;
Please login to merge, or discard this patch.
htdocs/takepos/index.php 2 patches
Braces   +4 added lines, -1 removed lines patch added patch discarded remove patch
@@ -444,7 +444,10 @@
 block discarded – undo
444 444
 		if (idproduct=="") return;
445 445
 		// Call page invoice.php to generate the section with product lines
446 446
 		$("#poslines").load("invoice.php?action=addline&token=<?php echo newToken() ?>&place="+place+"&idproduct="+idproduct+"&selectedline="+selectedline+"&qty="+qty, function() {
447
-			<?php if (!empty($conf->global->TAKEPOS_CUSTOMER_DISPLAY)) echo "CustomerDisplay();";?>
447
+			<?php if (!empty($conf->global->TAKEPOS_CUSTOMER_DISPLAY)) {
448
+	echo "CustomerDisplay();";
449
+}
450
+?>
448 451
 		});
449 452
 	}
450 453
 
Please login to merge, or discard this patch.
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
 $arrayofcss = array('/takepos/css/pos.css.php', '/takepos/css/colorbox.css');
119 119
 
120 120
 if (getDolGlobalInt('TAKEPOS_COLOR_THEME') == 1) {
121
-	$arrayofcss[] =  '/takepos/css/colorful.css';
121
+	$arrayofcss[] = '/takepos/css/colorful.css';
122 122
 }
123 123
 
124 124
 
@@ -331,7 +331,7 @@  discard block
 block discarded – undo
331 331
 		limit = maxproduct-1;
332 332
 	}
333 333
 	// Only show products for sale (tosell=1)
334
-	$.getJSON('<?php echo DOL_URL_ROOT ?>/takepos/ajax/ajax.php?action=getProducts&token=<?php echo newToken();?>&category='+currentcat+'&tosell=1&limit='+limit+'&offset=0', function(data) {
334
+	$.getJSON('<?php echo DOL_URL_ROOT ?>/takepos/ajax/ajax.php?action=getProducts&token=<?php echo newToken(); ?>&category='+currentcat+'&tosell=1&limit='+limit+'&offset=0', function(data) {
335 335
 		console.log("Call ajax.php (in LoadProducts) to get Products of category "+currentcat+" then loop on result to fill image thumbs");
336 336
 		console.log(data);
337 337
 		while (ishow < maxproduct) {
@@ -385,7 +385,7 @@  discard block
 block discarded – undo
385 385
 
386 386
 				<?php
387 387
 				// Add js from hooks
388
-				$parameters=array();
388
+				$parameters = array();
389 389
 				$parameters['caller'] = 'loadProducts';
390 390
 				$hookmanager->executeHooks('completeJSProductDisplay', $parameters);
391 391
 				print $hookmanager->resPrint;
@@ -429,7 +429,7 @@  discard block
 block discarded – undo
429 429
 	}
430 430
 	var offset = <?php echo ($MAXPRODUCT - 2); ?> * pageproducts;
431 431
 	// Only show products for sale (tosell=1)
432
-	$.getJSON('<?php echo DOL_URL_ROOT ?>/takepos/ajax/ajax.php?action=getProducts&token=<?php echo newToken();?>&category='+currentcat+'&tosell=1&limit='+limit+'&offset='+offset, function(data) {
432
+	$.getJSON('<?php echo DOL_URL_ROOT ?>/takepos/ajax/ajax.php?action=getProducts&token=<?php echo newToken(); ?>&category='+currentcat+'&tosell=1&limit='+limit+'&offset='+offset, function(data) {
433 433
 		console.log("Call ajax.php (in MoreProducts) to get Products of category "+currentcat);
434 434
 
435 435
 		if (typeof (data[0]) == "undefined" && moreorless=="more"){ // Return if no more pages
@@ -489,7 +489,7 @@  discard block
 block discarded – undo
489 489
 		if (idproduct=="") return;
490 490
 		// Call page invoice.php to generate the section with product lines
491 491
 		$("#poslines").load("invoice.php?action=addline&token=<?php echo newToken() ?>&place="+place+"&idproduct="+idproduct+"&selectedline="+selectedline+"&qty="+qty, function() {
492
-			<?php if (!empty($conf->global->TAKEPOS_CUSTOMER_DISPLAY)) echo "CustomerDisplay();";?>
492
+			<?php if (!empty($conf->global->TAKEPOS_CUSTOMER_DISPLAY)) echo "CustomerDisplay();"; ?>
493 493
 		});
494 494
 	}
495 495
 
@@ -499,7 +499,7 @@  discard block
 block discarded – undo
499 499
 function ChangeThirdparty(idcustomer) {
500 500
 	 console.log("ChangeThirdparty");
501 501
 		// Call page list.php to change customer
502
-		$("#poslines").load("../societe/list.php?action=change&token=<?php echo newToken();?>&type=t&contextpage=poslist&idcustomer="+idcustomer+"&place="+place+"", function() {
502
+		$("#poslines").load("../societe/list.php?action=change&token=<?php echo newToken(); ?>&type=t&contextpage=poslist&idcustomer="+idcustomer+"&place="+place+"", function() {
503 503
 		});
504 504
 
505 505
 	ClearSearch();
@@ -571,7 +571,7 @@  discard block
 block discarded – undo
571 571
 
572 572
 	console.log("New with place = <?php echo $place; ?>, js place="+place+", invoiceid="+invoiceid);
573 573
 
574
-	$.getJSON('<?php echo DOL_URL_ROOT ?>/takepos/ajax/ajax.php?action=getInvoice&token=<?php echo newToken();?>&id='+invoiceid, function(data) {
574
+	$.getJSON('<?php echo DOL_URL_ROOT ?>/takepos/ajax/ajax.php?action=getInvoice&token=<?php echo newToken(); ?>&id='+invoiceid, function(data) {
575 575
 		var r;
576 576
 
577 577
 		if (parseInt(data['paye']) === 1) {
@@ -641,7 +641,7 @@  discard block
 block discarded – undo
641 641
 			pageproducts = 0;
642 642
 			jQuery(".wrapper2 .catwatermark").hide();
643 643
 			var nbsearchresults = 0;
644
-			$.getJSON('<?php echo DOL_URL_ROOT ?>/takepos/ajax/ajax.php?action=search&token=<?php echo newToken();?>&term=' + search_term + '&search_start=' + search_start + '&search_limit=' + search_limit, function (data) {
644
+			$.getJSON('<?php echo DOL_URL_ROOT ?>/takepos/ajax/ajax.php?action=search&token=<?php echo newToken(); ?>&term=' + search_term + '&search_start=' + search_start + '&search_limit=' + search_limit, function (data) {
645 645
 				for (i = 0; i < <?php echo $MAXPRODUCT ?>; i++) {
646 646
 					if (typeof (data[i]) == "undefined") {
647 647
 						$("#prowatermark" + i).html("");
@@ -684,7 +684,7 @@  discard block
 block discarded – undo
684 684
 
685 685
 					<?php
686 686
 					// Add js from hooks
687
-					$parameters=array();
687
+					$parameters = array();
688 688
 					$parameters['caller'] = 'search2';
689 689
 					$hookmanager->executeHooks('completeJSProductDisplay', $parameters);
690 690
 					print $hookmanager->resPrint;
@@ -722,7 +722,7 @@  discard block
 block discarded – undo
722 722
 				}
723 723
 				else {
724 724
 					$("#prodiv<?php echo $MAXPRODUCT - 2; ?> span").show();
725
-					var search_start_less = Math.max(0, parseInt(search_start) - parseInt(<?php echo $MAXPRODUCT - 2;?>));
725
+					var search_start_less = Math.max(0, parseInt(search_start) - parseInt(<?php echo $MAXPRODUCT - 2; ?>));
726 726
 					$("#search_start_less").val(search_start_less);
727 727
 				}
728 728
 				if (nbsearchresults != <?php echo $MAXPRODUCT - 2; ?>) {
@@ -730,7 +730,7 @@  discard block
 block discarded – undo
730 730
 				}
731 731
 				else {
732 732
 					$("#prodiv<?php echo $MAXPRODUCT - 1; ?> span").show();
733
-					var search_start_more = parseInt(search_start) + parseInt(<?php echo $MAXPRODUCT - 2;?>);
733
+					var search_start_more = parseInt(search_start) + parseInt(<?php echo $MAXPRODUCT - 2; ?>);
734 734
 					$("#search_start_more").val(search_start_more);
735 735
 				}
736 736
 			});
@@ -827,14 +827,14 @@  discard block
 block discarded – undo
827 827
 
828 828
 function TakeposPrintingOrder(){
829 829
 	console.log("TakeposPrintingOrder");
830
-	$("#poslines").load("invoice.php?action=order&token=<?php echo newToken();?>&place="+place, function() {
830
+	$("#poslines").load("invoice.php?action=order&token=<?php echo newToken(); ?>&place="+place, function() {
831 831
 		//$('#poslines').scrollTop($('#poslines')[0].scrollHeight);
832 832
 	});
833 833
 }
834 834
 
835 835
 function TakeposPrintingTemp(){
836 836
 	console.log("TakeposPrintingTemp");
837
-	$("#poslines").load("invoice.php?action=temp&token=<?php echo newToken();?>&place="+place, function() {
837
+	$("#poslines").load("invoice.php?action=temp&token=<?php echo newToken(); ?>&place="+place, function() {
838 838
 		//$('#poslines').scrollTop($('#poslines')[0].scrollHeight);
839 839
 	});
840 840
 }
@@ -856,7 +856,7 @@  discard block
 block discarded – undo
856 856
 }
857 857
 
858 858
 function DolibarrOpenDrawer() {
859
-	console.log("DolibarrOpenDrawer call ajax url /takepos/ajax/ajax.php?action=opendrawer&token=<?php echo newToken();?>&term=<?php print urlencode($_SESSION["takeposterminal"]); ?>");
859
+	console.log("DolibarrOpenDrawer call ajax url /takepos/ajax/ajax.php?action=opendrawer&token=<?php echo newToken(); ?>&term=<?php print urlencode($_SESSION["takeposterminal"]); ?>");
860 860
 	$.ajax({
861 861
 		type: "GET",
862 862
 		data: { token: '<?php echo currentToken(); ?>' },
@@ -1196,15 +1196,15 @@  discard block
 block discarded – undo
1196 1196
 
1197 1197
 // TakePOS setup check
1198 1198
 if (isset($_SESSION["takeposterminal"]) && $_SESSION["takeposterminal"]) {
1199
-	$sql = "SELECT code, libelle FROM " . MAIN_DB_PREFIX . "c_paiement";
1200
-	$sql .= " WHERE entity IN (" . getEntity('c_paiement') . ")";
1199
+	$sql = "SELECT code, libelle FROM ".MAIN_DB_PREFIX."c_paiement";
1200
+	$sql .= " WHERE entity IN (".getEntity('c_paiement').")";
1201 1201
 	$sql .= " AND active = 1";
1202 1202
 	$sql .= " ORDER BY libelle";
1203 1203
 
1204 1204
 	$resql          = $db->query($sql);
1205 1205
 	$paiementsModes = array();
1206 1206
 	if ($resql) {
1207
-		while ( $obj = $db->fetch_object($resql) ) {
1207
+		while ($obj = $db->fetch_object($resql)) {
1208 1208
 			$paycode = $obj->code;
1209 1209
 			if ($paycode == 'LIQ') {
1210 1210
 				$paycode = 'CASH';
@@ -1213,9 +1213,9 @@  discard block
 block discarded – undo
1213 1213
 				$paycode = 'CHEQUE';
1214 1214
 			}
1215 1215
 
1216
-			$constantforkey = "CASHDESK_ID_BANKACCOUNT_" . $paycode . $_SESSION["takeposterminal"];
1216
+			$constantforkey = "CASHDESK_ID_BANKACCOUNT_".$paycode.$_SESSION["takeposterminal"];
1217 1217
 			//var_dump($constantforkey.' '.$conf->global->$constantforkey);
1218
-			if ( !empty($conf->global->$constantforkey) && $conf->global->$constantforkey > 0) {
1218
+			if (!empty($conf->global->$constantforkey) && $conf->global->$constantforkey > 0) {
1219 1219
 				array_push($paiementsModes, $obj);
1220 1220
 			}
1221 1221
 		}
@@ -1251,7 +1251,7 @@  discard block
 block discarded – undo
1251 1251
 if (!empty($conf->global->TAKEPOS_HIDE_HEAD_BAR)) {
1252 1252
 	$menus[$r++] = array('title'=>'<span class="far fa-building paddingrightonly"></span><div class="trunc">'.$langs->trans("Customer").'</div>', 'action'=>'Customer();');
1253 1253
 }
1254
-if ( ! getDolGlobalString('TAKEPOS_HIDE_HISTORY')) {
1254
+if (!getDolGlobalString('TAKEPOS_HIDE_HISTORY')) {
1255 1255
 	$menus[$r++] = array('title'=>'<span class="fa fa-history paddingrightonly"></span><div class="trunc">'.$langs->trans("History").'</div>', 'action'=>'History();');
1256 1256
 }
1257 1257
 $menus[$r++] = array('title'=>'<span class="fa fa-cube paddingrightonly"></span><div class="trunc">'.$langs->trans("FreeZone").'</div>', 'action'=>'FreeZone();');
@@ -1321,7 +1321,7 @@  discard block
 block discarded – undo
1321 1321
 $parameters = array('menus'=>$menus);
1322 1322
 $reshook = $hookmanager->executeHooks('ActionButtons', $parameters);
1323 1323
 if ($reshook == 0) {  //add buttons
1324
-	if (is_array($hookmanager->resArray) ) {
1324
+	if (is_array($hookmanager->resArray)) {
1325 1325
 		foreach ($hookmanager->resArray as $resArray) {
1326 1326
 			foreach ($resArray as $butmenu) {
1327 1327
 				$menus[$r++] = $butmenu;
@@ -1329,7 +1329,7 @@  discard block
 block discarded – undo
1329 1329
 		}
1330 1330
 	} elseif ($reshook == 1) {
1331 1331
 		$r = 0; //replace buttons
1332
-		if (is_array($hookmanager->resArray) ) {
1332
+		if (is_array($hookmanager->resArray)) {
1333 1333
 			foreach ($hookmanager->resArray as $resArray) {
1334 1334
 				foreach ($resArray as $butmenu) {
1335 1335
 					$menus[$r++] = $butmenu;
Please login to merge, or discard this patch.