Completed
Branch develop (6b00f4)
by
unknown
21:05
created
htdocs/public/webportal/tpl/header.tpl.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -41,23 +41,23 @@  discard block
 block discarded – undo
41 41
 // Return HTML header
42 42
 ?>
43 43
 <!DOCTYPE html>
44
-<?php print '<html lang="'.substr($langs->defaultlang, 0, 2) . '">'."\n"; ?>
44
+<?php print '<html lang="'.substr($langs->defaultlang, 0, 2).'">'."\n"; ?>
45 45
 <head>
46 46
 	<meta charset="UTF-8">
47 47
 	<meta name="viewport" content="width=device-width, initial-scale=1.0">
48 48
 	<meta http-equiv="X-UA-Compatible" content="ie=edge">
49 49
 	<title>
50
-		<?php print $title;	?>
50
+		<?php print $title; ?>
51 51
 	</title>
52 52
 	<?php
53 53
 
54 54
 
55
-	$jQueryUICSSUrl = $context->cdnUrl . '/jquery/css/base/jquery-ui.min.css?layout=classic';
55
+	$jQueryUICSSUrl = $context->cdnUrl.'/jquery/css/base/jquery-ui.min.css?layout=classic';
56 56
 	print '<link rel="stylesheet" href="'.$jQueryUICSSUrl.' ">'."\n";
57 57
 
58 58
 	//$jNotifyCSSUrl = $context->rootUrl.'includes/jquery/plugins/jnotify/jquery.jnotify.css';
59 59
 	//$jNotifyCSSUrl = dol_buildpath('/includes/jquery/plugins/jnotify/jquery.jnotify.min.css', 2);
60
-	$jNotifyCSSUrl =  $context->cdnUrl . '/jquery/plugins/jnotify/jquery.jnotify.min.css?layout=classic';
60
+	$jNotifyCSSUrl = $context->cdnUrl.'/jquery/plugins/jnotify/jquery.jnotify.min.css?layout=classic';
61 61
 	print '<link rel="stylesheet" href="'.$jNotifyCSSUrl.' ">'."\n";
62 62
 
63 63
 	?>
@@ -68,21 +68,21 @@  discard block
 block discarded – undo
68 68
 	<?php
69 69
 
70 70
 	// JQuery
71
-	$jQueryJSUrl =  $context->cdnUrl . '/jquery/js/jquery.min.js';
71
+	$jQueryJSUrl = $context->cdnUrl.'/jquery/js/jquery.min.js';
72 72
 	print '<script nonce="'.getNonce().'" src="'.$jQueryJSUrl.'"></script>'."\n";
73 73
 
74
-	$jQueryUIJSUrl =  $context->cdnUrl . '/jquery/js/jquery-ui.min.js';
74
+	$jQueryUIJSUrl = $context->cdnUrl.'/jquery/js/jquery-ui.min.js';
75 75
 	print '<script nonce="'.getNonce().'" src="'.$jQueryUIJSUrl.'"></script>'."\n";
76 76
 
77 77
 	// JNotify
78 78
 	//$jNotifyJSUrl = $context->rootUrl.'includes/jquery/plugins/jnotify/jquery.jnotify.js';
79 79
 	//$jNotifyJSUrl = dol_buildpath('/includes/jquery/plugins/jnotify/jquery.jnotify.min.js', 2);
80
-	$jNotifyJSUrl =  $context->cdnUrl . '/jquery/plugins/jnotify/jquery.jnotify.min.js';
80
+	$jNotifyJSUrl = $context->cdnUrl.'/jquery/plugins/jnotify/jquery.jnotify.min.js';
81 81
 	print '<script nonce="'.getNonce().'" src="'.$jNotifyJSUrl.'"></script>'."\n";
82 82
 
83 83
 	// SELECT 2
84
-	print '<link rel="stylesheet" href="'.$context->cdnUrl . '/jquery/plugins/select2/dist/css/select2.css">'."\n";
85
-	print '<script nonce="'.getNonce().'" src="'.$context->cdnUrl . '/jquery/plugins/select2/dist/js/select2.full.min.js"></script>'."\n";
84
+	print '<link rel="stylesheet" href="'.$context->cdnUrl.'/jquery/plugins/select2/dist/css/select2.css">'."\n";
85
+	print '<script nonce="'.getNonce().'" src="'.$context->cdnUrl.'/jquery/plugins/select2/dist/js/select2.full.min.js"></script>'."\n";
86 86
 
87 87
 	// Modal script
88 88
 	$ModalJSUrl = $context->rootUrl.'js/modal.js';
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
 	print '<script nonce="'.getNonce().'" src="'.$jQueryUIJSUrl.'"></script>'."\n";
94 94
 
95 95
 	$bodyAttributes = [
96
-		'data-theme' => $vars['body-theme']??'custom',
96
+		'data-theme' => $vars['body-theme'] ?? 'custom',
97 97
 		'data-controller' => $context->controller,
98 98
 	];
99 99
 
Please login to merge, or discard this patch.
htdocs/subtotals/class/commonsubtotal.class.php 1 patch
Spacing   +161 added lines, -161 removed lines patch added patch discarded remove patch
@@ -119,110 +119,110 @@  discard block
 block discarded – undo
119 119
 				}
120 120
 			}
121 121
 
122
-			if ($max_existing_level+1 < $depth) {
123
-				$depth = $max_existing_level+1;
122
+			if ($max_existing_level + 1 < $depth) {
123
+				$depth = $max_existing_level + 1;
124 124
 				$this->errors[] = $langs->trans("TitleAddedLevelTooHigh", $depth);
125 125
 
126
-				$error ++;
126
+				$error++;
127 127
 			}
128 128
 		}
129 129
 
130 130
 		// Add the line calling the right module
131 131
 		if ($current_module == 'facture' && $this instanceof Facture) {
132 132
 			$result = $this->addline(
133
-				$desc,					// Description
134
-				0,						// Unit price
135
-				$depth,					// Quantity
136
-				0,						// VAT rate
137
-				0,						// Local tax 1
138
-				0,						// Local tax 2
139
-				0,						// FK product
140
-				0,						// Discount percentage
141
-				'',						// Date start
142
-				'',						// Date end
143
-				0,						// FK code ventilation
144
-				0,						// Info bits
145
-				0,						// FK remise except
146
-				'',						// Price base type
147
-				0,						// PU ttc
148
-				self::$PRODUCT_TYPE,	// Type
149
-				$rang,					// Rang
133
+				$desc, // Description
134
+				0, // Unit price
135
+				$depth, // Quantity
136
+				0, // VAT rate
137
+				0, // Local tax 1
138
+				0, // Local tax 2
139
+				0, // FK product
140
+				0, // Discount percentage
141
+				'', // Date start
142
+				'', // Date end
143
+				0, // FK code ventilation
144
+				0, // Info bits
145
+				0, // FK remise except
146
+				'', // Price base type
147
+				0, // PU ttc
148
+				self::$PRODUCT_TYPE, // Type
149
+				$rang, // Rang
150 150
 				SUBTOTALS_SPECIAL_CODE	// Special code
151 151
 			);
152 152
 		} elseif ($current_module == 'propal' && $this instanceof Propal) {
153 153
 			$result = $this->addline(
154
-				$desc,					// Description
155
-				0,						// Unit price
156
-				$depth,					// Quantity
157
-				0,						// VAT rate
158
-				0,						// Local tax 1
159
-				0,						// Local tax 2
160
-				0,						// FK product
161
-				0,						// Discount percentage
162
-				'',						// Price base type
163
-				0,						// PU ttc
164
-				0,						// Info bits
165
-				self::$PRODUCT_TYPE,	// Type
166
-				$rang,					// Rang
154
+				$desc, // Description
155
+				0, // Unit price
156
+				$depth, // Quantity
157
+				0, // VAT rate
158
+				0, // Local tax 1
159
+				0, // Local tax 2
160
+				0, // FK product
161
+				0, // Discount percentage
162
+				'', // Price base type
163
+				0, // PU ttc
164
+				0, // Info bits
165
+				self::$PRODUCT_TYPE, // Type
166
+				$rang, // Rang
167 167
 				SUBTOTALS_SPECIAL_CODE	// Special code
168 168
 			);
169 169
 		} elseif ($current_module == 'commande' && $this instanceof Commande) {
170 170
 			$result = $this->addline(
171
-				$desc,					// Description
172
-				0,						// Unit price
173
-				$depth,					// Quantity
174
-				0,						// VAT rate
175
-				0,						// Local tax 1
176
-				0,						// Local tax 2
177
-				0,						// FK product
178
-				0,						// Discount percentage
179
-				0,						// Info bits
180
-				0,						// FK remise except
181
-				'',						// Price base type
182
-				0,						// PU ttc
183
-				'',						// Date start
184
-				'',						// Date end
185
-				self::$PRODUCT_TYPE,	// Type
186
-				$rang,					// Rang
171
+				$desc, // Description
172
+				0, // Unit price
173
+				$depth, // Quantity
174
+				0, // VAT rate
175
+				0, // Local tax 1
176
+				0, // Local tax 2
177
+				0, // FK product
178
+				0, // Discount percentage
179
+				0, // Info bits
180
+				0, // FK remise except
181
+				'', // Price base type
182
+				0, // PU ttc
183
+				'', // Date start
184
+				'', // Date end
185
+				self::$PRODUCT_TYPE, // Type
186
+				$rang, // Rang
187 187
 				SUBTOTALS_SPECIAL_CODE	// Special code
188 188
 			);
189 189
 		} elseif ($current_module == 'shipping' && $this instanceof Expedition) {
190 190
 			$result = $this->addline(
191
-				0,						// Warehouse ID
192
-				(int) $parent_line,		// Source line
191
+				0, // Warehouse ID
192
+				(int) $parent_line, // Source line
193 193
 				$depth					// Quantity
194 194
 			);
195 195
 		} elseif ($current_module == 'facturerec' && $this instanceof FactureRec) {
196
-			$rang = $rang == -1 ? $rang : $rang-1;
196
+			$rang = $rang == -1 ? $rang : $rang - 1;
197 197
 			$result = $this->addline(
198
-				$desc,					// Description
199
-				0,						// Unit price
200
-				$depth,					// Quantity
201
-				0,						// VAT rate
202
-				0,						// Local tax 1
203
-				0,						// Local tax 2
204
-				0,						// FK product
205
-				0,						// Discount percentage
206
-				'',						// Price base type
207
-				0,						// Info bits
208
-				0,						// FK remise except
209
-				0,						// PU ttc
210
-				self::$PRODUCT_TYPE,	// Type
211
-				$rang,					// Rang
198
+				$desc, // Description
199
+				0, // Unit price
200
+				$depth, // Quantity
201
+				0, // VAT rate
202
+				0, // Local tax 1
203
+				0, // Local tax 2
204
+				0, // FK product
205
+				0, // Discount percentage
206
+				'', // Price base type
207
+				0, // Info bits
208
+				0, // FK remise except
209
+				0, // PU ttc
210
+				self::$PRODUCT_TYPE, // Type
211
+				$rang, // Rang
212 212
 				SUBTOTALS_SPECIAL_CODE	// Special code
213 213
 			);
214 214
 			$this->fetch_lines();
215 215
 		} elseif ($current_module == 'fichinter' && $this instanceof Fichinter) {
216 216
 			global $user;
217 217
 			$result = $this->addline(
218
-				$user,					// user
219
-				$this->id,				// fk_fichinter
220
-				$desc,					// Description
221
-				0,						// dateintervention
222
-				$depth,					// duration
223
-				[],						// arrayoption
224
-				self::$PRODUCT_TYPE,	// Type
225
-				$rang,					// Rang
218
+				$user, // user
219
+				$this->id, // fk_fichinter
220
+				$desc, // Description
221
+				0, // dateintervention
222
+				$depth, // duration
223
+				[], // arrayoption
224
+				self::$PRODUCT_TYPE, // Type
225
+				$rang, // Rang
226 226
 				SUBTOTALS_SPECIAL_CODE	// Special code
227 227
 			);
228 228
 		}
