Completed
Branch develop (56571b)
by
unknown
24:30
created
htdocs/salaries/card.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -307,9 +307,9 @@  discard block
 block discarded – undo
307 307
 			// Create a line of payments
308 308
 			$paiement = new PaymentSalary($db);
309 309
 			$paiement->fk_salary    = $object->id;
310
-			$paiement->chid         = $object->id;	// deprecated
310
+			$paiement->chid         = $object->id; // deprecated
311 311
 			$paiement->datep        = $datep;
312
-			$paiement->datev		= $datev;
312
+			$paiement->datev = $datev;
313 313
 			$paiement->amounts      = array($object->id => $amount); // Tableau de montant
314 314
 			$paiement->fk_typepayment = $type_payment;
315 315
 			$paiement->num_payment  = GETPOST("num_payment", 'alphanohtml');
@@ -338,10 +338,10 @@  discard block
 block discarded – undo
338 338
 
339 339
 			if (GETPOST('saveandnew', 'alpha')) {
340 340
 				setEventMessages($langs->trans("RecordSaved"), null, 'mesgs');
341
-				header("Location: card.php?action=create&fk_project=" . urlencode((string) ($projectid)) . "&accountid=" . urlencode((string) ($accountid)) . '&paymenttype=' . urlencode((string) (GETPOSTINT('paymenttype'))) . '&datepday=' . GETPOSTINT("datepday") . '&datepmonth=' . GETPOSTINT("datepmonth") . '&datepyear=' . GETPOSTINT("datepyear"));
341
+				header("Location: card.php?action=create&fk_project=".urlencode((string) ($projectid))."&accountid=".urlencode((string) ($accountid)).'&paymenttype='.urlencode((string) (GETPOSTINT('paymenttype'))).'&datepday='.GETPOSTINT("datepday").'&datepmonth='.GETPOSTINT("datepmonth").'&datepyear='.GETPOSTINT("datepyear"));
342 342
 				exit;
343 343
 			} else {
344
-				header("Location: " . $_SERVER['PHP_SELF'] . '?id=' . $object->id);
344
+				header("Location: ".$_SERVER['PHP_SELF'].'?id='.$object->id);
345 345
 				exit;
346 346
 			}
347 347
 		} else {
@@ -631,7 +631,7 @@  discard block
 block discarded – undo
631 631
 
632 632
 	// Auto create payment
633 633
 	print '<tr><td><label for="auto_create_paiement">'.$langs->trans('AutomaticCreationPayment').'</label></td>';
634
-	print '<td><input id="auto_create_paiement" name="auto_create_paiement" type="checkbox" ' . (empty($auto_create_paiement) ? '' : 'checked="checked"') . ' value="1"></td></tr>'."\n";	// Date payment
634
+	print '<td><input id="auto_create_paiement" name="auto_create_paiement" type="checkbox" '.(empty($auto_create_paiement) ? '' : 'checked="checked"').' value="1"></td></tr>'."\n"; // Date payment
635 635
 
636 636
 	// Bank
637 637
 	if (isModEnabled("bank")) {
@@ -847,10 +847,10 @@  discard block
 block discarded – undo
847 847
 			$userstatic = new User($db);
848 848
 			$result = $userstatic->fetch($object->fk_user);
849 849
 			if ($result > 0) {
850
-				$morehtmlref .= '<br>' .$langs->trans('Employee').' : '.$userstatic->getNomUrl(-1);
850
+				$morehtmlref .= '<br>'.$langs->trans('Employee').' : '.$userstatic->getNomUrl(-1);
851 851
 			}
852 852
 		} else {
853
-			$morehtmlref .= '<br>' . $form->editfieldkey("Employee", 'fk_user', $object->label, $object, $permissiontoadd, 'string', '', 0, 1);
853
+			$morehtmlref .= '<br>'.$form->editfieldkey("Employee", 'fk_user', $object->label, $object, $permissiontoadd, 'string', '', 0, 1);
854 854
 
855 855
 			if (!empty($object->fk_user)) {
856 856
 				$userstatic = new User($db);
@@ -917,7 +917,7 @@  discard block
 block discarded – undo
917 917
 		print "</td></tr>";
918 918
 	} else {
919 919
 		print "<tr>";
920
-		print '<td class="titlefieldmiddle">' . $langs->trans("DateStartPeriod") . '</td><td>';
920
+		print '<td class="titlefieldmiddle">'.$langs->trans("DateStartPeriod").'</td><td>';
921 921
 		print dol_print_date($object->datesp, 'day');
922 922
 		print '</td></tr>';
923 923
 	}
@@ -928,7 +928,7 @@  discard block
 block discarded – undo
928 928
 		print "</td></tr>";
929 929
 	} else {
930 930
 		print "<tr>";
931
-		print '<td>' . $langs->trans("DateEndPeriod") . '</td><td>';
931
+		print '<td>'.$langs->trans("DateEndPeriod").'</td><td>';
932 932
 		print dol_print_date($object->dateep, 'day');
933 933
 		print '</td></tr>';
934 934
 	}
@@ -943,9 +943,9 @@  discard block
 block discarded – undo
943 943
 	print '</td></tr>';*/
944 944
 
945 945
 	if ($action == 'edit') {
946
-		print '<tr><td class="fieldrequired">' . $langs->trans("Amount") . '</td><td><input name="amount" size="10" value="' . price($object->amount) . '"></td></tr>';
946
+		print '<tr><td class="fieldrequired">'.$langs->trans("Amount").'</td><td><input name="amount" size="10" value="'.price($object->amount).'"></td></tr>';
947 947
 	} else {
948
-		print '<tr><td>' . $langs->trans("Amount") . '</td><td><span class="amount">' . price($object->amount, 0, $langs, 1, -1, -1, $conf->currency) . '</span></td></tr>';
948
+		print '<tr><td>'.$langs->trans("Amount").'</td><td><span class="amount">'.price($object->amount, 0, $langs, 1, -1, -1, $conf->currency).'</span></td></tr>';
949 949
 	}
950 950
 
951 951
 	// Default mode of payment
@@ -1131,7 +1131,7 @@  discard block
 block discarded – undo
1131 1131
 			if (empty($user->socid)) {
1132 1132
 				$canSendMail = true;
1133 1133
 
1134
-				print dolGetButtonAction($langs->trans('SendMail'), '', 'default', $_SERVER['PHP_SELF'] . '?id=' . $object->id . '&action=presend&token='.newToken().'&mode=init#formmailbeforetitle', '', $canSendMail);
1134
+				print dolGetButtonAction($langs->trans('SendMail'), '', 'default', $_SERVER['PHP_SELF'].'?id='.$object->id.'&action=presend&token='.newToken().'&mode=init#formmailbeforetitle', '', $canSendMail);
1135 1135
 			}
1136 1136
 		}
1137 1137
 
@@ -1147,7 +1147,7 @@  discard block
 block discarded – undo
1147 1147
 
1148 1148
 		// Emit payment
1149 1149
 		if ($object->status == $object::STATUS_UNPAID && ((price2num($object->amount) < 0 && $resteapayer < 0) || (price2num($object->amount) > 0 && $resteapayer > 0)) && $permissiontoadd) {
1150
-			print dolGetButtonAction('', $langs->trans('DoPayment'), 'default', DOL_URL_ROOT.'/salaries/paiement_salary.php?action=create&token='.newToken().'&id='. $object->id, '');
1150
+			print dolGetButtonAction('', $langs->trans('DoPayment'), 'default', DOL_URL_ROOT.'/salaries/paiement_salary.php?action=create&token='.newToken().'&id='.$object->id, '');
1151 1151
 		}
1152 1152
 
1153 1153
 		// Classify 'paid'
@@ -1158,7 +1158,7 @@  discard block
 block discarded – undo
1158 1158
 
1159 1159
 		// Transfer request
1160 1160
 		if ($object->status == $object::STATUS_UNPAID && ((price2num($object->amount) < 0 && $resteapayer < 0) || (price2num($object->amount) > 0 && $resteapayer > 0)) && $permissiontoadd) {
1161
-			print dolGetButtonAction('', $langs->trans('MakeTransferRequest'), 'default', DOL_URL_ROOT . '/salaries/virement_request.php?id=' . $object->id, '');
1161
+			print dolGetButtonAction('', $langs->trans('MakeTransferRequest'), 'default', DOL_URL_ROOT.'/salaries/virement_request.php?id='.$object->id, '');
1162 1162
 		}
1163 1163
 
1164 1164
 		// Clone
Please login to merge, or discard this patch.
htdocs/salaries/virement_request.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -281,7 +281,7 @@  discard block
 block discarded – undo
281 281
 	print "</td></tr>";
282 282
 } else {
283 283
 	print "<tr>";
284
-	print '<td class="titlefieldmiddle">' . $langs->trans("DateStartPeriod") . '</td><td>';
284
+	print '<td class="titlefieldmiddle">'.$langs->trans("DateStartPeriod").'</td><td>';
285 285
 	print dol_print_date($object->datesp, 'day');
286 286
 	print '</td></tr>';
287 287
 }
@@ -292,14 +292,14 @@  discard block
 block discarded – undo
292 292
 	print "</td></tr>";
293 293
 } else {
294 294
 	print "<tr>";
295
-	print '<td>' . $langs->trans("DateEndPeriod") . '</td><td>';
295
+	print '<td>'.$langs->trans("DateEndPeriod").'</td><td>';
296 296
 	print dol_print_date($object->dateep, 'day');
297 297
 	print '</td></tr>';
298 298
 }
299 299
 if ($action == 'edit') {
300
-	print '<tr><td class="fieldrequired">' . $langs->trans("Amount") . '</td><td><input name="amount" size="10" value="' . price($object->amount) . '"></td></tr>';
300
+	print '<tr><td class="fieldrequired">'.$langs->trans("Amount").'</td><td><input name="amount" size="10" value="'.price($object->amount).'"></td></tr>';
301 301
 } else {
302
-	print '<tr><td>' . $langs->trans("Amount") . '</td><td><span class="amount">' . price($object->amount, 0, $langs, 1, -1, -1, $conf->currency) . '</span></td></tr>';
302
+	print '<tr><td>'.$langs->trans("Amount").'</td><td><span class="amount">'.price($object->amount, 0, $langs, 1, -1, -1, $conf->currency).'</span></td></tr>';
303 303
 }
304 304
 
305 305
 // Default mode of payment
Please login to merge, or discard this patch.
htdocs/website/index.php 1 patch
Spacing   +42 added lines, -42 removed lines patch added patch discarded remove patch
@@ -350,7 +350,7 @@  discard block
 block discarded – undo
350 350
 	}
351 351
 }
352 352
 
353
-$searchkey = GETPOST('searchstring', 'restricthtmlallowunvalid');	// or 'none', must be same then $searchstring
353
+$searchkey = GETPOST('searchstring', 'restricthtmlallowunvalid'); // or 'none', must be same then $searchstring
354 354
 
355 355
 if ($action == 'replacesite' || $mode == 'replacesite') {	// Test on permission not required
356 356
 	$containertype = GETPOST('optioncontainertype', 'aZ09') != '-1' ? GETPOST('optioncontainertype', 'aZ09') : '';
@@ -364,7 +364,7 @@  discard block
 block discarded – undo
364 364
 }
365 365
 
366 366
 $usercanedit = $user->hasRight('website', 'write');
367
-$permissiontoadd = $user->hasRight('website', 'write');	// Used by the include of actions_addupdatedelete.inc.php and actions_linkedfiles
367
+$permissiontoadd = $user->hasRight('website', 'write'); // Used by the include of actions_addupdatedelete.inc.php and actions_linkedfiles
368 368
 $permissiontodelete = $user->hasRight('website', 'delete');
369 369
 
370 370
 
@@ -431,7 +431,7 @@  discard block
 block discarded – undo
431 431
 if ($sortorder) {
432 432
 	$backtopage .= '&sortorder='.urlencode($sortorder);
433 433
 }
434
-include DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php';	// This manage 'sendit', 'confirm_deletefile', 'renamefile' action when submitting new file.
434
+include DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php'; // This manage 'sendit', 'confirm_deletefile', 'renamefile' action when submitting new file.
435 435
 
436 436
 $backtopage = $savbacktopage;
437 437
 //var_dump($backtopage);
@@ -596,7 +596,7 @@  discard block
 block discarded – undo
596 596
 
597 597
 // Replacement of string into pages