@@ -272,7 +272,7 @@  discard block
 block discarded – undo
272 272
 
273 273
 		if ($correspondingstline) {
274 274
 			$oldDesc = "";
275
-			$oldDepth =  0;
275
+			$oldDepth = 0;
276 276
 			foreach ($this->lines as $line) {
277 277
 				if ($line->id == $id) {
278 278
 					$oldDesc = $line->desc;
@@ -337,7 +337,7 @@  discard block
 block discarded – undo
337 337
 
338 338
 		$max_existing_level = 0;
339 339
 
340
-		if ($depth>0) {
340
+		if ($depth > 0) {
341 341
 			foreach ($this->lines as $line) {
342 342
 				if ($line->special_code == SUBTOTALS_SPECIAL_CODE && $line->qty > $max_existing_level && $line->id != $lineid) {
343 343
 					$max_existing_level = $line->qty;
@@ -345,15 +345,15 @@  discard block
 block discarded – undo
345 345
 			}
346 346
 		}
347 347
 
348
-		if ($max_existing_level+1 < $depth) {
349
-			$depth = $max_existing_level+1;
348
+		if ($max_existing_level + 1 < $depth) {
349
+			$depth = $max_existing_level + 1;
350 350
 			$this->errors[] = $langs->trans("TitleEditedLevelTooHigh");
351
-			$error ++;
351
+			$error++;
352 352
 		}
353 353
 
354
-		if ($depth>0) {
354
+		if ($depth > 0) {
355 355
 			$oldDesc = "";
356
-			$oldDepth =  0;
356
+			$oldDepth = 0;
357 357
 			foreach ($this->lines as $line) {
358 358
 				if ($line->id == $lineid) {
359 359
 					$oldDesc = $line->desc;
@@ -369,66 +369,66 @@  discard block
 block discarded – undo
369 369
 		// Update the line calling the right module
370 370
 		if ($current_module == 'facture' && $this instanceof Facture) {
371 371
 			$result = $this->updateline(
372
-				$lineid, 				// ID of line to change
373
-				$desc,					// Description
374
-				0,						// Unit price
375
-				$depth,					// Quantity
376
-				0,						// Discount percentage
377
-				'',						// Date start
378
-				'',						// Date end
379
-				0,						// VAT rate
380
-				0,						// Local tax 1
381
-				0,						// Local tax 2
382
-				'',						// Price base type
383
-				0, 						// Info bits
384
-				self::$PRODUCT_TYPE,	// Type
385
-				0,						// FK parent line
386
-				0,						// Skip update total
387
-				0,						// FK fournprice
388
-				0,						// PA ht
389
-				'',						// Label
372
+				$lineid, // ID of line to change
373
+				$desc, // Description
374
+				0, // Unit price
375
+				$depth, // Quantity
376
+				0, // Discount percentage
377
+				'', // Date start
378
+				'', // Date end
379
+				0, // VAT rate
380
+				0, // Local tax 1
381
+				0, // Local tax 2
382
+				'', // Price base type
383
+				0, // Info bits
384
+				self::$PRODUCT_TYPE, // Type
385
+				0, // FK parent line
386
+				0, // Skip update total
387
+				0, // FK fournprice
388
+				0, // PA ht
389
+				'', // Label
390 390
 				SUBTOTALS_SPECIAL_CODE	// Special code
391 391
 			);
392 392
 		} elseif ($current_module == 'propal' && $this instanceof Propal) {
393 393
 			$result = $this->updateline(
394
-				$lineid, 				// ID of line to change
395
-				0,						// Unit price
396
-				$depth,					// Quantity
397
-				0,						// Discount percentage
398
-				0,						// VAT rate
399
-				0,						// Local tax 1
400
-				0,						// Local tax 2
401
-				$desc,					// Description
402
-				'',						// Price base type
403
-				0,						// Info bits
394
+				$lineid, // ID of line to change
395
+				0, // Unit price
396
+				$depth, // Quantity
397
+				0, // Discount percentage
398
+				0, // VAT rate
399
+				0, // Local tax 1
400
+				0, // Local tax 2
401
+				$desc, // Description
402
+				'', // Price base type
403
+				0, // Info bits
404 404
 				SUBTOTALS_SPECIAL_CODE, // Special code
405
-				0, 						// FK parent line
406
-				0, 						// Skip update total
407
-				0, 						// FK fournprice
408
-				0, 						// PA ht
409
-				'',						// Label
405
+				0, // FK parent line
406
+				0, // Skip update total
407
+				0, // FK fournprice
408
+				0, // PA ht
409
+				'', // Label
410 410
 				self::$PRODUCT_TYPE		// Type
411 411
 			);
412 412
 		} elseif ($current_module == 'commande' && $this instanceof Commande) {
413 413
 			$result = $this->updateline(
414
-				$lineid, 				// ID of line to change
415
-				$desc,					// Description
416
-				0,						// Unit price
417
-				$depth,					// Quantity
418
-				0,						// Discount percentage
419
-				0,						// VAT rate
420
-				0,						// Local tax 1
421
-				0,						// Local tax 2
422
-				'',						// Price base type
423
-				0,						// Info bits
424
-				'',						// Date start
425
-				'',						// Date end
426
-				self::$PRODUCT_TYPE,	// Type
427
-				0, 						// FK parent line
428
-				0, 						// Skip update total
429
-				0, 						// FK fournprice
430
-				0, 						// PA ht
431
-				'',						// Label
414
+				$lineid, // ID of line to change
415
+				$desc, // Description
416
+				0, // Unit price
417
+				$depth, // Quantity
418
+				0, // Discount percentage
419
+				0, // VAT rate
420
+				0, // Local tax 1
421
+				0, // Local tax 2
422
+				'', // Price base type
423
+				0, // Info bits
424
+				'', // Date start
425
+				'', // Date end
426
+				self::$PRODUCT_TYPE, // Type
427
+				0, // FK parent line
428
+				0, // Skip update total
429
+				0, // FK fournprice
430
+				0, // PA ht
431
+				'', // Label
432 432
 				SUBTOTALS_SPECIAL_CODE	// Special code
433 433
 			);
434 434
 		} elseif ($current_module == 'facturerec' && $this instanceof FactureRec) {
@@ -436,21 +436,21 @@  discard block
 block discarded – undo
436 436
 			$objectline->fetch($lineid);
437 437
 			$line_rang = $objectline->rang;
438 438
 			$result = $this->updateline(
439
-				$lineid,				// ID of line to change
440
-				$desc,					// Description
441
-				0,						// Unit price
442
-				$depth,					// Quantity
443
-				0,						// VAT rate
444
-				0,						// Local tax 1
445
-				0,						// Local tax 2
446
-				0,						// FK parent line
447
-				0,						// Discount percentage
448
-				'',						// Price base type
449
-				0,						// Info bits
450
-				0,						// FK parent line
451
-				0,						// PU ttc
452
-				self::$PRODUCT_TYPE,	// Type
453
-				$line_rang,				// Rang
439
+				$lineid, // ID of line to change
440
+				$desc, // Description
441
+				0, // Unit price
442
+				$depth, // Quantity
443
+				0, // VAT rate
444
+				0, // Local tax 1
445
+				0, // Local tax 2
446
+				0, // FK parent line
447
+				0, // Discount percentage
448
+				'', // Price base type
449
+				0, // Info bits
450
+				0, // FK parent line
451
+				0, // PU ttc
452
+				self::$PRODUCT_TYPE, // Type
453
+				$line_rang, // Rang
454 454
 				SUBTOTALS_SPECIAL_CODE	// Special code
455 455
 			);
456 456
 		}
@@ -495,9 +495,9 @@  discard block
 block discarded – undo
495 495
 		$result = 0;
496 496
 		$linerang -= 1;
497 497
 
498
-		$nb_lines = count($this->lines)+1;
498
+		$nb_lines = count($this->lines) + 1;
499 499
 
500
-		for ($i = $linerang+1; $i < $nb_lines; $i++) {
500
+		for ($i = $linerang + 1; $i < $nb_lines; $i++) {
501 501
 			if ($this->lines[$i]->special_code == SUBTOTALS_SPECIAL_CODE) {
502 502
 				if (abs($this->lines[$i]->qty) <= (int) $this->lines[$linerang]->qty) {
503 503
 					return 1;
@@ -597,16 +597,16 @@  discard block
 block discarded – undo
597 597
 	public function getSubtotalLineAmount($line)
598 598
 	{
599 599
 		$final_amount = 0;
600
-		for ($i = $line->rang-1; $i > 0; $i--) {
601
-			if (is_null($this->lines[$i-1]) || $this->lines[$i-1]->rang >= $line->rang) {
600
+		for ($i = $line->rang - 1; $i > 0; $i--) {
601
+			if (is_null($this->lines[$i - 1]) || $this->lines[$i - 1]->rang >= $line->rang) {
602 602
 				continue;
603 603
 			}
604
-			if ($this->lines[$i-1]->special_code == SUBTOTALS_SPECIAL_CODE && $this->lines[$i-1]->qty > 0) {
605
-				if ($this->lines[$i-1]->qty <= abs($line->qty)) {
604
+			if ($this->lines[$i - 1]->special_code == SUBTOTALS_SPECIAL_CODE && $this->lines[$i - 1]->qty > 0) {
605
+				if ($this->lines[$i - 1]->qty <= abs($line->qty)) {
606 606
 					return price($final_amount);
607 607
 				}
608 608
 			} else {
609
-				$final_amount += $this->lines[$i-1]->total_ht;
609
+				$final_amount += $this->lines[$i - 1]->total_ht;
610 610
 			}
611 611
 		}
612 612
 		return price($final_amount);
@@ -624,16 +624,16 @@  discard block
 block discarded – undo
624 624
 	public function getSubtotalLineMulticurrencyAmount($line)
625 625
 	{
626 626
 		$final_amount = 0;
627
-		for ($i = $line->rang-1; $i > 0; $i--) {
628
-			if (is_null($this->lines[$i-1]) || $this->lines[$i-1]->rang >= $line->rang) {
627
+		for ($i = $line->rang - 1; $i > 0; $i--) {
628
+			if (is_null($this->lines[$i - 1]) || $this->lines[$i - 1]->rang >= $line->rang) {
629 629
 				continue;
630 630
 			}
631
-			if ($this->lines[$i-1]->special_code == SUBTOTALS_SPECIAL_CODE && $this->lines[$i-1]->qty>0) {
632
-				if ($this->lines[$i-1]->qty <= abs($line->qty)) {
631
+			if ($this->lines[$i - 1]->special_code == SUBTOTALS_SPECIAL_CODE && $this->lines[$i - 1]->qty > 0) {
632
+				if ($this->lines[$i - 1]->qty <= abs($line->qty)) {
633 633
 					return price($final_amount);
634 634
 				}
635 635
 			} else {
636
-				$final_amount += $this->lines[$i-1]->multicurrency_total_ht;
636
+				$final_amount += $this->lines[$i - 1]->multicurrency_total_ht;
637 637
 			}
638 638
 		}
639 639
 		return price($final_amount);
@@ -701,7 +701,7 @@  discard block
 block discarded – undo
701 701
 		$toDisableLines = array();
702 702
 		$toDisable = true;
703 703
 		$oldDesc = "";
704
-		$oldDepth =  0;
704
+		$oldDepth = 0;
705 705
 
706 706
 		foreach ($this->lines as $titleLine) {
707 707
 			if ($titleLine->special_code != SUBTOTALS_SPECIAL_CODE || $titleLine->qty <= 0) {
@@ -720,7 +720,7 @@  discard block
 block discarded – undo
720 720
 						$toDisableLines = array_merge($toDisableLines, array($titleLine->id, $line->id));
721 721
 					}
722 722
 					$oldDesc = "";
723
-					$oldDepth =  0;
723
+					$oldDepth = 0;
724 724
 					$toDisable = true;
725 725
 					break;
726 726
 				}
Please login to merge, or discard this patch.
htdocs/core/class/html.formcompany.class.php 1 patch
Spacing   +112 added lines, -112 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
  *	Only common components are here.
34 34
  */
35 35
 
36
-require_once DOL_DOCUMENT_ROOT . '/core/class/html.form.class.php';
36
+require_once DOL_DOCUMENT_ROOT.'/core/class/html.form.class.php';
37 37
 
38 38
 
39 39
 /**
@@ -57,13 +57,13 @@  discard block
 block discarded – undo
57 57
 		$effs = array();
58 58
 
59 59
 		$sql = "SELECT id, code, libelle as label";
60
-		$sql .= " FROM " . $this->db->prefix() . "c_typent";
61
-		$sql .= " WHERE active = 1 AND (fk_country IS NULL OR fk_country = " . (empty($mysoc->country_id) ? '0' : $mysoc->country_id) . ")";
60
+		$sql .= " FROM ".$this->db->prefix()."c_typent";
61
+		$sql .= " WHERE active = 1 AND (fk_country IS NULL OR fk_country = ".(empty($mysoc->country_id) ? '0' : $mysoc->country_id).")";
62 62
 		if ($filter) {
63
-			$sql .= " " . $filter;
63
+			$sql .= " ".$filter;
64 64
 		}
65 65
 		$sql .= " ORDER by position, id";
66
-		dol_syslog(get_class($this) . '::typent_array', LOG_DEBUG);
66
+		dol_syslog(get_class($this).'::typent_array', LOG_DEBUG);
67 67
 		$resql = $this->db->query($sql);
68 68
 		if ($resql) {
69 69
 			$num = $this->db->num_rows($resql);
@@ -106,13 +106,13 @@  discard block
 block discarded – undo
106 106
 		$effs = array();
107 107
 
108 108
 		$sql = "SELECT id, code, libelle as label";
109
-		$sql .= " FROM " . $this->db->prefix() . "c_effectif";
109
+		$sql .= " FROM ".$this->db->prefix()."c_effectif";
110 110
 		$sql .= " WHERE active = 1";
111 111
 		if ($filter) {
112
-			$sql .= " " . $filter;
112
+			$sql .= " ".$filter;
113 113
 		}
114 114
 		$sql .= " ORDER BY id ASC";
115
-		dol_syslog(get_class($this) . '::effectif_array', LOG_DEBUG);
115
+		dol_syslog(get_class($this).'::effectif_array', LOG_DEBUG);
116 116
 		$resql = $this->db->query($sql);
117 117
 		if ($resql) {
118 118
 			$num = $this->db->num_rows($resql);
@@ -153,13 +153,13 @@  discard block
 block discarded – undo
153 153
 		// phpcs:enable
154 154
 		global $user, $langs;
155 155
 
156
-		print '<form method="post" action="' . $page . '">';
156
+		print '<form method="post" action="'.$page.'">';
157 157
 		print '<input type="hidden" name="action" value="setprospectlevel">';
158
-		print '<input type="hidden" name="token" value="' . newToken() . '">';
158
+		print '<input type="hidden" name="token" value="'.newToken().'">';
159 159
 
160
-		dol_syslog(get_class($this) . '::form_prospect_level', LOG_DEBUG);
160
+		dol_syslog(get_class($this).'::form_prospect_level', LOG_DEBUG);
161 161
 		$sql = "SELECT code, label";
162
-		$sql .= " FROM " . $this->db->prefix() . "c_prospectlevel";
162
+		$sql .= " FROM ".$this->db->prefix()."c_prospectlevel";
163 163
 		$sql .= " WHERE active > 0";
164 164
 		$sql .= " ORDER BY sortorder";
165 165
 		$resql = $this->db->query($sql);
@@ -185,9 +185,9 @@  discard block
 block discarded – undo
185 185
 			dol_print_error($this->db);
186 186
 		}
187 187
 		if (!empty($htmlname) && $user->admin) {
188
-			print ' ' . info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1);
188
+			print ' '.info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1);
189 189
 		}
190
-		print '<input type="submit" class="button button-save valignmiddle small" value="' . $langs->trans("Modify") . '">';
190
+		print '<input type="submit" class="button button-save valignmiddle small" value="'.$langs->trans("Modify").'">';
191 191
 		print '</form>';
192 192
 	}
193 193
 
@@ -204,13 +204,13 @@  discard block
 block discarded – undo
204 204
 	{
205 205
 		global $user, $langs;
206 206
 
207
-		print '<form method="post" action="' . $page . '">';
207
+		print '<form method="post" action="'.$page.'">';
208 208
 		print '<input type="hidden" name="action" value="setprospectcontactlevel">';
209
-		print '<input type="hidden" name="token" value="' . newToken() . '">';
209
+		print '<input type="hidden" name="token" value="'.newToken().'">';
210 210
 
211 211
 		dol_syslog(__METHOD__, LOG_DEBUG);
212 212
 		$sql = "SELECT code, label";
213
-		$sql .= " FROM " . $this->db->prefix() . "c_prospectcontactlevel";
213
+		$sql .= " FROM ".$this->db->prefix()."c_prospectcontactlevel";
214 214
 		$sql .= " WHERE active > 0";
215 215
 		$sql .= " ORDER BY sortorder";
216 216
 		$resql = $this->db->query($sql);
@@ -236,9 +236,9 @@  discard block
 block discarded – undo
236 236
 			dol_print_error($this->db);
237 237
 		}
238 238
 		if (!empty($htmlname) && $user->admin) {
239
-			print ' ' . info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1);
239
+			print ' '.info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1);
240 240
 		}
241
-		print '<input type="submit" class="button button-save valignmiddle small" value="' . $langs->trans("Modify") . '">';
241
+		print '<input type="submit" class="button button-save valignmiddle small" value="'.$langs->trans("Modify").'">';
242 242
 		print '</form>';
243 243
 	}
244 244
 
@@ -279,7 +279,7 @@  discard block
 block discarded – undo
279 279
 		// phpcs:enable
280 280
 		global $conf, $langs, $user;
281 281
 
282
-		dol_syslog(get_class($this) . "::select_departement selected=" . $selected . ", country_codeid=" . $country_codeid, LOG_DEBUG);
282
+		dol_syslog(get_class($this)."::select_departement selected=".$selected.", country_codeid=".$country_codeid, LOG_DEBUG);
283 283
 
284 284
 		$langs->load("dict");
285 285
 
@@ -287,28 +287,28 @@  discard block
 block discarded – undo
287 287
 
288 288
 		// Search departements/cantons/province active d'une region et pays actif
289 289
 		$sql = "SELECT d.rowid, d.code_departement as code, d.nom as name, d.active, c.label as country, c.code as country_code, r.nom as region_name FROM";
290
-		$sql .= " " . $this->db->prefix() . "c_departements as d, " . $this->db->prefix() . "c_regions as r," . $this->db->prefix() . "c_country as c";
290
+		$sql .= " ".$this->db->prefix()."c_departements as d, ".$this->db->prefix()."c_regions as r,".$this->db->prefix()."c_country as c";
291 291
 		$sql .= " WHERE d.fk_region=r.code_region and r.fk_pays=c.rowid";
292 292
 		$sql .= " AND d.active = 1 AND r.active = 1 AND c.active = 1";
293 293
 		if ($country_codeid && is_numeric($country_codeid)) {
294
-			$sql .= " AND c.rowid = '" . $this->db->escape($country_codeid) . "'";
294
+			$sql .= " AND c.rowid = '".$this->db->escape($country_codeid)."'";
295 295
 		}
296 296
 		if ($country_codeid && !is_numeric($country_codeid)) {
297
-			$sql .= " AND c.code = '" . $this->db->escape($country_codeid) . "'";
297
+			$sql .= " AND c.code = '".$this->db->escape($country_codeid)."'";
298 298
 		}
299 299
 		$sql .= " ORDER BY c.code, d.code_departement";
300 300
 
301 301
 		$result = $this->db->query($sql);
302 302
 		if ($result) {
303 303
 			if (!empty($htmlname)) {
304
-				$out .= '<select id="' . $htmlname . '" class="flat' . ($morecss ? ' ' . $morecss : '') . '" name="' . $htmlname . '">';
304
+				$out .= '<select id="'.$htmlname.'" class="flat'.($morecss ? ' '.$morecss : '').'" name="'.$htmlname.'">';
305 305
 			}
306 306
 			if ($country_codeid) {
307 307
 				$out .= '<option value="0">&nbsp;</option>';
308 308
 			}
309 309
 			$num = $this->db->num_rows($result);
310 310
 			$i = 0;
311
-			dol_syslog(get_class($this) . "::select_departement num=" . $num, LOG_DEBUG);
311
+			dol_syslog(get_class($this)."::select_departement num=".$num, LOG_DEBUG);
312 312
 			if ($num) {
313 313
 				$country = '';
314 314
 				while ($i < $num) {
@@ -319,15 +319,15 @@  discard block
 block discarded – undo
319 319
 						if (!$country || $country != $obj->country) {
320 320
 							// Show break if we are in list with multiple countries
321 321
 							if (!$country_codeid && $obj->country_code) {
322
-								$out .= '<option value="-1" disabled data-html="----- ' . $obj->country . ' -----">----- ' . $obj->country . " -----</option>\n";
322
+								$out .= '<option value="-1" disabled data-html="----- '.$obj->country.' -----">----- '.$obj->country." -----</option>\n";
323 323
 								$country = $obj->country;
324 324
 							}
325 325
 						}
326 326
 
327 327
 						if (!empty($selected) && $selected == $obj->rowid) {
328
-							$out .= '<option value="' . $obj->rowid . '" selected>';
328
+							$out .= '<option value="'.$obj->rowid.'" selected>';
329 329
 						} else {
330
-							$out .= '<option value="' . $obj->rowid . '">';
330
+							$out .= '<option value="'.$obj->rowid.'">';
331 331
 						}
332 332
 
333 333
 						// Si traduction existe, on l'utilise, sinon on prend le libelle par default
@@ -336,13 +336,13 @@  discard block
 block discarded – undo
336 336
 							(getDolGlobalInt('MAIN_SHOW_STATE_CODE') == 1 || getDolGlobalInt('MAIN_SHOW_STATE_CODE') == 2 || getDolGlobalString('MAIN_SHOW_STATE_CODE') === 'all')
337 337
 						) {
338 338
 							if (getDolGlobalInt('MAIN_SHOW_REGION_IN_STATE_SELECT') == 1) {
339
-								$out .= $obj->region_name . ' - ' . $obj->code . ' - ' . ($langs->trans($obj->code) != $obj->code ? $langs->trans($obj->code) : ($obj->name != '-' ? $obj->name : ''));
339
+								$out .= $obj->region_name.' - '.$obj->code.' - '.($langs->trans($obj->code) != $obj->code ? $langs->trans($obj->code) : ($obj->name != '-' ? $obj->name : ''));
340 340
 							} else {
341
-								$out .= $obj->code . ' - ' . ($langs->trans($obj->code) != $obj->code ? $langs->trans($obj->code) : ($obj->name != '-' ? $obj->name : ''));
341
+								$out .= $obj->code.' - '.($langs->trans($obj->code) != $obj->code ? $langs->trans($obj->code) : ($obj->name != '-' ? $obj->name : ''));
342 342
 							}
343 343
 						} else {
344 344
 							if (getDolGlobalInt('MAIN_SHOW_REGION_IN_STATE_SELECT') == 1) {
345
-								$out .= $obj->region_name . ' - ' . ($langs->trans($obj->code) != $obj->code ? $langs->trans($obj->code) : ($obj->name != '-' ? $obj->name : ''));
345
+								$out .= $obj->region_name.' - '.($langs->trans($obj->code) != $obj->code ? $langs->trans($obj->code) : ($obj->name != '-' ? $obj->name : ''));
346 346
 							} else {
347 347
 								$out .= ($langs->trans($obj->code) != $obj->code ? $langs->trans($obj->code) : ($obj->name != '-' ? $obj->name : ''));
348 348
 							}
@@ -357,7 +357,7 @@  discard block
 block discarded – undo
357 357
 				$out .= '</select>';
358 358
 			}
359 359
 			if (!empty($htmlname) && $user->admin) {
360
-				$out .= ' ' . info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1);
360
+				$out .= ' '.info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1);
361 361
 			}
362 362
 		} else {
363 363
 			dol_print_error($this->db);
@@ -365,7 +365,7 @@  discard block
 block discarded – undo
365 365
 
366 366
 		// Make select dynamic
367 367
 		if (!empty($htmlname)) {
368
-			include_once DOL_DOCUMENT_ROOT . '/core/lib/ajax.lib.php';
368
+			include_once DOL_DOCUMENT_ROOT.'/core/lib/ajax.lib.php';
369 369
 			$out .= ajax_combobox($htmlname);
370 370
 		}
371 371
 
@@ -418,14 +418,14 @@  discard block
 block discarded – undo
418 418
 		$langs->load("dict");
419 419
 
420 420
 		$sql = "SELECT r.rowid, r.code_region as code, r.nom as label, r.active, c.code as country_code, c.label as country";
421
-		$sql .= " FROM " . $this->db->prefix() . "c_regions as r, " . $this->db->prefix() . "c_country as c";
421
+		$sql .= " FROM ".$this->db->prefix()."c_regions as r, ".$this->db->prefix()."c_country as c";
422 422
 		$sql .= " WHERE r.fk_pays=c.rowid AND r.active = 1 and c.active = 1";
423 423
 		$sql .= " ORDER BY c.code, c.label ASC";
424 424
 
425
-		dol_syslog(get_class($this) . "::select_region", LOG_DEBUG);
425
+		dol_syslog(get_class($this)."::select_region", LOG_DEBUG);
426 426
 		$resql = $this->db->query($sql);
427 427
 		if ($resql) {
428
-			print '<select class="flat" id="' . $htmlname . '" name="' . $htmlname . '">';
428
+			print '<select class="flat" id="'.$htmlname.'" name="'.$htmlname.'">';
429 429
 			$num = $this->db->num_rows($resql);
430 430
 			$i = 0;
431 431
 			if ($num) {
@@ -437,16 +437,16 @@  discard block
 block discarded – undo
437 437
 					} else {
438 438
 						if ($country == '' || $country != $obj->country) {
439 439
 							// Show break
440
-							$key = $langs->trans("Country" . strtoupper($obj->country_code));
441
-							$valuetoshow = ($key != "Country" . strtoupper($obj->country_code)) ? $obj->country_code . " - " . $key : $obj->country;
442
-							print '<option value="-2" disabled>----- ' . $valuetoshow . " -----</option>\n";
440
+							$key = $langs->trans("Country".strtoupper($obj->country_code));
441
+							$valuetoshow = ($key != "Country".strtoupper($obj->country_code)) ? $obj->country_code." - ".$key : $obj->country;
442
+							print '<option value="-2" disabled>----- '.$valuetoshow." -----</option>\n";
443 443
 							$country = $obj->country;
444 444
 						}
445 445
 
446 446
 						if ($selected > 0 && $selected == $obj->code) {
447
-							print '<option value="' . $obj->code . '" selected>' . $obj->label . '</option>';
447
+							print '<option value="'.$obj->code.'" selected>'.$obj->label.'</option>';
448 448
 						} else {
449
-							print '<option value="' . $obj->code . '">' . $obj->label . '</option>';
449
+							print '<option value="'.$obj->code.'">'.$obj->label.'</option>';
450 450
 						}
451 451
 					}
452 452
 					$i++;
@@ -477,13 +477,13 @@  discard block
 block discarded – undo
477 477
 
478 478
 		$out = '';
479 479
 
480
-		$sql = "SELECT rowid, code, label, active FROM " . $this->db->prefix() . "c_civility";
480
+		$sql = "SELECT rowid, code, label, active FROM ".$this->db->prefix()."c_civility";
481 481
 		$sql .= " WHERE active = 1";
482 482
 
483 483
 		dol_syslog("Form::select_civility", LOG_DEBUG);
484 484
 		$resql = $this->db->query($sql);
485 485
 		if ($resql) {
486
-			$out .= '<select class="flat' . ($morecss ? ' ' . $morecss : '') . '" name="' . $htmlname . '" id="' . $htmlname . '">';
486
+			$out .= '<select class="flat'.($morecss ? ' '.$morecss : '').'" name="'.$htmlname.'" id="'.$htmlname.'">';
487 487
 			$out .= '<option value="">&nbsp;</option>';
488 488
 			$num = $this->db->num_rows($resql);
489 489
 			$i = 0;
@@ -491,12 +491,12 @@  discard block
 block discarded – undo
491 491
 				while ($i < $num) {
492 492
 					$obj = $this->db->fetch_object($resql);
493 493
 					if ($selected == $obj->code) {
494
-						$out .= '<option value="' . $obj->code . '" selected>';
494
+						$out .= '<option value="'.$obj->code.'" selected>';
495 495
 					} else {
496
-						$out .= '<option value="' . $obj->code . '">';
496
+						$out .= '<option value="'.$obj->code.'">';
497 497
 					}
498 498
 					// If translation exists, we use it, otherwise, we use the hard coded label
499
-					$out .= ($langs->trans("Civility" . $obj->code) != "Civility" . $obj->code ? $langs->trans("Civility" . $obj->code) : ($obj->label != '-' ? $obj->label : ''));
499
+					$out .= ($langs->trans("Civility".$obj->code) != "Civility".$obj->code ? $langs->trans("Civility".$obj->code) : ($obj->label != '-' ? $obj->label : ''));
500 500
 					$out .= '</option>';
501 501
 					$i++;
502 502
 				}
@@ -508,7 +508,7 @@  discard block
 block discarded – undo
508 508
 
509 509
 			if ($addjscombo) {
510 510
 				// Enhance with select2
511
-				include_once DOL_DOCUMENT_ROOT . '/core/lib/ajax.lib.php';
511
+				include_once DOL_DOCUMENT_ROOT.'/core/lib/ajax.lib.php';
512 512
 				$out .= ajax_combobox($htmlname);
513 513
 			}
514 514
 		} else {
@@ -558,22 +558,22 @@  discard block
 block discarded – undo
558 558
 
559 559
 		// Lookup the active juridical types for the active countries
560 560
 		$sql  = "SELECT f.rowid, f.code as code , f.libelle as label, f.active, c.label as country, c.code as country_code";
561
-		$sql .= " FROM " . $this->db->prefix() . "c_forme_juridique as f, " . $this->db->prefix() . "c_country as c";
561
+		$sql .= " FROM ".$this->db->prefix()."c_forme_juridique as f, ".$this->db->prefix()."c_country as c";
562 562
 		$sql .= " WHERE f.fk_pays=c.rowid";
563 563
 		$sql .= " AND f.active = 1 AND c.active = 1";
564 564
 		if ($country_codeid) {
565
-			$sql .= " AND c.code = '" . $this->db->escape((string) $country_codeid) . "'";
565
+			$sql .= " AND c.code = '".$this->db->escape((string) $country_codeid)."'";
566 566
 		}
567 567
 		if ($filter) {
568
-			$sql .= " " . $filter;
568
+			$sql .= " ".$filter;
569 569
 		}
570 570
 		$sql .= " ORDER BY c.code";
571 571
 
572
-		dol_syslog(get_class($this) . "::select_juridicalstatus", LOG_DEBUG);
572
+		dol_syslog(get_class($this)."::select_juridicalstatus", LOG_DEBUG);
573 573
 		$resql = $this->db->query($sql);
574 574
 		if ($resql) {
575 575
 			$out .= '<div id="particulier2" class="visible">';
576
-			$out .= '<select class="flat minwidth200' . ($morecss ? ' ' . $morecss : '') . '" name="' . $htmlname . '" id="' . $htmlname . '">';
576
+			$out .= '<select class="flat minwidth200'.($morecss ? ' '.$morecss : '').'" name="'.$htmlname.'" id="'.$htmlname.'">';
577 577
 			if ($country_codeid) {
578 578
 				$out .= '<option value="0">&nbsp;</option>'; // When country_codeid is set, we force to add an empty line because it does not appears from select. When not set, we already get the empty line from select.
579 579
 			}
@@ -588,9 +588,9 @@  discard block
 block discarded – undo
588 588
 					$obj = $this->db->fetch_object($resql);
589 589
 
590 590
 					if ($obj->code) {		// We exclude empty line, we will add it later
591
-						$labelcountry = (($langs->trans("Country" . $obj->country_code) != "Country" . $obj->country_code) ? $langs->trans("Country" . $obj->country_code) : $obj->country);
592
-						$labeljs = (($langs->trans("JuridicalStatus" . $obj->code) != "JuridicalStatus" . $obj->code) ? $langs->trans("JuridicalStatus" . $obj->code) : ($obj->label != '-' ? $obj->label : '')); // $obj->label is already in output charset (converted by database driver)
593
-						$arraydata[(int) $obj->code] = array('code' => (int) $obj->code, 'label' => $labeljs, 'label_sort' => $labelcountry . '_' . $labeljs, 'country_code' => (string) $obj->country_code, 'country' => $labelcountry);
591
+						$labelcountry = (($langs->trans("Country".$obj->country_code) != "Country".$obj->country_code) ? $langs->trans("Country".$obj->country_code) : $obj->country);
592
+						$labeljs = (($langs->trans("JuridicalStatus".$obj->code) != "JuridicalStatus".$obj->code) ? $langs->trans("JuridicalStatus".$obj->code) : ($obj->label != '-' ? $obj->label : '')); // $obj->label is already in output charset (converted by database driver)
593
+						$arraydata[(int) $obj->code] = array('code' => (int) $obj->code, 'label' => $labeljs, 'label_sort' => $labelcountry.'_'.$labeljs, 'country_code' => (string) $obj->country_code, 'country' => $labelcountry);
594 594
 					}
595 595
 					$i++;
596 596
 				}
@@ -604,15 +604,15 @@  discard block
 block discarded – undo
604 604
 					if (!$country || $country != $val['country']) {
605 605
 						// Show break when we are in multi country mode
606 606
 						if (empty($country_codeid) && $val['country_code']) {
607
-							$out .= '<option value="0" disabled class="selectoptiondisabledwhite">----- ' . $val['country'] . " -----</option>\n";
607
+							$out .= '<option value="0" disabled class="selectoptiondisabledwhite">----- '.$val['country']." -----</option>\n";
608 608
 							$country = $val['country'];
609 609
 						}
610 610
 					}
611 611
 
612 612
 					if ($selected > 0 && $selected == $val['code']) {
613
-						$out .= '<option value="' . $val['code'] . '" selected>';
613
+						$out .= '<option value="'.$val['code'].'" selected>';
614 614
 					} else {
615
-						$out .= '<option value="' . $val['code'] . '">';
615
+						$out .= '<option value="'.$val['code'].'">';
616 616
 					}
617 617
 					// If translation exists, we use it, otherwise we use default label in database
618 618
 					$out .= $val['label'];
@@ -621,11 +621,11 @@  discard block
 block discarded – undo
621 621
 			}
622 622
 			$out .= '</select>';
623 623
 			if ($user->admin) {
624
-				$out .= ' ' . info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1);
624
+				$out .= ' '.info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1);
625 625
 			}
626 626
 
627 627
 			// Make select dynamic
628
-			include_once DOL_DOCUMENT_ROOT . '/core/lib/ajax.lib.php';
628
+			include_once DOL_DOCUMENT_ROOT.'/core/lib/ajax.lib.php';
629 629
 			$out .= ajax_combobox($htmlname);
630 630
 
631 631
 			$out .= '</div>';
@@ -679,13 +679,13 @@  discard block
 block discarded – undo
679 679
 			$events[] = array('method' => 'getContacts', 'url' => dol_buildpath('/core/ajax/contacts.php', 1), 'htmlname' => 'contactid', 'params' => array('add-customer-contact' => 'disabled'));
680 680
 
681 681
 			if (count($events)) {	// If there is some ajax events to run once selection is done, we add code here to run events
682
-				print '<script nonce="' . getNonce() . '" type="text/javascript">
682
+				print '<script nonce="'.getNonce().'" type="text/javascript">
683 683
 				jQuery(document).ready(function() {
684
-					$("#search_' . $htmlname . '").change(function() {
685
-						var obj = ' . json_encode($events) . ';
684
+					$("#search_' . $htmlname.'").change(function() {
685
+						var obj = ' . json_encode($events).';
686 686
 						$.each(obj, function(key,values) {
687 687
 							if (values.method.length) {
688
-								runJsCodeForEvent' . $htmlname . '(values);
688
+								runJsCodeForEvent' . $htmlname.'(values);
689 689
 							}
690 690
 						});
691 691
 
@@ -693,13 +693,13 @@  discard block
 block discarded – undo
693 693
 					});
694 694
 
695 695
 					// Function used to execute events when search_htmlname change
696
-					function runJsCodeForEvent' . $htmlname . '(obj) {
697
-						var id = $("#' . $htmlname . '").val();
696
+					function runJsCodeForEvent' . $htmlname.'(obj) {
697
+						var id = $("#' . $htmlname.'").val();
698 698
 						var method = obj.method;
699 699
 						var url = obj.url;
700 700
 						var htmlname = obj.htmlname;
701 701
 						var showempty = obj.showempty;
702
-						console.log("Run runJsCodeForEvent-' . $htmlname . ' from selectCompaniesForNewContact id="+id+" method="+method+" showempty="+showempty+" url="+url+" htmlname="+htmlname);
702
+						console.log("Run runJsCodeForEvent-' . $htmlname.' from selectCompaniesForNewContact id="+id+" method="+method+" showempty="+showempty+" url="+url+" htmlname="+htmlname);
703 703
 						$.getJSON(url,
704 704
 							{
705 705
 								action: method,
@@ -729,9 +729,9 @@  discard block
 block discarded – undo
729 729
 				</script>';
730 730
 			}
731 731
 
732
-			print "\n" . '<!-- Input text for third party with Ajax.Autocompleter (selectCompaniesForNewContact) -->' . "\n";
733
-			print '<input type="text" size="30" id="search_' . $htmlname . '" name="search_' . $htmlname . '" value="' . $name . '" />';
734
-			print ajax_autocompleter((string) ($socid ? $socid : -1), $htmlname, DOL_URL_ROOT . '/societe/ajax/ajaxcompanies.php', '', $minLength, 0);
732
+			print "\n".'<!-- Input text for third party with Ajax.Autocompleter (selectCompaniesForNewContact) -->'."\n";
733
+			print '<input type="text" size="30" id="search_'.$htmlname.'" name="search_'.$htmlname.'" value="'.$name.'" />';
734
+			print ajax_autocompleter((string) ($socid ? $socid : -1), $htmlname, DOL_URL_ROOT.'/societe/ajax/ajaxcompanies.php', '', $minLength, 0);
735 735
 			return $socid;
736 736
 		} else {
737 737
 			// Search to list thirdparties
@@ -743,19 +743,19 @@  discard block
 block discarded – undo
743 743
 				$sql .= ", s.address, s.zip, s.town";
744 744
 				$sql .= ", dictp.code as country_code";
745 745
 			}
746
-			$sql .= " FROM " . $this->db->prefix() . "societe as s";
746
+			$sql .= " FROM ".$this->db->prefix()."societe as s";
747 747
 			if (getDolGlobalString('COMPANY_SHOW_ADDRESS_SELECTLIST')) {
748
-				$sql .= " LEFT JOIN " . $this->db->prefix() . "c_country as dictp ON dictp.rowid = s.fk_pays";
748
+				$sql .= " LEFT JOIN ".$this->db->prefix()."c_country as dictp ON dictp.rowid = s.fk_pays";
749 749
 			}
750 750
 			// Filter on active third parties only (status = 1) Closed third parties must not be selectable
751
-			$sql .= " WHERE s.entity IN (" . getEntity('societe') . ")  AND s.status = 1";
751
+			$sql .= " WHERE s.entity IN (".getEntity('societe').")  AND s.status = 1";
752 752
 			// For ajax search we limit here. For combo list, we limit later
753 753
 			if (is_array($limitto) && count($limitto)) {
754
-				$sql .= " AND s.rowid IN (" . $this->db->sanitize(implode(',', $limitto)) . ")";
754
+				$sql .= " AND s.rowid IN (".$this->db->sanitize(implode(',', $limitto)).")";
755 755
 			}
756 756
 			// filter user access
757 757
 			if (!$user->hasRight('societe', 'client', 'voir') && !$user->socid) {
758
-				$sql .= " AND EXISTS (SELECT sc.fk_soc FROM ".MAIN_DB_PREFIX."societe_commerciaux as sc WHERE sc.fk_soc = s.rowid AND sc.fk_user = ".(int) $user->id .")";
758
+				$sql .= " AND EXISTS (SELECT sc.fk_soc FROM ".MAIN_DB_PREFIX."societe_commerciaux as sc WHERE sc.fk_soc = s.rowid AND sc.fk_user = ".(int) $user->id.")";
759 759
 			}
760 760
 			if ($user->socid > 0) {
761 761
 				$sql .= " AND s.rowid = ".((int) $user->socid);
@@ -768,17 +768,17 @@  discard block
 block discarded – undo
768 768
 
769 769
 			$resql = $this->db->query($sql);
770 770
 			if ($resql) {
771
-				print '<select class="flat' . ($morecss ? ' ' . $morecss : '') . '" id="' . $htmlname . '" name="' . $htmlname . '"';
771
+				print '<select class="flat'.($morecss ? ' '.$morecss : '').'" id="'.$htmlname.'" name="'.$htmlname.'"';
772 772
 				if ($conf->use_javascript_ajax) {
773
-					$javaScript = "window.location='" . dol_escape_js($_SERVER['PHP_SELF']) . "?" . $var_id . "=" . ($forceid > 0 ? $forceid : $object->id) . $moreparam . "&" . $htmlname . "=' + form." . $htmlname . ".options[form." . $htmlname . ".selectedIndex].value;";
774
-					print ' onChange="' . $javaScript . '"';
773
+					$javaScript = "window.location='".dol_escape_js($_SERVER['PHP_SELF'])."?".$var_id."=".($forceid > 0 ? $forceid : $object->id).$moreparam."&".$htmlname."=' + form.".$htmlname.".options[form.".$htmlname.".selectedIndex].value;";
774
+					print ' onChange="'.$javaScript.'"';
775 775
 				}
776 776
 				print '>';
777 777
 				print '<option value="-1">&nbsp;</option>';
778 778
 
779 779
 				$num = $this->db->num_rows($resql);
780 780
 				$i = 0;
781
-				$firstCompany = 0;  // For static analysis
781
+				$firstCompany = 0; // For static analysis
782 782
 				if ($num) {
783 783
 					while ($i < $num) {
784 784
 						$obj = $this->db->fetch_object($resql);
@@ -790,18 +790,18 @@  discard block
 block discarded – undo
790 790
 							$disabled = 1;
791 791
 						}
792 792
 						if ($selected > 0 && $selected == $obj->rowid) {
793
-							print '<option value="' . $obj->rowid . '"';
793
+							print '<option value="'.$obj->rowid.'"';
794 794
 							if ($disabled) {
795 795
 								print ' disabled';
796 796
 							}
797
-							print ' selected>' . dol_escape_htmltag($obj->name, 0, 0, '', 0, 1) . '</option>';
797
+							print ' selected>'.dol_escape_htmltag($obj->name, 0, 0, '', 0, 1).'</option>';
798 798
 							$firstCompany = $obj->rowid;
799 799
 						} else {
800
-							print '<option value="' . $obj->rowid . '"';
800
+							print '<option value="'.$obj->rowid.'"';
801 801
 							if ($disabled) {
802 802
 								print ' disabled';
803 803
 							}
804
-							print '>' . dol_escape_htmltag($obj->name, 0, 0, '', 0, 1) . '</option>';
804
+							print '>'.dol_escape_htmltag($obj->name, 0, 0, '', 0, 1).'</option>';
805 805
 						}
806 806
 						$i++;
807 807
 					}
@@ -836,10 +836,10 @@  discard block
 block discarded – undo
836 836
 
837 837
 		$out = '';
838 838
 		if (is_object($object) && method_exists($object, 'liste_type_contact')) {
839
-			'@phan-var-force CommonObject $object';  // CommonObject has the method.
840
-			$lesTypes = $object->liste_type_contact($source, $sortorder, 2, 1);	// List of types into c_type_contact for element=$object->element
839
+			'@phan-var-force CommonObject $object'; // CommonObject has the method.
840
+			$lesTypes = $object->liste_type_contact($source, $sortorder, 2, 1); // List of types into c_type_contact for element=$object->element
841 841
 
842
-			$out .= '<select class="flat valignmiddle' . ($morecss ? ' ' . $morecss : '') . '" name="' . $htmlname . '" id="' . $htmlname . '">';
842
+			$out .= '<select class="flat valignmiddle'.($morecss ? ' '.$morecss : '').'" name="'.$htmlname.'" id="'.$htmlname.'">';
843 843
 			if ($showempty) {
844 844
 				$out .= '<option value="0">&nbsp;</option>';
845 845
 			}
@@ -882,9 +882,9 @@  discard block
 block discarded – undo
882 882
 		if ($rendermode === 'view') {
883 883
 			$toprint = array();
884 884
 			foreach ($contact->roles as $key => $val) {
885
-				$toprint[] = '<li class="select2-search-choice-dolibarr noborderoncategories" style="background: #bbb;">' . $val['label'] . '</li>';
885
+				$toprint[] = '<li class="select2-search-choice-dolibarr noborderoncategories" style="background: #bbb;">'.$val['label'].'</li>';
886 886
 			}
887
-			return '<div class="select2-container-multi-dolibarr" style="width: 90%;" id="' . $htmlname . '"><ul class="select2-choices-dolibarr">' . implode(' ', $toprint) . '</ul></div>';
887
+			return '<div class="select2-container-multi-dolibarr" style="width: 90%;" id="'.$htmlname.'"><ul class="select2-choices-dolibarr">'.implode(' ', $toprint).'</ul></div>';
888 888
 		}
889 889
 
890 890
 		if ($rendermode === 'edit') {	// A multiselect combo list
@@ -930,14 +930,14 @@  discard block
 block discarded – undo
930 930
 
931 931
 		$size = '';
932 932
 		if (!empty($fieldsize)) {
933
-			$size = 'size="' . $fieldsize . '"';
933
+			$size = 'size="'.$fieldsize.'"';
934 934
 		}
935 935
 
936 936
 		if ($conf->use_javascript_ajax && empty($disableautocomplete)) {
937
-			$out .= ajax_multiautocompleter($htmlname, $fields, DOL_URL_ROOT . '/core/ajax/ziptown.php') . "\n";
937
+			$out .= ajax_multiautocompleter($htmlname, $fields, DOL_URL_ROOT.'/core/ajax/ziptown.php')."\n";
938 938
 			$moreattrib .= ' autocomplete="off"';
939 939
 		}
940
-		$out .= '<input id="' . $htmlname . '" class="maxwidthonsmartphone' . ($morecss ? ' ' . $morecss : '') . '" type="text"' . ($moreattrib ? ' ' . $moreattrib : '') . ' name="' . $htmlname . '" ' . $size . ' value="' . $selected . '">' . "\n";
940
+		$out .= '<input id="'.$htmlname.'" class="maxwidthonsmartphone'.($morecss ? ' '.$morecss : '').'" type="text"'.($moreattrib ? ' '.$moreattrib : '').' name="'.$htmlname.'" '.$size.' value="'.$selected.'">'."\n";
941 941
 
942 942
 		return $out;
943 943
 	}
@@ -1014,7 +1014,7 @@  discard block
 block discarded – undo
1014 1014
 		$parameters = array('formlength' => $formlength, 'selected' => $preselected, 'idprof' => $idprof, 'htmlname' => $htmlname, 'country_code' => $country_code);
1015 1015
 		$reshook = $hookmanager->executeHooks('getInputIdProf', $parameters);
1016 1016
 		if (empty($reshook)) {
1017
-			$out .= '<input type="text" ' . ($morecss ? 'class="' . $morecss . '" ' : '') . 'name="' . $htmlname . '" id="' . $htmlname . '" maxlength="' . $maxlength . '" value="' . $selected . '">';
1017
+			$out .= '<input type="text" '.($morecss ? 'class="'.$morecss.'" ' : '').'name="'.$htmlname.'" id="'.$htmlname.'" maxlength="'.$maxlength.'" value="'.$selected.'">';
1018 1018
 		}
1019 1019
 		$out .= $hookmanager->resPrint;
1020 1020
 
@@ -1045,9 +1045,9 @@  discard block
 block discarded – undo
1045 1045
 				$i = 0;
1046 1046
 				while ($i < $nbvalues) {
1047 1047
 					if ($selected == $valors[$i]) {
1048
-						print '<option value="' . $valors[$i] . '" selected>';
1048
+						print '<option value="'.$valors[$i].'" selected>';
1049 1049
 					} else {
1050
-						print '<option value="' . $valors[$i] . '">';
1050
+						print '<option value="'.$valors[$i].'">';
1051 1051
 					}
1052 1052
 					print $valors[$i];
1053 1053
 					print '</option>';
@@ -1076,7 +1076,7 @@  discard block
 block discarded – undo
1076 1076
 			return '';
1077 1077
 		}
1078 1078
 
1079
-		$out = '<select class="flat ' . $morecss . '" name="' . $htmlname . '" id="' . $htmlidname . '">';
1079
+		$out = '<select class="flat '.$morecss.'" name="'.$htmlname.'" id="'.$htmlidname.'">';
1080 1080
 		if ($typeinput == 'form') {
1081 1081
 			if ($allowempty || ($selected == '' || $selected == '-1')) {
1082 1082
 				$out .= '<option value="-1">';
@@ -1088,33 +1088,33 @@  discard block
 block discarded – undo
1088 1088
 				$out .= '</option>';
1089 1089
 			}
1090 1090
 			if (!getDolGlobalString('SOCIETE_DISABLE_PROSPECTS')) {
1091
-				$out .= '<option value="2"' . ($selected == 2 ? ' selected' : '') . '>' . $langs->trans('Prospect') . '</option>';
1091
+				$out .= '<option value="2"'.($selected == 2 ? ' selected' : '').'>'.$langs->trans('Prospect').'</option>';
1092 1092
 			}
1093 1093
 			if (!getDolGlobalString('SOCIETE_DISABLE_PROSPECTS') && !getDolGlobalString('SOCIETE_DISABLE_CUSTOMERS') && !getDolGlobalString('SOCIETE_DISABLE_PROSPECTSCUSTOMERS')) {
1094
-				$out .= '<option value="3"' . ($selected == 3 ? ' selected' : '') . '>' . $langs->trans('ProspectCustomer') . '</option>';
1094
+				$out .= '<option value="3"'.($selected == 3 ? ' selected' : '').'>'.$langs->trans('ProspectCustomer').'</option>';
1095 1095
 			}
1096 1096
 			if (!getDolGlobalString('SOCIETE_DISABLE_CUSTOMERS')) {
1097
-				$out .= '<option value="1"' . ($selected == 1 ? ' selected' : '') . '>' . $langs->trans('Customer') . '</option>';
1097
+				$out .= '<option value="1"'.($selected == 1 ? ' selected' : '').'>'.$langs->trans('Customer').'</option>';
1098 1098
 			}
1099
-			$out .= '<option value="0"' . ((string) $selected == '0' ? ' selected' : '') . '>' . $langs->trans('NorProspectNorCustomer') . '</option>';
1099
+			$out .= '<option value="0"'.((string) $selected == '0' ? ' selected' : '').'>'.$langs->trans('NorProspectNorCustomer').'</option>';
1100 1100
 		} elseif ($typeinput == 'list') {
1101
-			$out .= '<option value="-1"' . (($selected == '' || $selected == '-1') ? ' selected' : '') . '>&nbsp;</option>';
1101
+			$out .= '<option value="-1"'.(($selected == '' || $selected == '-1') ? ' selected' : '').'>&nbsp;</option>';
1102 1102
 			if (!getDolGlobalString('SOCIETE_DISABLE_PROSPECTS')) {
1103
-				$out .= '<option value="2,3"' . ($selected == '2,3' ? ' selected' : '') . '>' . $langs->trans('Prospect') . '</option>';
1103
+				$out .= '<option value="2,3"'.($selected == '2,3' ? ' selected' : '').'>'.$langs->trans('Prospect').'</option>';
1104 1104
 			}
1105 1105
 			if (!getDolGlobalString('SOCIETE_DISABLE_CUSTOMERS')) {
1106
-				$out .= '<option value="1,3"' . ($selected == '1,3' ? ' selected' : '') . '>' . $langs->trans('Customer') . '</option>';
1106
+				$out .= '<option value="1,3"'.($selected == '1,3' ? ' selected' : '').'>'.$langs->trans('Customer').'</option>';
1107 1107
 			}
1108 1108
 			if (isModEnabled("fournisseur")) {
1109
-				$out .= '<option value="4"' . ($selected == '4' ? ' selected' : '') . '>' . $langs->trans('Supplier') . '</option>';
1109
+				$out .= '<option value="4"'.($selected == '4' ? ' selected' : '').'>'.$langs->trans('Supplier').'</option>';
1110 1110
 			}
1111
-			$out .= '<option value="0"' . ($selected == '0' ? ' selected' : '') . '>' . $langs->trans('Other') . '</option>';
1111
+			$out .= '<option value="0"'.($selected == '0' ? ' selected' : '').'>'.$langs->trans('Other').'</option>';
1112 1112
 		} elseif ($typeinput == 'admin') {
1113 1113
 			if (!getDolGlobalString('SOCIETE_DISABLE_PROSPECTS') && !getDolGlobalString('SOCIETE_DISABLE_CUSTOMERS') && !getDolGlobalString('SOCIETE_DISABLE_PROSPECTSCUSTOMERS')) {
1114
-				$out .= '<option value="3"' . ($selected == 3 ? ' selected' : '') . '>' . $langs->trans('ProspectCustomer') . '</option>';
1114
+				$out .= '<option value="3"'.($selected == 3 ? ' selected' : '').'>'.$langs->trans('ProspectCustomer').'</option>';
1115 1115
 			}
1116 1116
 			if (!getDolGlobalString('SOCIETE_DISABLE_CUSTOMERS')) {
1117
-				$out .= '<option value="1"' . ($selected == 1 ? ' selected' : '') . '>' . $langs->trans('Customer') . '</option>';
1117
+				$out .= '<option value="1"'.($selected == 1 ? ' selected' : '').'>'.$langs->trans('Customer').'</option>';
1118 1118
 			}
1119 1119
 		}
1120 1120
 		$out .= '</select>';
@@ -1141,12 +1141,12 @@  discard block
 block discarded – undo
1141 1141
 
1142 1142
 		$out = '';
1143 1143
 		if ($htmlname != "none") {
1144
-			$out .= '<form method="post" action="' . $page . '">';
1144
+			$out .= '<form method="post" action="'.$page.'">';
1145 1145
 			$out .= '<input type="hidden" name="action" value="set_thirdpartytype">';
1146
-			$out .= '<input type="hidden" name="token" value="' . newToken() . '">';
1146
+			$out .= '<input type="hidden" name="token" value="'.newToken().'">';
1147 1147
 			$sortparam = getDolGlobalString('SOCIETE_SORT_ON_TYPEENT', 'ASC'); // NONE means we keep sort of original array, so we sort on position. ASC, means next function will sort on label.
1148 1148
 			$out .= $this->selectarray($htmlname, $this->typent_array(0, $filter), $selected, 1, 0, 0, '', 0, 0, 0, $sortparam, '', 1);
1149
-			$out .= '<input type="submit" class="button smallpaddingimp valignmiddle" value="' . $langs->trans("Modify") . '">';
1149
+			$out .= '<input type="submit" class="button smallpaddingimp valignmiddle" value="'.$langs->trans("Modify").'">';
1150 1150
 			$out .= '</form>';
1151 1151
 		} else {
1152 1152
 			if ($selected > 0) {
@@ -1185,7 +1185,7 @@  discard block
 block discarded – undo
1185 1185
 
1186 1186
 			//print $prospectstatic->LibProspCommStatut($statusprospect, 2, $prospectstatic->cacheprospectstatus[$statusprospect]['label'], $prospectstatic->cacheprospectstatus[$statusprospect]['picto']);
1187 1187
 			print img_action('', $actioncode, $actionpicto, 'class="inline-block valignmiddle paddingright pictoprospectstatus"');
1188
-			print '<select class="flat selectprospectstatus maxwidth150" id="'. $htmlname.$idprospect .'" data-socid="'.$idprospect.'" name="' . $htmlname .'"';
1188
+			print '<select class="flat selectprospectstatus maxwidth150" id="'.$htmlname.$idprospect.'" data-socid="'.$idprospect.'" name="'.$htmlname.'"';
1189 1189
 			if (!$user->hasRight('societe', 'creer')) {
1190 1190
 				print ' disabled';
1191 1191
 			}
@@ -1215,8 +1215,8 @@  discard block
 block discarded – undo
1215 1215
 						var image = $(this).prev(".pictoprospectstatus");
1216 1216
 						$.ajax({
1217 1217
 							type: "POST",
1218
-							url: \'' . DOL_URL_ROOT . '/core/ajax/ajaxstatusprospect.php\',
1219
-							data: { id: statusid, prospectid: prospectid, token: \''. newToken() .'\', action: \'updatestatusprospect\' },
1218
+							url: \'' . DOL_URL_ROOT.'/core/ajax/ajaxstatusprospect.php\',
1219
+							data: { id: statusid, prospectid: prospectid, token: \''. newToken().'\', action: \'updatestatusprospect\' },
1220 1220
 							success: function(response) {
1221 1221
 								console.log(response.img);
1222 1222
 								image.replaceWith(response.img);
Please login to merge, or discard this patch.
htdocs/core/modules/mailings/partnership.modules.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -259,7 +259,7 @@  discard block
 block discarded – undo
259 259
 			$num = $this->db->num_rows($resql);
260 260
 
261 261
 			if (!isModEnabled("partnership")) {
262
-				$num = 0;   // Force empty list if module is not enabled
262
+				$num = 0; // Force empty list if module is not enabled
263 263
 			}
264 264
 
265 265
 			if ($num) {
@@ -285,7 +285,7 @@  discard block
 block discarded – undo
285 285
 		include_once DOL_DOCUMENT_ROOT.'/partnership/class/partnership.class.php';
286 286
 		$tmppartnership = new Partnership($this->db);
287 287
 
288
-		$dummy = $tmppartnership->getLibStatut(0);	// We call this only to have $tmppartnership->labelStatus loaded
288
+		$dummy = $tmppartnership->getLibStatut(0); // We call this only to have $tmppartnership->labelStatus loaded
289 289
 
290 290
 		$s .= $form->selectarray('filter_status_partnership', $tmppartnership->labelStatus, GETPOST('filter_status_partnership'), $langs->trans("Status"));
291 291
 
Please login to merge, or discard this patch.
htdocs/core/menus/standard/eldy_menu.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -349,7 +349,7 @@  discard block
 block discarded – undo
349 349
 
350 350
 							// Add font-awesome for level 0 and 1 (if $val2['level'] == 1, we are on level2, if $val2['level'] == 2, we are on level 3...)
351 351
 							if ($val2['level'] == 0 && !empty($val2['prefix'])) {
352
-								print $val2['prefix'];	// the picto must have class="pictofixedwidth paddingright"
352
+								print $val2['prefix']; // the picto must have class="pictofixedwidth paddingright"
353 353
 							} else {
354 354
 								print '<i class="fa fa-does-not-exists fa-fw paddingright pictofixedwidth level'.($val2['level'] + 1).'"></i>';
355 355
 							}
@@ -371,18 +371,18 @@  discard block
 block discarded – undo
371 371
 								$fromcursor = 0;
372 372
 								while ($fromcursor < ($currentlevel - $nextlevel)) {
373 373
 									print str_repeat(' ', $currentlevel - $fromcursor).'</ul>'."\n";
374
-									print str_repeat(' ', $currentlevel - $fromcursor - 1).'</li>'."\n";	// end level $val2['level']+1
374
+									print str_repeat(' ', $currentlevel - $fromcursor - 1).'</li>'."\n"; // end level $val2['level']+1
375 375
 									$fromcursor++;
376 376
 								}
377 377
 							} else {
378
-								print '</li>'."\n";	// end level $val2['level']+1
378
+								print '</li>'."\n"; // end level $val2['level']+1
379 379
 							}
380 380
 						}
381 381
 						//var_dump($submenu);
382 382
 					}
383 383
 
384
-					print str_repeat(' ', $level).'</ul>'."\n";			// end ul level 1
385
-					print str_repeat(' ', $level - 1).'</li>'."\n";			// end ul level 1
384
+					print str_repeat(' ', $level).'</ul>'."\n"; // end ul level 1
385
+					print str_repeat(' ', $level - 1).'</li>'."\n"; // end ul level 1
386 386
 				} elseif ($val['enabled'] == 2) {
387 387
 					print '<li class="lilevel0">';
388 388
 
@@ -397,10 +397,10 @@  discard block
 block discarded – undo
397 397
 					print $val['titre'];
398 398
 					print '</span>';
399 399
 
400
-					print '</li>'."\n";		// close entry level 0
400
+					print '</li>'."\n"; // close entry level 0
401 401
 				}
402 402
 			}
403
-			print '</ul>'."\n";		// close entry level 0
403
+			print '</ul>'."\n"; // close entry level 0
404 404
 		}
405 405
 
406 406
 		unset($this->menu);
Please login to merge, or discard this patch.
htdocs/core/menus/standard/auguria_menu.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -196,7 +196,7 @@  discard block
 block discarded – undo
196 196
 			// $this->menu->liste is top menu
197 197
 			//var_dump($this->menu->liste);exit;
198 198
 			$lastlevel = array();
199
-			$showmenu = true;  // Is current menu shown - define here to keep static code checker happy
199
+			$showmenu = true; // Is current menu shown - define here to keep static code checker happy
200 200
 			print '<!-- Generate menu list from menu handler '.$this->name.' -->'."\n";
201 201
 			print '<ul class="ulmenu ullevel0" data-inset="true">'."\n";
202 202
 			foreach ($this->menu->liste as $key => $val) {		// $val['url','titre','level','enabled'=0|1|2,'target','mainmenu','leftmenu'
@@ -357,7 +357,7 @@  discard block
 block discarded – undo
357 357
 
358 358
 							// Add font-awesome for level 0 and 1 (if $val2['level'] == 1, we are on level2, if $val2['level'] == 2, we are on level 3...)
359 359
 							if ($val2['level'] == 0 && !empty($val2['prefix'])) {
360
-								print $val2['prefix'];	// the picto must have class="pictofixedwidth paddingright"
360
+								print $val2['prefix']; // the picto must have class="pictofixedwidth paddingright"
361 361
 							} else {
362 362
 								print '<i class="fa fa-does-not-exists fa-fw paddingright pictofixedwidth level'.($val2['level'] + 1).'"></i>';
363 363
 							}
@@ -380,17 +380,17 @@  discard block
 block discarded – undo
380 380
 								$fromcursor = 0;
381 381
 								while ($fromcursor < ($currentlevel - $nextlevel)) {
382 382
 									print str_repeat(' ', $currentlevel - $fromcursor).'</ul>'."\n";
383
-									print str_repeat(' ', $currentlevel - $fromcursor - 1).'</li>'."\n";	// end level $val2['level']+1
383
+									print str_repeat(' ', $currentlevel - $fromcursor - 1).'</li>'."\n"; // end level $val2['level']+1
384 384
 									$fromcursor++;
385 385
 								}
386 386
 							} else {
387
-								print '</li>'."\n";	// end level $val2['level']+1
387
+								print '</li>'."\n"; // end level $val2['level']+1
388 388
 							}
389 389
 						}
390 390
 					}
391 391
 
392
-					print str_repeat(' ', $level).'</ul>'."\n";			// end ul level 1
393
-					print str_repeat(' ', $level - 1).'</li>'."\n";			// end ul level 1
392
+					print str_repeat(' ', $level).'</ul>'."\n"; // end ul level 1
393
+					print str_repeat(' ', $level - 1).'</li>'."\n"; // end ul level 1
394 394
 				} elseif ($val['enabled'] == 2) {
395 395
 					print '<li class="lilevel0">';
396 396
 
@@ -405,10 +405,10 @@  discard block
 block discarded – undo
405 405
 					print $val['titre'];
406 406
 					print '</span>';
407 407
 
408
-					print '</li>'."\n";		// close entry level 0
408
+					print '</li>'."\n"; // close entry level 0
409 409
 				}
410 410
 			}
411
-			print '</ul>'."\n";		// close entry level 0
411
+			print '</ul>'."\n"; // close entry level 0
412 412
 		}
413 413
 
414 414
 		unset($this->menu);
Please login to merge, or discard this patch.