598 598
 if ($massaction == 'replace' && GETPOST('confirmmassaction', 'alpha') && $usercanedit) {
599
-	$replacestring = GETPOST('replacestring', 'restricthtmlallowunvalid');	// or 'none', must be same then $searchstring
599
+	$replacestring = GETPOST('replacestring', 'restricthtmlallowunvalid'); // or 'none', must be same then $searchstring
600 600
 
601 601
 	$dolibarrdataroot = preg_replace('/([\\/]+)$/i', '', DOL_DATA_ROOT);
602 602
 	$allowimportsite = true;
@@ -1166,7 +1166,7 @@  discard block
 block discarded – undo
1166 1166
 		$objectpage->image = GETPOST('WEBSITE_IMAGE', 'alpha');
1167 1167
 		$objectpage->keywords = str_replace(array('<', '>'), '', GETPOST('WEBSITE_KEYWORDS', 'alphanohtml'));
1168 1168
 		$objectpage->allowed_in_frames = GETPOST('WEBSITE_ALLOWED_IN_FRAMES', 'aZ09') ? 1 : 0;
1169
-		$objectpage->htmlheader = GETPOST('htmlheader', 'none');	// Must accept tags like '<script>' and '<link>'
1169
+		$objectpage->htmlheader = GETPOST('htmlheader', 'none'); // Must accept tags like '<script>' and '<link>'
1170 1170
 		$objectpage->author_alias = GETPOST('WEBSITE_AUTHORALIAS', 'alphanohtml');
1171 1171
 		$objectpage->object_type = GETPOST('WEBSITE_OBJECTCLASS');
1172 1172
 		$objectpage->fk_object = GETPOST('WEBSITE_OBJECTID');
@@ -1199,7 +1199,7 @@  discard block
 block discarded – undo
1199 1199
 		$content = '';
1200 1200
 		if (GETPOSTISSET('content')) {
1201 1201
 			//$content = GETPOST('content', 'restricthtmlallowunvalid');	// @TODO Use a restricthtmlallowunvalidwithphp
1202
-			$content = GETPOST('content', 'none');	// @TODO Use a restricthtmlallowunvalidwithphp
1202
+			$content = GETPOST('content', 'none'); // @TODO Use a restricthtmlallowunvalidwithphp
1203 1203
 
1204 1204
 			$objectpage->content = make_substitutions($content, $substitutionarray);
1205 1205
 		} else {
@@ -1572,7 +1572,7 @@  discard block
 block discarded – undo
1572 1572
 					$error++;
1573 1573
 					setEventMessages($langs->trans('ErrorFaviconMustBeASquaredImage'), array(), 'errors');
1574 1574
 				}
1575
-				if (! $error && ($filesize[0] != 16 && $filesize[0] != 32 && $filesize[0] != 64)) {
1575
+				if (!$error && ($filesize[0] != 16 && $filesize[0] != 32 && $filesize[0] != 64)) {
1576 1576
 					$error++;
1577 1577
 					setEventMessages($langs->trans('ErrorFaviconSize'), array(), 'errors');
1578 1578
 				}
@@ -1584,7 +1584,7 @@  discard block
 block discarded – undo
1584 1584
 				if (!GETPOSTISSET('updateandstay')) {	// If we click on "Save And Stay", we don not make the redirect
1585 1585
 					$action = 'preview';
1586 1586
 					if ($backtopage) {
1587
-						$backtopage = preg_replace('/searchstring=[^&]*/', '', $backtopage);	// Clean backtopage url
1587
+						$backtopage = preg_replace('/searchstring=[^&]*/', '', $backtopage); // Clean backtopage url
1588 1588
 						header("Location: ".$backtopage);
1589 1589
 						exit;
1590 1590
 					}
@@ -1608,7 +1608,7 @@  discard block
 block discarded – undo
1608 1608
 			}
1609 1609
 
1610 1610
 
1611
-			$dataposted = trim(GETPOST('WEBSITE_HTML_HEADER', 'restricthtmlallowlinkscript'));		// Must accept tags like '<script>' and '<link>'
1611
+			$dataposted = trim(GETPOST('WEBSITE_HTML_HEADER', 'restricthtmlallowlinkscript')); // Must accept tags like '<script>' and '<link>'
1612 1612
 			$dataposted = preg_replace(array('/<html>\n*/ims', '/<\/html>\n*/ims'), array('', ''), $dataposted);
1613 1613
 			$dataposted = str_replace('<?=', '<?php', $dataposted);
1614 1614
 
@@ -1617,7 +1617,7 @@  discard block
 block discarded – undo
1617 1617
 			$phpfullcodestring = dolKeepOnlyPhpCode($dataposted);
1618 1618
 
1619 1619
 			// Security analysis
1620
-			$errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring);	// Contains the setEventMessages
1620
+			$errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages
1621 1621
 
1622 1622
 			if (!$errorphpcheck) {
1623 1623
 				$htmlheadercontent = '';
@@ -1655,7 +1655,7 @@  discard block
 block discarded – undo
1655 1655
 			$phpfullcodestring = dolKeepOnlyPhpCode($dataposted);
1656 1656
 
1657 1657
 			// Security analysis
1658
-			$errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring);	// Contains the setEventMessages
1658
+			$errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages
1659 1659
 
1660 1660
 			if (!$errorphpcheck) {
1661 1661
 				$csscontent = '';
@@ -1698,7 +1698,7 @@  discard block
 block discarded – undo
1698 1698
 			$phpfullcodestring = dolKeepOnlyPhpCode($dataposted);
1699 1699
 
1700 1700
 			// Security analysis
1701
-			$errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring);	// Contains the setEventMessages
1701
+			$errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages
1702 1702
 
1703 1703
 			if (!$errorphpcheck) {
1704 1704
 				$jscontent = '';
@@ -1736,7 +1736,7 @@  discard block
 block discarded – undo
1736 1736
 			$phpfullcodestring = dolKeepOnlyPhpCode($dataposted);
1737 1737
 
1738 1738
 			// Security analysis
1739
-			$errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring);	// Contains the setEventMessages
1739
+			$errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages
1740 1740
 
1741 1741
 			if (!$errorphpcheck) {
1742 1742
 				$robotcontent = '';
@@ -1774,7 +1774,7 @@  discard block
 block discarded – undo
1774 1774
 			$phpfullcodestring = dolKeepOnlyPhpCode($dataposted);
1775 1775
 
1776 1776
 			// Security analysis
1777
-			$errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring);	// Contains the setEventMessages
1777
+			$errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages
1778 1778
 
1779 1779
 			if (!$errorphpcheck) {
1780 1780
 				if ($dataposted) {
@@ -1802,7 +1802,7 @@  discard block
 block discarded – undo
1802 1802
 			$phpfullcodestring = dolKeepOnlyPhpCode($dataposted);
1803 1803
 
1804 1804
 			// Security analysis
1805
-			$errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring);	// Contains the setEventMessages
1805
+			$errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages
1806 1806
 
1807 1807
 			if (!$errorphpcheck) {
1808 1808
 				$manifestjsoncontent = '';
@@ -1841,7 +1841,7 @@  discard block
 block discarded – undo
1841 1841
 			$phpfullcodestring = dolKeepOnlyPhpCode($dataposted);
1842 1842
 
1843 1843
 			// Security analysis
1844
-			$errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring);	// Contains the setEventMessages
1844
+			$errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages
1845 1845
 
1846 1846
 			if (!$errorphpcheck) {
1847 1847
 				$readmecontent = '';
@@ -1880,7 +1880,7 @@  discard block
 block discarded – undo
1880 1880
 			$phpfullcodestring = dolKeepOnlyPhpCode($dataposted);
1881 1881
 
1882 1882
 			// Security analysis
1883
-			$errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring);	// Contains the setEventMessages
1883
+			$errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages
1884 1884
 
1885 1885
 			if (!$errorphpcheck) {
1886 1886
 				$licensecontent = '';
@@ -1922,7 +1922,7 @@  discard block
 block discarded – undo
1922 1922
 			if (!GETPOSTISSET('updateandstay')) {	// If we click on "Save And Stay", we don not make the redirect
1923 1923
 				$action = 'preview';
1924 1924
 				if ($backtopage) {
1925
-					$backtopage = preg_replace('/searchstring=[^&]*/', '', $backtopage);	// Clean backtopage url
1925
+					$backtopage = preg_replace('/searchstring=[^&]*/', '', $backtopage); // Clean backtopage url
1926 1926
 					header("Location: ".$backtopage);
1927 1927
 					exit;
1928 1928
 				}
@@ -1941,7 +1941,7 @@  discard block
 block discarded – undo
1941 1941
 
1942 1942
 	$object->fk_default_home = $pageid;
1943 1943
 	$res = $object->update($user);
1944
-	if (! ($res > 0)) {
1944
+	if (!($res > 0)) {
1945 1945
 		$error++;
1946 1946
 		setEventMessages($object->error, $object->errors, 'errors');
1947 1947
 	}
@@ -2056,7 +2056,7 @@  discard block
 block discarded – undo
2056 2056
 		$objectpage->image = GETPOST('WEBSITE_IMAGE', 'alpha');
2057 2057
 		$objectpage->keywords = str_replace(array('<', '>'), '', GETPOST('WEBSITE_KEYWORDS', 'alphanohtml'));
2058 2058
 		$objectpage->allowed_in_frames = GETPOST('WEBSITE_ALLOWED_IN_FRAMES', 'aZ09') ? 1 : 0;
2059
-		$objectpage->htmlheader = trim(GETPOST('htmlheader', 'restricthtmlallowlinkscript'));		// Must accept tags like '<script>' and '<link>'
2059
+		$objectpage->htmlheader = trim(GETPOST('htmlheader', 'restricthtmlallowlinkscript')); // Must accept tags like '<script>' and '<link>'
2060 2060
 		$objectpage->fk_page = (GETPOSTINT('pageidfortranslation') > 0 ? GETPOSTINT('pageidfortranslation') : 0);
2061 2061
 		$objectpage->author_alias = trim(GETPOST('WEBSITE_AUTHORALIAS', 'alphanohtml'));
2062 2062
 		$objectpage->object_type = GETPOST('WEBSITE_OBJECTCLASS', 'alpha');
@@ -2332,7 +2332,7 @@  discard block
 block discarded – undo
2332 2332
 
2333 2333
 			$phpfullcodestringold = dolKeepOnlyPhpCode($objectpage->content);
2334 2334
 
2335
-			$objectpage->content = GETPOST('PAGE_CONTENT', 'none');	// any HTML content allowed
2335
+			$objectpage->content = GETPOST('PAGE_CONTENT', 'none'); // any HTML content allowed
2336 2336
 
2337 2337
 			$phpfullcodestring = dolKeepOnlyPhpCode($objectpage->content);
2338 2338
 
@@ -2553,7 +2553,7 @@  discard block
 block discarded – undo
2553 2553
 				$fileofzip = '';
2554 2554
 				if (GETPOSTISSET('templateuserfile')) {
2555 2555
 					// Case we selected one template
2556
-					$fileofzip = DOL_DATA_ROOT.'/doctemplates/websites/'.GETPOST('templateuserfile', 'alpha');	// $fileofzip will be sanitized later into the importWebSite()
2556
+					$fileofzip = DOL_DATA_ROOT.'/doctemplates/websites/'.GETPOST('templateuserfile', 'alpha'); // $fileofzip will be sanitized later into the importWebSite()
2557 2557
 				} elseif (!empty($_FILES) && is_array($_FILES['userfile'])) {
2558 2558
 					// Case we upload a new template
2559 2559
 					if (is_array($_FILES['userfile']['tmp_name'])) {
@@ -2635,7 +2635,7 @@  discard block
 block discarded – undo
2635 2635
 	if ($website->virtualhost) {
2636 2636
 		$domainname = $website->virtualhost;
2637 2637
 	}
2638
-	if (! preg_match('/^http/i', $domainname)) {
2638
+	if (!preg_match('/^http/i', $domainname)) {
2639 2639
 		$domainname = 'https://'.$domainname;
2640 2640
 	}
2641 2641
 
@@ -2701,7 +2701,7 @@  discard block
 block discarded – undo
2701 2701
 				$url->appendChild($lastmod);
2702 2702
 				// Add suggested frequency for refresh
2703 2703
 				if (getDolGlobalString('WEBSITE_SITEMAPS_ADD_WEEKLY_FREQ')) {
2704
-					$changefreq = $domtree->createElement('changefreq', 'weekly');	// TODO Manage other values
2704
+					$changefreq = $domtree->createElement('changefreq', 'weekly'); // TODO Manage other values
2705 2705
 					$url->appendChild($changefreq);
2706 2706
 				}
2707 2707
 				// Add higher priority for home page
@@ -2806,7 +2806,7 @@  discard block
 block discarded – undo
2806 2806
 				$url->appendChild($lastmod);
2807 2807
 				// Add suggested frequency for refresh
2808 2808
 				if (getDolGlobalString('WEBSITE_SITEMAPS_ADD_WEEKLY_FREQ')) {
2809
-					$changefreq = $domtree->createElement('changefreq', 'weekly');	// TODO Manage other values
2809
+					$changefreq = $domtree->createElement('changefreq', 'weekly'); // TODO Manage other values
2810 2810
 					$url->appendChild($changefreq);
2811 2811
 				}
2812 2812
 
@@ -3097,11 +3097,11 @@  discard block
 block discarded – undo
3097 3097
 
3098 3098
 			// // Export web site
3099 3099
 			$extraCssClass = getDolGlobalString('WEBSITE_ALLOW_OVERWRITE_GIT_SOURCE') ? 'hideobject' : '';
3100
-			print '<input type="submit" class="button bordertransp ' . $extraCssClass . '" ' . $disabledexport . ' value="' . dol_escape_htmltag($exportlabel) . '" name="exportsite">';
3100
+			print '<input type="submit" class="button bordertransp '.$extraCssClass.'" '.$disabledexport.' value="'.dol_escape_htmltag($exportlabel).'" name="exportsite">';
3101 3101
 
3102 3102
 			if (getDolGlobalString('WEBSITE_ALLOW_OVERWRITE_GIT_SOURCE')) {
3103 3103
 				// Overwrite template in sources
3104
-				$overwriteGitUrl = $_SERVER["PHP_SELF"] . '?action=overwritesite&website=' . urlencode($website->ref);
3104
+				$overwriteGitUrl = $_SERVER["PHP_SELF"].'?action=overwritesite&website='.urlencode($website->ref);
3105 3105
 				print dolButtonToOpenExportDialog('exportpopup', $langs->trans('ExportOptions'), $langs->trans('ExportSite'), 'exportsite', $overwriteGitUrl, $website);
3106 3106
 				//print '<a href="'.$_SERVER["PHP_SELF"].'?action=overwritesite&website='.urlencode($website->ref).'" class="button bordertransp hideobject" title="'.dol_escape_htmltag($langs->trans("ExportIntoGIT").". Directory ".getDolGlobalString('WEBSITE_ALLOW_OVERWRITE_GIT_SOURCE')).'">'.dol_escape_htmltag($langs->trans("ExportIntoGIT")).'</a>';
3107 3107
 			}
@@ -3468,7 +3468,7 @@  discard block
 block discarded – undo
3468 3468
 				print '<!-- button EditInLine and ShowSubcontainers -->'."\n";
3469 3469
 				print '<div class="websiteselectionsection inline-block">';
3470 3470
 
3471
-				print '<div class="inline-block marginrightonly">';	// Button includes dynamic content
3471
+				print '<div class="inline-block marginrightonly">'; // Button includes dynamic content
3472 3472
 				print $langs->trans("ShowSubcontainers");
3473 3473
 				if (!getDolGlobalString('WEBSITE_SUBCONTAINERSINLINE')) {
3474 3474
 					print '<a class="nobordertransp nohoverborder marginleftonlyshort valignmiddle"'.$disabled.' href="'.$_SERVER["PHP_SELF"].'?website='.$object->ref.'&pageid='.$websitepage->id.'&action=setshowsubcontainers&token='.newToken().'">'.img_picto($langs->trans("ShowSubContainersOnOff", $langs->transnoentitiesnoconv("Off")), 'switch_off', '', 0, 0, 0, '', 'nomarginleft').'</a>';
@@ -3477,7 +3477,7 @@  discard block
 block discarded – undo
3477 3477
 				}
3478 3478
 				print '</div>';
3479 3479
 
3480
-				print '<div class="inline-block marginrightonly">';	// Button edit inline
3480
+				print '<div class="inline-block marginrightonly">'; // Button edit inline
3481 3481
 
3482 3482
 				print '<span id="switchckeditorinline">'."\n";
3483 3483
 				// Enable CKEditor inline with js on section and div with conteneditable=true
@@ -3577,15 +3577,15 @@  discard block
 block discarded – undo
3577 3577
 													// Sending data via AJAX to update section
3578 3578
 													$.ajax({
3579 3579
 														type: \'POST\',
3580
-														url: \'' . DOL_URL_ROOT . '/core/ajax/editinline.php\',
3580
+														url: \'' . DOL_URL_ROOT.'/core/ajax/editinline.php\',
3581 3581
 														data: {
3582 3582
 															website_ref: \''.dol_escape_js($website->ref).'\',
3583
-															page_id: \'' . ((int) $websitepage->id) . '\',
3583
+															page_id: \'' . ((int) $websitepage->id).'\',
3584 3584
 															content: content,
3585 3585
 															element_id: elementId,
3586 3586
 															element_type: elementType,
3587 3587
 															action: \'updatedElementContent\',
3588
-															token: \'' . newToken() . '\'
3588
+															token: \'' . newToken().'\'
3589 3589
 														},
3590 3590
 														success: function(response) {
3591 3591
 															console.log(response);
@@ -3676,7 +3676,7 @@  discard block
 block discarded – undo
3676 3676
 				} else {
3677 3677
 					$disabled = '';
3678 3678
 					$title = '';
3679
-					$url = $_SERVER["PHP_SELF"].'?action=delete&token='.newToken().'&pageid='.((int) $websitepage->id).'&website='.urlencode($website->ref);	// action=delete for webpage, deletesite for website
3679
+					$url = $_SERVER["PHP_SELF"].'?action=delete&token='.newToken().'&pageid='.((int) $websitepage->id).'&website='.urlencode($website->ref); // action=delete for webpage, deletesite for website
3680 3680
 				}
3681 3681
 				print '<a href="'.$url.'" class="button buttonDelete bordertransp'.($disabled ? ' disabled' : '').'"'.$disabled.' title="'.dol_escape_htmltag($title).'">'.img_picto('', 'delete', 'class=""').'<span class="hideonsmartphone paddingleft">'.$langs->trans("Delete").'</span></a>';
3682 3682
 				print '</span>';
@@ -3866,7 +3866,7 @@  discard block
 block discarded – undo
3866 3866
 		// Clean the php htmlheader file to remove php code and get only html part
3867 3867
 		$htmlheadercontent = preg_replace('/<\?php \/\/ BEGIN PHP[^\?]*END PHP( \?>)?\n*/ims', '', $htmlheadercontent);
3868 3868
 	} else {
3869
-		$htmlheadercontent = GETPOST('WEBSITE_HTML_HEADER', 'none');		// Must accept tags like '<script>' and '<link>'
3869
+		$htmlheadercontent = GETPOST('WEBSITE_HTML_HEADER', 'none'); // Must accept tags like '<script>' and '<link>'
3870 3870
 	}
3871 3871
 	if (!trim($htmlheadercontent)) {
3872 3872
 		$htmlheadercontent = "<html>\n";
@@ -3897,7 +3897,7 @@  discard block
 block discarded – undo
3897 3897
 		// Clean the php htaccesscontent file to remove php code and get only html part
3898 3898
 		$htaccesscontent = preg_replace('/<\?php \/\/ BEGIN PHP[^\?]*END PHP( \?>)?\n*/ims', '', $htaccesscontent);
3899 3899
 	} else {
3900
-		$htaccesscontent = GETPOST('WEBSITE_HTACCESS', 'nohtml');	// We must use 'nohtml' and not 'alphanohtml' because we must accept "
3900
+		$htaccesscontent = GETPOST('WEBSITE_HTACCESS', 'nohtml'); // We must use 'nohtml' and not 'alphanohtml' because we must accept "
3901 3901
 	}
3902 3902
 
3903 3903
 	if (!GETPOSTISSET('WEBSITE_MANIFEST_JSON')) {
@@ -3994,7 +3994,7 @@  discard block
 block discarded – undo
3994 3994
 	$maxfilesizearray = getMaxFileSizeArray();
3995 3995
 	$maxmin = $maxfilesizearray['maxmin'];
3996 3996
 	if ($maxmin > 0) {
3997
-		print '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">';	// MAX_FILE_SIZE must precede the field type=file
3997
+		print '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file
3998 3998
 	}
3999 3999
 	print '<input type="file" class="flat minwidth300" name="addedfile" id="addedfile"/>';
4000 4000
 
@@ -4036,7 +4036,7 @@  discard block
 block discarded – undo
4036 4036
 	print '<tr><td class="tdtop">';
4037 4037
 	print $langs->trans('WEBSITE_HTML_HEADER');
4038 4038
 	$htmlhelp = $langs->trans("Example").' :<br>';
4039
-	$htmlhelp .= dol_nl2br(dol_htmlentities($htmlheadercontentdefault));	// do not use dol_htmlentitiesbr here, $htmlheadercontentdefault is HTML with content like <link> and <script> that we want to be html encode as they must be show as doc content not executable instruction.
4039
+	$htmlhelp .= dol_nl2br(dol_htmlentities($htmlheadercontentdefault)); // do not use dol_htmlentitiesbr here, $htmlheadercontentdefault is HTML with content like <link> and <script> that we want to be html encode as they must be show as doc content not executable instruction.
4040 4040
 	$textwithhelp = $form->textwithpicto('', $htmlhelp, 1, 'help', '', 0, 2, 'htmlheadertooltip');
4041 4041
 	$htmlhelp2 = $langs->trans("LinkAndScriptsHereAreNotLoadedInEditor").'<br>';
4042 4042
 	print $form->textwithpicto($textwithhelp, $htmlhelp2, 1, 'warning', '', 0, 2, 'htmlheadertooltip2');
@@ -4258,7 +4258,7 @@  discard block
 block discarded – undo
4258 4258
 		$maxfilesizearray = getMaxFileSizeArray();
4259 4259
 		$maxmin = $maxfilesizearray['maxmin'];
4260 4260
 		if ($maxmin > 0) {
4261
-			print '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">';	// MAX_FILE_SIZE must precede the field type=file
4261
+			print '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file
4262 4262
 		}
4263 4263
 		print '<input class="flat minwidth400" type="file" name="userfile[]" accept=".zip">';
4264 4264
 		print '<input type="submit" class="button small" name="buttonsubmitimportfile" value="'.dol_escape_htmltag($langs->trans("Upload")).'">';
@@ -4779,7 +4779,7 @@  discard block
 block discarded – undo
4779 4779
 	print '<tr><td class="tdhtmlheader tdtop">';
4780 4780
 	$htmlhelp = $langs->trans("EditTheWebSiteForACommonHeader").'<br><br>';
4781 4781
 	$htmlhelp .= $langs->trans("Example").' :<br>';
4782
-	$htmlhelp .= dol_nl2br(dol_htmlentities($htmlheadercontentdefault));	// do not use dol_htmlentitiesbr here, $htmlheadercontentdefault is HTML with content like <link> and <script> that we want to be html encode as they must be show as doc content not executable instruction.
4782
+	$htmlhelp .= dol_nl2br(dol_htmlentities($htmlheadercontentdefault)); // do not use dol_htmlentitiesbr here, $htmlheadercontentdefault is HTML with content like <link> and <script> that we want to be html encode as they must be show as doc content not executable instruction.
4783 4783
 	print $form->textwithpicto($langs->transnoentitiesnoconv('HtmlHeaderPage'), $htmlhelp, 1, 'help', '', 0, 2, 'htmlheadertooltip');
4784 4784
 	print '</td><td>';
4785 4785
 	$poscursor = array('x' => GETPOST('htmlheader_x'), 'y' => GETPOST('htmlheader_y'));
@@ -4916,7 +4916,7 @@  discard block
 block discarded – undo
4916 4916
 	print '<div class="fiche"><br>';
4917 4917
 
4918 4918
 	$module = 'medias';
4919
-	$formalreadyopen = 2;	// So the form to submit a new file will not be open another time inside the core/tpl/filemanager.tpl.php
4919
+	$formalreadyopen = 2; // So the form to submit a new file will not be open another time inside the core/tpl/filemanager.tpl.php
4920 4920
 	if (empty($url)) {
4921 4921
 		$url = DOL_URL_ROOT.'/website/index.php'; // Must be an url without param
4922 4922
 	}
@@ -5153,8 +5153,8 @@  discard block
 block discarded – undo
5153 5153
 			print getTitleFieldOfList("Categories", 0, $_SERVER['PHP_SELF'], '', '', $param, '', $sortfield, $sortorder, 'center ')."\n";
5154 5154
 			print getTitleFieldOfList("", 0, $_SERVER['PHP_SELF']);
5155 5155
 			print getTitleFieldOfList("UserCreation", 0, $_SERVER['PHP_SELF'], 'fk_user_creat', '', $param, '', $sortfield, $sortorder, '')."\n";
5156
-			print getTitleFieldOfList("DateCreation", 0, $_SERVER['PHP_SELF'], 'date_creation', '', $param, '', $sortfield, $sortorder, 'center ')."\n";		// Date creation
5157
-			print getTitleFieldOfList("DateLastModification", 0, $_SERVER['PHP_SELF'], 'tms', '', $param, '', $sortfield, $sortorder, 'center ')."\n";		// Date last modif
5156
+			print getTitleFieldOfList("DateCreation", 0, $_SERVER['PHP_SELF'], 'date_creation', '', $param, '', $sortfield, $sortorder, 'center ')."\n"; // Date creation
5157
+			print getTitleFieldOfList("DateLastModification", 0, $_SERVER['PHP_SELF'], 'tms', '', $param, '', $sortfield, $sortorder, 'center ')."\n"; // Date last modif
5158 5158
 			print getTitleFieldOfList("", 0, $_SERVER['PHP_SELF']);
5159 5159
 			// Action column
5160 5160
 			if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
Please login to merge, or discard this patch.
htdocs/datapolicy/class/datapolicycron.class.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -489,7 +489,7 @@
 block discarded – undo
489 489
 						$object->fetch($obj->rowid);
490 490
 						$object->id = $obj->rowid;
491 491
 
492
-						$action = 'anonymize';	// TODO Offer also action "delete" in the setup of the module
492
+						$action = 'anonymize'; // TODO Offer also action "delete" in the setup of the module
493 493
 
494 494
 						// Manage action 'anonymize'
495 495
 						if ($action == 'anonymize') {
Please login to merge, or discard this patch.
htdocs/core/class/html.formprojet.class.php 1 patch
Spacing   +100 added lines, -100 removed lines patch added patch discarded remove patch
@@ -107,13 +107,13 @@  discard block
 block discarded – undo
107 107
 				$project->fetch($selected);
108 108
 				$selected_input_value = $project->ref;
109 109
 			}
110
-			$urloption = 'socid=' . ((int) $socid) . '&htmlname=' . urlencode($htmlname) . '&discardclosed=' . ((int) $discard_closed);
110
+			$urloption = 'socid='.((int) $socid).'&htmlname='.urlencode($htmlname).'&discardclosed='.((int) $discard_closed);
111 111
 			if ($morefilter == 'usage_organize_event=1') {
112 112
 				$urloption .= '&usage_organize_event=1';
113 113
 			}
114
-			$out .= '<input type="text" class="minwidth200' . ($morecss ? ' ' . $morecss : '') . '" name="search_' . $htmlname . '" id="search_' . $htmlname . '" value="' . $selected_input_value . '"' . $placeholder . ' />';
114
+			$out .= '<input type="text" class="minwidth200'.($morecss ? ' '.$morecss : '').'" name="search_'.$htmlname.'" id="search_'.$htmlname.'" value="'.$selected_input_value.'"'.$placeholder.' />';
115 115
 
116
-			$out .= ajax_autocompleter($selected, $htmlname, DOL_URL_ROOT . '/projet/ajax/projects.php', $urloption, $conf->global->PROJECT_USE_SEARCH_TO_SELECT, 0, array());
116
+			$out .= ajax_autocompleter($selected, $htmlname, DOL_URL_ROOT.'/projet/ajax/projects.php', $urloption, $conf->global->PROJECT_USE_SEARCH_TO_SELECT, 0, array());
117 117
 		} else {
118 118
 			$out .= $this->select_projects_list($socid, $selected, $htmlname, $maxlength, $option_only, $show_empty, abs($discard_closed), $forcefocus, $disabled, 0, $filterkey, 1, $forceaddid, $htmlid, $morecss, $morefilter);
119 119
 		}
@@ -185,26 +185,26 @@  discard block
 block discarded – undo
185 185
 
186 186
 		// Search all projects
187 187
 		$sql = "SELECT p.rowid, p.ref, p.title, p.fk_soc, p.fk_statut, p.public, s.nom as name, s.name_alias";
188
-		$sql .= " FROM " . $this->db->prefix() . "projet as p LEFT JOIN " . $this->db->prefix() . "societe as s ON s.rowid = p.fk_soc";
189
-		$sql .= " WHERE p.entity IN (" . getEntity('project') . ")";
188
+		$sql .= " FROM ".$this->db->prefix()."projet as p LEFT JOIN ".$this->db->prefix()."societe as s ON s.rowid = p.fk_soc";
189
+		$sql .= " WHERE p.entity IN (".getEntity('project').")";
190 190
 		if ($projectsListId !== false) {
191
-			$sql .= " AND p.rowid IN (" . $this->db->sanitize($projectsListId) . ")";
191
+			$sql .= " AND p.rowid IN (".$this->db->sanitize($projectsListId).")";
192 192
 		}
193 193
 		if ($socid == 0) {
194 194
 			$sql .= " AND (p.fk_soc=0 OR p.fk_soc IS NULL)";
195 195
 		}
196 196
 		if ($socid > 0) {
197 197
 			if (!getDolGlobalString('PROJECT_ALLOW_TO_LINK_FROM_OTHER_COMPANY')) {
198
-				$sql .= " AND (p.fk_soc=" . ((int) $socid) . " OR p.fk_soc IS NULL)";
198
+				$sql .= " AND (p.fk_soc=".((int) $socid)." OR p.fk_soc IS NULL)";
199 199
 			} elseif (getDolGlobalString('PROJECT_ALLOW_TO_LINK_FROM_OTHER_COMPANY') != 'all') {    // PROJECT_ALLOW_TO_LINK_FROM_OTHER_COMPANY is 'all' or a list of ids separated by coma.
200
-				$sql .= " AND (p.fk_soc IN (" . $this->db->sanitize(((int) $socid) . ", " . getDolGlobalString('PROJECT_ALLOW_TO_LINK_FROM_OTHER_COMPANY')) . ") OR p.fk_soc IS NULL)";
200
+				$sql .= " AND (p.fk_soc IN (".$this->db->sanitize(((int) $socid).", ".getDolGlobalString('PROJECT_ALLOW_TO_LINK_FROM_OTHER_COMPANY')).") OR p.fk_soc IS NULL)";
201 201
 			}
202 202
 		}
203 203
 		if (!empty($filterkey)) {
204 204
 			$sql .= natural_search(array('p.title', 'p.ref'), $filterkey);
205 205
 		}
206 206
 		if ($morefilter) {
207
-			$sql .= ' AND (' . $this->db->sanitize($morefilter, 0, 1) . ')';
207
+			$sql .= ' AND ('.$this->db->sanitize($morefilter, 0, 1).')';
208 208
 		}
209 209
 		$sql .= " ORDER BY p.ref ASC";
210 210
 
@@ -214,7 +214,7 @@  discard block
 block discarded – undo
214 214
 				$morecss .= ' minwidth100';
215 215
 			}
216 216
 			if (empty($option_only)) {
217
-				$out .= '<select class="flat' . ($morecss ? ' ' . $morecss : '') . '"' . ($disabled ? ' disabled="disabled"' : '') . ' id="' . $htmlid . '" name="' . $htmlname . '">';
217
+				$out .= '<select class="flat'.($morecss ? ' '.$morecss : '').'"'.($disabled ? ' disabled="disabled"' : '').' id="'.$htmlid.'" name="'.$htmlname.'">';
218 218
 			}
219 219
 			if (!empty($show_empty)) {
220 220
 				if (is_numeric($show_empty)) {
@@ -240,37 +240,37 @@  discard block
 block discarded – undo
240 240
 						$labeltoshow = dol_trunc($obj->ref, 18);
241 241
 						//if ($obj->public) $labeltoshow.=' ('.$langs->trans("SharedProject").')';
242 242
 						//else $labeltoshow.=' ('.$langs->trans("Private").')';
243
-						$labeltoshow .= ', ' . dol_trunc($obj->title, $maxlength);
243
+						$labeltoshow .= ', '.dol_trunc($obj->title, $maxlength);
244 244
 						if ($obj->name) {
245
-							$labeltoshow .= ' - ' . $obj->name;
245
+							$labeltoshow .= ' - '.$obj->name;
246 246
 							if ($obj->name_alias) {
247
-								$labeltoshow .= ' (' . $obj->name_alias . ')';
247
+								$labeltoshow .= ' ('.$obj->name_alias.')';
248 248
 							}
249 249
 						}
250 250
 
251 251
 						$disabled = 0;
252 252
 						if ($obj->fk_statut == 0) {
253 253
 							$disabled = 1;
254
-							$labeltoshow .= ' - ' . $langs->trans("Draft");
254
+							$labeltoshow .= ' - '.$langs->trans("Draft");
255 255
 						} elseif ($obj->fk_statut == 2) {
256 256
 							if ($discard_closed == 2) {
257 257
 								$disabled = 1;
258 258
 							}
259
-							$labeltoshow .= ' - ' . $langs->trans("Closed");
259
+							$labeltoshow .= ' - '.$langs->trans("Closed");
260 260
 						} elseif (!getDolGlobalString('PROJECT_ALLOW_TO_LINK_FROM_OTHER_COMPANY') && $socid > 0 && (!empty($obj->fk_soc) && $obj->fk_soc != $socid)) {
261 261
 							$disabled = 1;
262
-							$labeltoshow .= ' - ' . $langs->trans("LinkedToAnotherCompany");
262
+							$labeltoshow .= ' - '.$langs->trans("LinkedToAnotherCompany");
263 263
 						}
264 264
 
265 265
 						if (!empty($selected) && $selected == $obj->rowid) {
266
-							$out .= '<option value="' . $obj->rowid . '" selected';
266
+							$out .= '<option value="'.$obj->rowid.'" selected';
267 267
 							//if ($disabled) $out.=' disabled';						// with select2, field can't be preselected if disabled
268
-							$out .= '>' . $labeltoshow . '</option>';
268
+							$out .= '>'.$labeltoshow.'</option>';
269 269
 						} else {
270 270
 							if ($hideunselectables && $disabled && ($selected != $obj->rowid)) {
271 271
 								$resultat = '';
272 272
 							} else {
273
-								$resultat = '<option value="' . $obj->rowid . '"';
273
+								$resultat = '<option value="'.$obj->rowid.'"';
274 274
 								if ($disabled) {
275 275
 									$resultat .= ' disabled';
276 276
 								}
@@ -287,7 +287,7 @@  discard block
 block discarded – undo
287 287
 								'value' => $obj->ref,
288 288
 								'ref' => $obj->ref,
289 289
 								'labelx' => $labeltoshow,
290
-								'label' => ($disabled ? '<span class="opacitymedium">' . $labeltoshow . '</span>' : $labeltoshow),
290
+								'label' => ($disabled ? '<span class="opacitymedium">'.$labeltoshow.'</span>' : $labeltoshow),
291 291
 								'disabled' => (bool) $disabled
292 292
 							);
293 293
 						}
@@ -305,7 +305,7 @@  discard block
 block discarded – undo
305 305
 
306 306
 				// Use select2 selector
307 307
 				if (!empty($conf->use_javascript_ajax)) {
308
-					include_once DOL_DOCUMENT_ROOT . '/core/lib/ajax.lib.php';
308
+					include_once DOL_DOCUMENT_ROOT.'/core/lib/ajax.lib.php';
309 309
 					$comboenhancement = ajax_combobox($htmlid, array(), 0, $forcefocus);
310 310
 					$out .= $comboenhancement;
311 311
 					$morecss .= ' minwidth100';
@@ -374,19 +374,19 @@  discard block
 block discarded – undo
374 374
 		$sql = "SELECT t.rowid, t.ref as tref, t.label as tlabel, t.progress,";
375 375
 		$sql .= " p.rowid as pid, p.ref, p.title, p.fk_soc, p.fk_statut, p.public, p.usage_task,";
376 376
 		$sql .= " s.nom as name";
377
-		$sql .= " FROM " . $this->db->prefix() . "projet as p";
378
-		$sql .= " LEFT JOIN " . $this->db->prefix() . "societe as s ON s.rowid = p.fk_soc,";
379
-		$sql .= " " . $this->db->prefix() . "projet_task as t";
380
-		$sql .= " WHERE p.entity IN (" . getEntity('project') . ")";
377
+		$sql .= " FROM ".$this->db->prefix()."projet as p";
378
+		$sql .= " LEFT JOIN ".$this->db->prefix()."societe as s ON s.rowid = p.fk_soc,";
379
+		$sql .= " ".$this->db->prefix()."projet_task as t";
380
+		$sql .= " WHERE p.entity IN (".getEntity('project').")";
381 381
 		$sql .= " AND t.fk_projet = p.rowid";
382 382
 		if ($projectsListId) {
383
-			$sql .= " AND p.rowid IN (" . $this->db->sanitize($projectsListId) . ")";
383
+			$sql .= " AND p.rowid IN (".$this->db->sanitize($projectsListId).")";
384 384
 		}
385 385
 		if ($socid == 0) {
386 386
 			$sql .= " AND (p.fk_soc=0 OR p.fk_soc IS NULL)";
387 387
 		}
388 388
 		if ($socid > 0) {
389
-			$sql .= " AND (p.fk_soc=" . ((int) $socid) . " OR p.fk_soc IS NULL)";
389
+			$sql .= " AND (p.fk_soc=".((int) $socid)." OR p.fk_soc IS NULL)";
390 390
 		}
391 391
 		$sql .= " ORDER BY p.ref, t.ref ASC";
392 392
 
@@ -394,14 +394,14 @@  discard block
 block discarded – undo
394 394
 		if ($resql) {
395 395
 			// Use select2 selector
396 396
 			if (empty($option_only) && !empty($conf->use_javascript_ajax)) {
397
-				include_once DOL_DOCUMENT_ROOT . '/core/lib/ajax.lib.php';
397
+				include_once DOL_DOCUMENT_ROOT.'/core/lib/ajax.lib.php';
398 398
 				$comboenhancement = ajax_combobox($htmlname, [], 0, $forcefocus);
399 399
 				$out .= $comboenhancement;
400 400
 				$morecss .= ' minwidth150imp';
401 401
 			}
402 402
 
403 403
 			if (empty($option_only)) {
404
-				$out .= '<select class="valignmiddle flat' . ($morecss ? ' ' . $morecss : '') . '"' . ($disabled ? ' disabled="disabled"' : '') . ' id="' . $htmlname . '" name="' . $htmlname . '">';
404
+				$out .= '<select class="valignmiddle flat'.($morecss ? ' '.$morecss : '').'"'.($disabled ? ' disabled="disabled"' : '').' id="'.$htmlname.'" name="'.$htmlname.'">';
405 405
 			}
406 406
 			if (!empty($show_empty)) {
407 407
 				$out .= '<option value="0" class="optiongrey">';
@@ -447,58 +447,58 @@  discard block
 block discarded – undo
447 447
 							$labeltoshow .= dol_trunc($obj->ref, 18); // Project ref
448 448
 							//if ($obj->public) $labeltoshow.=' ('.$langs->trans("SharedProject").')';
449 449
 							//else $labeltoshow.=' ('.$langs->trans("Private").')';
450
-							$labeltoshow .= ' ' . dol_trunc($obj->title, $maxlength);
450
+							$labeltoshow .= ' '.dol_trunc($obj->title, $maxlength);
451 451
 							$labeltoshowhtml = $labeltoshow;
452 452
 
453 453
 							if ($obj->name) {
454
-								$labeltoshow .= ' (' . $obj->name . ')';
455
-								$labeltoshowhtml .= ' <span class="opacitymedium">(' . $obj->name . ')</span>';
454
+								$labeltoshow .= ' ('.$obj->name.')';
455
+								$labeltoshowhtml .= ' <span class="opacitymedium">('.$obj->name.')</span>';
456 456
 							}
457 457
 
458 458
 							$disabled = 0;
459 459
 							if ($obj->fk_statut == Project::STATUS_DRAFT) {
460 460
 								$disabled = 1;
461
-								$labeltoshow .= ' - ' . $langs->trans("Draft");
462
-								$labeltoshowhtml .= ' -  <span class="opacitymedium">' . $langs->trans("Draft") . '</span>';
461
+								$labeltoshow .= ' - '.$langs->trans("Draft");
462
+								$labeltoshowhtml .= ' -  <span class="opacitymedium">'.$langs->trans("Draft").'</span>';
463 463
 							} elseif ($obj->fk_statut == Project::STATUS_CLOSED) {
464 464
 								if ($discard_closed == 2) {
465 465
 									$disabled = 1;
466 466
 								}
467
-								$labeltoshow .= ' - ' . $langs->trans("Closed");
468
-								$labeltoshowhtml .= ' - <span class="opacitymedium">' . $langs->trans("Closed") . '</span>';
467
+								$labeltoshow .= ' - '.$langs->trans("Closed");
468
+								$labeltoshowhtml .= ' - <span class="opacitymedium">'.$langs->trans("Closed").'</span>';
469 469
 							} elseif ($socid > 0 && (!empty($obj->fk_soc) && $obj->fk_soc != $socid)) {
470 470
 								$disabled = 1;
471
-								$labeltoshow .= ' - ' . $langs->trans("LinkedToAnotherCompany");
472
-								$labeltoshowhtml .= ' - <span class="opacitymedium">' . $langs->trans("LinkedToAnotherCompany") . '</span>';
471
+								$labeltoshow .= ' - '.$langs->trans("LinkedToAnotherCompany");
472
+								$labeltoshowhtml .= ' - <span class="opacitymedium">'.$langs->trans("LinkedToAnotherCompany").'</span>';
473 473
 							}
474 474
 							$labeltoshow .= ' - ';
475 475
 							$labeltoshowhtml .= ' - ';
476 476
 						}
477 477
 
478 478
 						// Label for task
479
-						$labeltoshow .= $obj->tref . ' ' . dol_trunc($obj->tlabel, $maxlength);
480
-						$labeltoshowhtml .= $obj->tref . ' - ' . dol_trunc($obj->tlabel, $maxlength);
479
+						$labeltoshow .= $obj->tref.' '.dol_trunc($obj->tlabel, $maxlength);
480
+						$labeltoshowhtml .= $obj->tref.' - '.dol_trunc($obj->tlabel, $maxlength);
481 481
 						if ($obj->usage_task && preg_match('/progress/', $showmore)) {
482
-							$labeltoshow .= ' <span class="opacitymedium">(' . $obj->progress . '%)</span>';
483
-							$labeltoshowhtml .= ' <span class="opacitymedium">(' . $obj->progress . '%)</span>';
482
+							$labeltoshow .= ' <span class="opacitymedium">('.$obj->progress.'%)</span>';
483
+							$labeltoshowhtml .= ' <span class="opacitymedium">('.$obj->progress.'%)</span>';
484 484
 						}
485 485
 
486 486
 						if (!empty($selected) && $selected == $obj->rowid) {
487
-							$out .= '<option value="' . $obj->rowid . '" selected';
488
-							$out .= ' data-html="' . dol_escape_htmltag($labeltoshowhtml) . '"';
487
+							$out .= '<option value="'.$obj->rowid.'" selected';
488
+							$out .= ' data-html="'.dol_escape_htmltag($labeltoshowhtml).'"';
489 489
 							//if ($disabled) $out.=' disabled';						// with select2, field can't be preselected if disabled
490
-							$out .= '>' . $labeltoshow . '</option>';
490
+							$out .= '>'.$labeltoshow.'</option>';
491 491
 						} else {
492 492
 							if ($hideunselectables && $disabled && ($selected != $obj->rowid)) {
493 493
 								$resultat = '';
494 494
 							} else {
495
-								$resultat = '<option value="' . $obj->rowid . '"';
495
+								$resultat = '<option value="'.$obj->rowid.'"';
496 496
 								if ($disabled) {
497 497
 									$resultat .= ' disabled';
498 498
 								}
499 499
 								//if ($obj->public) $labeltoshow.=' ('.$langs->trans("Public").')';
500 500
 								//else $labeltoshow.=' ('.$langs->trans("Private").')';
501
-								$resultat .= ' data-html="' . dol_escape_htmltag($labeltoshowhtml) . '"';
501
+								$resultat .= ' data-html="'.dol_escape_htmltag($labeltoshowhtml).'"';
502 502
 								$resultat .= '>';
503 503
 								$resultat .= $labeltoshow;
504 504
 								$resultat .= '</option>';
@@ -624,30 +624,30 @@  discard block
 block discarded – undo
624 624
 		if ($linkedtothirdparty) {
625 625
 			$sql .= ", s.nom as name";
626 626
 		}
627
-		$sql .= " FROM " . $this->db->prefix() . $table_element . " as t";
627
+		$sql .= " FROM ".$this->db->prefix().$table_element." as t";
628 628
 		if ($linkedtothirdparty) {
629
-			$sql .= ", " . $this->db->prefix() . "societe as s";
629
+			$sql .= ", ".$this->db->prefix()."societe as s";
630 630
 		}
631
-		$sql .= " WHERE " . $projectkey . " is null";
631
+		$sql .= " WHERE ".$projectkey." is null";
632 632
 		if (!empty($socid) && $linkedtothirdparty) {
633 633
 			if (is_numeric($socid)) {
634
-				$sql .= " AND t.fk_soc = " . ((int) $socid);
634
+				$sql .= " AND t.fk_soc = ".((int) $socid);
635 635
 			} else {
636
-				$sql .= " AND t.fk_soc IN (" . $this->db->sanitize($socid) . ")";
636
+				$sql .= " AND t.fk_soc IN (".$this->db->sanitize($socid).")";
637 637
 			}
638 638
 		}
639 639
 		if (!in_array($table_element, array('expensereport_det', 'stock_mouvement'))) {
640
-			$sql .= ' AND t.entity IN (' . getEntity('project') . ')';
640
+			$sql .= ' AND t.entity IN ('.getEntity('project').')';
641 641
 		}
642 642
 		if ($linkedtothirdparty) {
643 643
 			$sql .= " AND s.rowid = t.fk_soc";
644 644
 		}
645 645
 		if ($sqlfilter) {
646
-			$sql .= " AND " . $sqlfilter;
646
+			$sql .= " AND ".$sqlfilter;
647 647
 		}
648 648
 		$sql .= " ORDER BY ref DESC";
649 649
 
650
-		dol_syslog(get_class($this) . '::select_element', LOG_DEBUG);
650
+		dol_syslog(get_class($this).'::select_element', LOG_DEBUG);
651 651
 		$resql = $this->db->query($sql);
652 652
 		if ($resql) {
653 653
 			$num = $this->db->num_rows($resql);
@@ -655,18 +655,18 @@  discard block
 block discarded – undo
655 655
 			$sellist = '';
656 656
 
657 657
 			if ($num > 0) {
658
-				$sellist = '<select class="flat elementselect css' . $table_element . ($morecss ? ' ' . $morecss : '') . '" name="elementselect">';
659
-				$sellist .= '<option value="-1"' . ($placeholder ? ' class="optiongrey"' : '') . '>' . $placeholder . '</option>';
658
+				$sellist = '<select class="flat elementselect css'.$table_element.($morecss ? ' '.$morecss : '').'" name="elementselect">';
659
+				$sellist .= '<option value="-1"'.($placeholder ? ' class="optiongrey"' : '').'>'.$placeholder.'</option>';
660 660
 				while ($i < $num) {
661 661
 					$obj = $this->db->fetch_object($resql);
662 662
 					$ref = $obj->ref ? $obj->ref : $obj->rowid;
663 663
 					if (!empty($obj->ref_supplier)) {
664
-						$ref .= ' (' . $obj->ref_supplier . ')';
664
+						$ref .= ' ('.$obj->ref_supplier.')';
665 665
 					}
666 666
 					if (!empty($obj->name)) {
667
-						$ref .= ' - ' . $obj->name;
667
+						$ref .= ' - '.$obj->name;
668 668
 					}
669
-					$sellist .= '<option value="' . $obj->rowid . '">' . $ref . '</option>';
669
+					$sellist .= '<option value="'.$obj->rowid.'">'.$ref.'</option>';
670 670
 					$i++;
671 671
 				}
672 672
 				$sellist .= '</select>';
@@ -684,7 +684,7 @@  discard block
 block discarded – undo
684 684
 			dol_print_error($this->db);
685 685
 			$this->error = $this->db->lasterror();
686 686
 			$this->errors[] = $this->db->lasterror();
687
-			dol_syslog(get_class($this) . "::select_element " . $this->error, LOG_ERR);
687
+			dol_syslog(get_class($this)."::select_element ".$this->error, LOG_ERR);
688 688
 			return -1;
689 689
 		}
690 690
 	}
@@ -709,7 +709,7 @@  discard block
 block discarded – undo
709 709
 		global $conf, $langs, $user;
710 710
 
711 711
 		$sql = "SELECT rowid, code, label, percent";
712
-		$sql .= " FROM " . $this->db->prefix() . 'c_lead_status';
712
+		$sql .= " FROM ".$this->db->prefix().'c_lead_status';
713 713
 		$sql .= " WHERE active = 1";
714 714
 		$sql .= " ORDER BY position";
715 715
 
@@ -719,31 +719,31 @@  discard block
 block discarded – undo
719 719
 			$i = 0;
720 720
 			$sellist = '';
721 721
 			if ($num > 0) {
722
-				$sellist = '<select class="flat oppstatus' . ($morecss ? ' ' . $morecss : '') . '" id="' . $htmlname . '" name="' . $htmlname . '">';
722
+				$sellist = '<select class="flat oppstatus'.($morecss ? ' '.$morecss : '').'" id="'.$htmlname.'" name="'.$htmlname.'">';
723 723
 				if ($showempty) {
724 724
 					// Without &nbsp, strange move of screen when switching value
725 725
 					$sellist .= '<option value="-1">&nbsp;</option>';
726 726
 				}
727 727
 				if ($showallnone) {
728
-					$sellist .= '<option value="all"' . ($preselected == 'all' ? ' selected="selected"' : '') . '>-- ' . $langs->trans("OnlyOpportunitiesShort") . '</option>';
729
-					$sellist .= '<option value="openedopp"' . ($preselected == 'openedopp' ? ' selected="selected"' : '') . '>-- ' . $langs->trans("OpenedOpportunitiesShort") . '</option>';
730
-					$sellist .= '<option value="notopenedopp"' . ($preselected == 'notopenedopp' ? ' selected="selected"' : '') . '>-- ' . $langs->trans("NotOpenedOpportunitiesShort") . '</option>';
731
-					$sellist .= '<option value="none"' . ($preselected == 'none' ? ' selected="selected"' : '') . '>-- ' . $langs->trans("NotAnOpportunityShort") . '</option>';
728
+					$sellist .= '<option value="all"'.($preselected == 'all' ? ' selected="selected"' : '').'>-- '.$langs->trans("OnlyOpportunitiesShort").'</option>';
729
+					$sellist .= '<option value="openedopp"'.($preselected == 'openedopp' ? ' selected="selected"' : '').'>-- '.$langs->trans("OpenedOpportunitiesShort").'</option>';
730
+					$sellist .= '<option value="notopenedopp"'.($preselected == 'notopenedopp' ? ' selected="selected"' : '').'>-- '.$langs->trans("NotOpenedOpportunitiesShort").'</option>';
731
+					$sellist .= '<option value="none"'.($preselected == 'none' ? ' selected="selected"' : '').'>-- '.$langs->trans("NotAnOpportunityShort").'</option>';
732 732
 				}
733 733
 				while ($i < $num) {
734 734
 					$obj = $this->db->fetch_object($resql);
735 735
 
736
-					$sellist .= '<option value="' . $obj->rowid . '" defaultpercent="' . $obj->percent . '" elemcode="' . $obj->code . '"';
736
+					$sellist .= '<option value="'.$obj->rowid.'" defaultpercent="'.$obj->percent.'" elemcode="'.$obj->code.'"';
737 737
 					if ($obj->rowid == $preselected) {
738 738
 						$sellist .= ' selected="selected"';
739 739
 					}
740 740
 					$sellist .= '>';
741 741
 					if ($useshortlabel) {
742
-						$finallabel = ($langs->transnoentitiesnoconv("OppStatus" . $obj->code) != "OppStatus" . $obj->code ? $langs->transnoentitiesnoconv("OppStatus" . $obj->code) : $obj->label);
742
+						$finallabel = ($langs->transnoentitiesnoconv("OppStatus".$obj->code) != "OppStatus".$obj->code ? $langs->transnoentitiesnoconv("OppStatus".$obj->code) : $obj->label);
743 743
 					} else {
744
-						$finallabel = ($langs->transnoentitiesnoconv("OppStatus" . $obj->code) != "OppStatus" . $obj->code ? $langs->transnoentitiesnoconv("OppStatus" . $obj->code) : $obj->label);
744
+						$finallabel = ($langs->transnoentitiesnoconv("OppStatus".$obj->code) != "OppStatus".$obj->code ? $langs->transnoentitiesnoconv("OppStatus".$obj->code) : $obj->label);
745 745
 						if ($showpercent) {
746
-							$finallabel .= ' (' . $obj->percent . '%)';
746
+							$finallabel .= ' ('.$obj->percent.'%)';
747 747
 						}
748 748
 					}
749 749
 					$sellist .= $finallabel;
@@ -772,7 +772,7 @@  discard block
 block discarded – undo
772 772
 		} else {
773 773
 			$this->error = $this->db->lasterror();
774 774
 			$this->errors[] = $this->db->lasterror();
775
-			dol_syslog(get_class($this) . "::selectOpportunityStatus " . $this->error, LOG_ERR);
775
+			dol_syslog(get_class($this)."::selectOpportunityStatus ".$this->error, LOG_ERR);
776 776
 			return -1;
777 777
 		}
778 778
 	}
@@ -800,7 +800,7 @@  discard block
 block discarded – undo
800 800
 		$tmpproject = new Project($this->db);
801 801
 
802 802
 		foreach ($statustohow as $key => $value) {
803
-			$tmpproject->statut = $key;	// deprecated
803
+			$tmpproject->statut = $key; // deprecated
804 804
 			$tmpproject->status = $key;
805 805
 			$options[$value] = $tmpproject->getLibStatut($short);
806 806
 		}
@@ -808,7 +808,7 @@  discard block
 block discarded – undo
808 808
 		if (is_array($selected)) {
809 809
 			$selectedarray = $selected;
810 810
 		} elseif ($selected == 99) {
811
-			$selectedarray = array(0,1);
811
+			$selectedarray = array(0, 1);
812 812
 		} else {
813 813
 			$selectedarray = explode(',', $selected);
814 814
 		}
@@ -832,24 +832,24 @@  discard block
 block discarded – undo
832 832
 	{
833 833
 		global $user, $conf, $langs;
834 834
 
835
-		require_once DOL_DOCUMENT_ROOT . '/projet/class/project.class.php';
835
+		require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
836 836
 
837 837
 		$out = '';
838 838
 		if (empty($lineOnly)) {
839 839
 			// Search Invoice
840 840
 			$sql = "SELECT f.rowid, f.ref as fref,";
841 841
 			$sql .= ' s.nom as name';
842
-			$sql .= ' FROM ' . $this->db->prefix() . 'projet as p';
843
-			$sql .= ' INNER JOIN ' . $this->db->prefix() . 'societe as s ON s.rowid = p.fk_soc';
844
-			$sql .= ' INNER JOIN ' . $this->db->prefix() . 'facture as f ON f.fk_projet = p.rowid';
845
-			$sql .= " WHERE p.entity IN (" . getEntity('project') . ")";
842
+			$sql .= ' FROM '.$this->db->prefix().'projet as p';
843
+			$sql .= ' INNER JOIN '.$this->db->prefix().'societe as s ON s.rowid = p.fk_soc';
844
+			$sql .= ' INNER JOIN '.$this->db->prefix().'facture as f ON f.fk_projet = p.rowid';
845
+			$sql .= " WHERE p.entity IN (".getEntity('project').")";
846 846
 			if (!empty($filters)) {
847 847
 				foreach ($filters as $key => $value) {
848 848
 					if ($key == 'p.rowid') {
849
-						$sql .= " AND p.rowid=" . (int) $value;
849
+						$sql .= " AND p.rowid=".(int) $value;
850 850
 					}
851 851
 					if ($key == 'f.rowid') {
852
-						$sql .= " AND f.rowid=" . (int) $value;
852
+						$sql .= " AND f.rowid=".(int) $value;
853 853
 					}
854 854
 				}
855 855
 			}
@@ -859,26 +859,26 @@  discard block
 block discarded – undo
859 859
 			if ($resql) {
860 860
 				// Use select2 selector
861 861
 				if (!empty($conf->use_javascript_ajax)) {
862
-					include_once DOL_DOCUMENT_ROOT . '/core/lib/ajax.lib.php';
862
+					include_once DOL_DOCUMENT_ROOT.'/core/lib/ajax.lib.php';
863 863
 					$comboenhancement = ajax_combobox($htmlNameInvoice, array(array('method' => 'getLines', 'url' => dol_buildpath('/core/ajax/ajaxinvoiceline.php', 1), 'htmlname' => $htmlNameInvoiceLine)), 0, 0);
864 864
 					$out .= $comboenhancement;
865 865
 					$morecss = 'minwidth200imp maxwidth500';
866 866
 				}
867 867
 
868
-				$out .= '<select class="valignmiddle flat' . ($morecss ? ' ' . $morecss : '') . '" id="' . $htmlNameInvoice . '" name="' . $htmlNameInvoice . '">';
868
+				$out .= '<select class="valignmiddle flat'.($morecss ? ' '.$morecss : '').'" id="'.$htmlNameInvoice.'" name="'.$htmlNameInvoice.'">';
869 869
 				$num = $this->db->num_rows($resql);
870 870
 				if ($num) {
871 871
 					while ($obj = $this->db->fetch_object($resql)) {
872 872
 						$labeltoshow = $obj->fref; // Invoice ref
873 873
 						if ($obj->name) {
874
-							$labeltoshow .= ' - ' . $obj->name;
874
+							$labeltoshow .= ' - '.$obj->name;
875 875
 						}
876 876
 
877
-						$out .= '<option value="' . $obj->rowid . '" ';
877
+						$out .= '<option value="'.$obj->rowid.'" ';
878 878
 						if (!empty($selectedInvoiceId) && $selectedInvoiceId == $obj->rowid) {
879 879
 							$out .= ' selected ';
880 880
 						}
881
-						$out .= '>' . $labeltoshow . '</option>';
881
+						$out .= '>'.$labeltoshow.'</option>';
882 882
 					}
883 883
 				}
884 884
 				$out .= '</select>';
@@ -890,20 +890,20 @@  discard block
 block discarded – undo
890 890
 
891 891
 		// Search Invoice Line
892 892
 		$sql = "SELECT fd.rowid, fd.label, fd.description";
893
-		$sql .= ' FROM ' . $this->db->prefix() . 'projet as p';
894
-		$sql .= ' INNER JOIN ' . $this->db->prefix() . 'societe as s ON s.rowid = p.fk_soc';
895
-		$sql .= ' INNER JOIN ' . $this->db->prefix() . 'facture as f ON f.fk_projet = p.rowid';
896
-		$sql .= ' INNER JOIN ' . $this->db->prefix() . 'facturedet as fd ON fd.fk_facture = f.rowid';
897
-		$sql .= " WHERE p.entity IN (" . getEntity('project') . ")";
893
+		$sql .= ' FROM '.$this->db->prefix().'projet as p';
894
+		$sql .= ' INNER JOIN '.$this->db->prefix().'societe as s ON s.rowid = p.fk_soc';
895
+		$sql .= ' INNER JOIN '.$this->db->prefix().'facture as f ON f.fk_projet = p.rowid';
896
+		$sql .= ' INNER JOIN '.$this->db->prefix().'facturedet as fd ON fd.fk_facture = f.rowid';
897
+		$sql .= " WHERE p.entity IN (".getEntity('project').")";
898 898
 		if (!empty($filters)) {
899 899
 			foreach ($filters as $key => $value) {
900 900
 				if ($key == 'p.rowid') {
901
-					$sql .= " AND p.rowid=" . (int) $value;
901
+					$sql .= " AND p.rowid=".(int) $value;
902 902
 				}
903 903
 			}
904 904
 		}
905 905
 		if (!empty($selectedInvoiceId)) {
906
-			$sql .= " AND f.rowid=" . (int) $selectedInvoiceId;
906
+			$sql .= " AND f.rowid=".(int) $selectedInvoiceId;
907 907
 		}
908 908
 		$sql .= " ORDER BY p.ref, f.ref ASC";
909 909
 		$resql = $this->db->query($sql);
@@ -911,24 +911,24 @@  discard block
 block discarded – undo
911 911
 			// Use select2 selector
912 912
 			if (empty($lineOnly)) {
913 913
 				if (!empty($conf->use_javascript_ajax)) {
914
-					include_once DOL_DOCUMENT_ROOT . '/core/lib/ajax.lib.php';
914
+					include_once DOL_DOCUMENT_ROOT.'/core/lib/ajax.lib.php';
915 915
 					$comboenhancement = ajax_combobox($htmlNameInvoiceLine, [], 0, 0);
916 916
 					$out .= $comboenhancement;
917 917
 					$morecss = 'minwidth200imp maxwidth500';
918 918
 				}
919 919
 
920
-				$out .= '<select class="valignmiddle flat' . ($morecss ? ' ' . $morecss : '') . '" id="' . $htmlNameInvoiceLine . '" name="' . $htmlNameInvoiceLine . '">';
920
+				$out .= '<select class="valignmiddle flat'.($morecss ? ' '.$morecss : '').'" id="'.$htmlNameInvoiceLine.'" name="'.$htmlNameInvoiceLine.'">';
921 921
 			}
922 922
 			$num = $this->db->num_rows($resql);
923 923
 			if ($num) {
924 924
 				while ($obj = $this->db->fetch_object($resql)) {
925 925
 					$labeltoshow .= $obj->description; // Invoice ref
926 926
 
927
-					$out .= '<option value="' . $obj->rowid . '" ';
927
+					$out .= '<option value="'.$obj->rowid.'" ';
928 928
 					if (!empty($selectedLineId) && $selectedLineId == $obj->rowid) {
929 929
 						$out .= ' selected ';
930 930
 					}
931
-					$out .= '>' . $labeltoshow . '</option>';
931
+					$out .= '>'.$labeltoshow.'</option>';
932 932
 				}
933 933
 			}
934 934
 			if (empty($lineOnly)) {
@@ -961,14 +961,14 @@  discard block
 block discarded – undo
961 961
 
962 962
 		$out = '';
963 963
 		if ($htmlname_status != "none" && $htmlname_percent != 'none') {
964
-			$out .= '<form method="post" action="' . $page . '">';
964
+			$out .= '<form method="post" action="'.$page.'">';
965 965
 			$out .= '<input type="hidden" name="action" value="set_opp_status">';
966
-			$out .= '<input type="hidden" name="token" value="' . newToken() . '">';
966
+			$out .= '<input type="hidden" name="token" value="'.newToken().'">';
967 967
 			$out .= $this-> selectOpportunityStatus($htmlname_status, $selected, 1, 0, 0, 0, 'minwidth150 inline-block valignmiddle', 1, 1);
968 968
 			$out .= ' / <span title="'.$langs->trans("OpportunityProbability").'"> ';
969 969
 			$out .= '<input class="width50 right" type="text" id="'.$htmlname_percent.'" name="'.$htmlname_percent.'" title="'.dol_escape_htmltag($langs->trans("OpportunityProbability")).'" value="'.$percent_value.'"> %';
970 970
 			$out .= '</span>';
971
-			$out .= '<input type="submit" class="button smallpaddingimp valignmiddle" value="' . $langs->trans("Modify") . '">';
971
+			$out .= '<input type="submit" class="button smallpaddingimp valignmiddle" value="'.$langs->trans("Modify").'">';
972 972
 			$out .= '</form>';
973 973
 		} else {
974 974
 			if ($selected > 0) {
Please login to merge, or discard this patch.