浏览代码

Fix phpcs

Laurent Destailleur 1 年之前
父节点
当前提交
7d109e9419
共有 43 个文件被更改,包括 235 次插入235 次删除
  1. 1 1
      htdocs/adherents/type_translation.php
  2. 1 1
      htdocs/admin/emailcollector_card.php
  3. 1 1
      htdocs/admin/modules.php
  4. 1 1
      htdocs/admin/multicurrency.php
  5. 2 2
      htdocs/admin/notification.php
  6. 2 2
      htdocs/admin/system/security.php
  7. 52 52
      htdocs/admin/tools/dolibarr_import.php
  8. 9 9
      htdocs/install/check.php
  9. 21 21
      htdocs/install/fileconf.php
  10. 1 1
      htdocs/install/step1.php
  11. 1 1
      htdocs/install/upgrade2.php
  12. 15 15
      htdocs/modulebuilder/index.php
  13. 1 1
      htdocs/mrp/class/mo.class.php
  14. 1 1
      htdocs/paypal/lib/paypal.lib.php
  15. 2 2
      htdocs/product/class/product.class.php
  16. 2 2
      htdocs/product/class/productcustomerprice.class.php
  17. 1 1
      htdocs/product/stock/massstockmove.php
  18. 7 7
      htdocs/product/stock/product.php
  19. 7 7
      htdocs/product/stock/replenish.php
  20. 1 1
      htdocs/product/stock/stocktransfer/class/stocktransferline.class.php
  21. 1 1
      htdocs/projet/class/project.class.php
  22. 1 1
      htdocs/projet/ganttview.php
  23. 1 1
      htdocs/projet/list.php
  24. 1 1
      htdocs/projet/tasks/time.php
  25. 1 1
      htdocs/public/company/new.php
  26. 1 1
      htdocs/public/members/new.php
  27. 1 1
      htdocs/public/partnership/new.php
  28. 25 25
      htdocs/public/payment/newpayment.php
  29. 1 1
      htdocs/public/payment/paymentok.php
  30. 1 1
      htdocs/public/project/new.php
  31. 1 1
      htdocs/public/test/test_arrays.php
  32. 1 1
      htdocs/reception/list.php
  33. 2 2
      htdocs/reception/tpl/linkedobjectblock.tpl.php
  34. 1 1
      htdocs/salaries/card.php
  35. 1 1
      htdocs/societe/checkvat/checkVatPopup.php
  36. 1 1
      htdocs/societe/list.php
  37. 1 1
      htdocs/societe/paymentmodes.php
  38. 38 38
      htdocs/ticket/card.php
  39. 2 2
      htdocs/ticket/tpl/linkedobjectblock.tpl.php
  40. 1 1
      htdocs/user/card.php
  41. 8 8
      htdocs/variants/combinations.php
  42. 2 2
      htdocs/variants/tpl/productattributevalueline_create.tpl.php
  43. 13 13
      htdocs/website/index.php

+ 1 - 1
htdocs/adherents/type_translation.php

@@ -82,7 +82,7 @@ if ($action == 'vadd' && $cancel != $langs->trans("Cancel") && $user->hasRight('
 	if ($forcelangprod == $current_lang) {
 		$object->label		 = GETPOST("libelle", 'alphanohtml');
 		$object->description = dol_htmlcleanlastbr(GETPOST("desc", 'restricthtml'));
-	//$object->other		 = dol_htmlcleanlastbr(GETPOST("other", 'restricthtml'));
+		//$object->other		 = dol_htmlcleanlastbr(GETPOST("other", 'restricthtml'));
 	} else {
 		$object->multilangs[$forcelangprod]["label"] = GETPOST("libelle", 'alphanohtml');
 		$object->multilangs[$forcelangprod]["description"] = dol_htmlcleanlastbr(GETPOST("desc", 'restricthtml'));

+ 1 - 1
htdocs/admin/emailcollector_card.php

@@ -560,7 +560,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
 						$morehtml .= '<br>'.imap_last_error();
 					}
 					dol_syslog("Error ".$morehtml, LOG_WARNING);
-				//var_dump(imap_errors())
+					//var_dump(imap_errors())
 				} else {
 					dol_syslog("Imap connected. Now we call imap_num_msg()");
 					$morehtml .= imap_num_msg($connection);

+ 1 - 1
htdocs/admin/modules.php

@@ -918,7 +918,7 @@ if ($mode == 'common' || $mode == 'commonkanban') {
 						$urlpage = $page;
 						if ($i++) {
 							$codetoconfig .= '<a href="'.$urlpage.'" title="'.$langs->trans($page).'">'.img_picto(ucfirst($page), "setup").'</a>';
-						//    print '<a href="'.$page.'">'.ucfirst($page).'</a>&nbsp;';
+							//    print '<a href="'.$page.'">'.ucfirst($page).'</a>&nbsp;';
 						} else {
 							if (preg_match('/^([^@]+)@([^@]+)$/i', $urlpage, $regs)) {
 								$urltouse = dol_buildpath('/'.$regs[2].'/admin/'.$regs[1], 1);

+ 1 - 1
htdocs/admin/multicurrency.php

@@ -132,7 +132,7 @@ if ($action == 'add_currency') {
 	if (GETPOSTISSET('modify_apilayer')) {
 		dolibarr_set_const($db, 'MULTICURRENCY_APP_ID', GETPOST('MULTICURRENCY_APP_ID', 'alpha'));
 		dolibarr_set_const($db, 'MULTICURRENCY_APP_SOURCE', GETPOST('MULTICURRENCY_APP_SOURCE', 'alpha'));
-	//dolibarr_set_const($db, 'MULTICURRENCY_ALTERNATE_SOURCE', GETPOST('MULTICURRENCY_ALTERNATE_SOURCE', 'alpha'));
+		//dolibarr_set_const($db, 'MULTICURRENCY_ALTERNATE_SOURCE', GETPOST('MULTICURRENCY_ALTERNATE_SOURCE', 'alpha'));
 	} else {
 		$multiurrency = new MultiCurrency($db);
 		$result = $multiurrency->syncRates(getDolGlobalString('MULTICURRENCY_APP_ID'));

+ 2 - 2
htdocs/admin/notification.php

@@ -137,7 +137,7 @@ if ($action == 'setfixednotif' && $user->admin) {
 
 				$newkey = 'NOTIFICATION_FIXEDEMAIL_'.$reg[1].'_THRESHOLD_HIGHER_'.((int) GETPOST($shortkey.'_amount'));
 				$newval = GETPOST($shortkey.'_key');
-			//print $newkey.' - '.$newval.'<br>';
+				//print $newkey.' - '.$newval.'<br>';
 			} elseif (preg_match('/^NOTIF_(.*)_new_key/', $key, $reg)) {
 				// Add a new entry
 				$newkey = 'NOTIFICATION_FIXEDEMAIL_'.$reg[1].'_THRESHOLD_HIGHER_'.((int) GETPOST($shortkey.'_amount'));
@@ -304,7 +304,7 @@ foreach ($listofnotifiedevents as $notifiedevent) {
 		$model = 'expensereport_send';
 	} elseif ($notifiedevent['elementtype'] == 'order_supplier') {
 		$model = 'order_supplier_send';
-	// } elseif ($notifiedevent['elementtype'] == 'invoice_supplier') $model = 'invoice_supplier_send';
+		// } elseif ($notifiedevent['elementtype'] == 'invoice_supplier') $model = 'invoice_supplier_send';
 	} elseif ($notifiedevent['elementtype'] == 'member') {
 		$model = 'member';
 	}

+ 2 - 2
htdocs/admin/system/security.php

@@ -313,7 +313,7 @@ print '<br>';
 print '<strong>$dolibarr_main_restrict_ip</strong>: ';
 if (empty($dolibarr_main_restrict_ip)) {
 	print '<span class="opacitymedium">'.$langs->trans("None").'</span>';
-//print ' <span class="opacitymedium">('.$langs->trans("RecommendedValueIs", $langs->transnoentitiesnoconv("IPsOfUsers")).')</span>';
+	//print ' <span class="opacitymedium">('.$langs->trans("RecommendedValueIs", $langs->transnoentitiesnoconv("IPsOfUsers")).')</span>';
 } else {
 	print $dolibarr_main_restrict_ip;
 }
@@ -332,7 +332,7 @@ if (!getDolGlobalString('SECURITY_DISABLE_TEST_ON_OBFUSCATED_CONF')) {
 	print '<strong>$dolibarr_main_db_pass</strong>: ';
 	if (!empty($dolibarr_main_db_pass) && empty($dolibarr_main_db_encrypted_pass)) {
 		print img_picto('', 'warning').' '.$langs->trans("DatabasePasswordNotObfuscated").' &nbsp; &nbsp; <span class="opacitymedium">('.$langs->trans("Recommended").': '.$langs->trans("SetOptionTo", $langs->transnoentitiesnoconv("MainDbPasswordFileConfEncrypted"), yn(1)).')</span>';
-	//print ' <span class="opacitymedium">('.$langs->trans("RecommendedValueIs", $langs->transnoentitiesnoconv("IPsOfUsers")).')</span>';
+		//print ' <span class="opacitymedium">('.$langs->trans("RecommendedValueIs", $langs->transnoentitiesnoconv("IPsOfUsers")).')</span>';
 	} else {
 		print img_picto('', 'tick').' '.$langs->trans("DatabasePasswordObfuscated");
 	}

+ 52 - 52
htdocs/admin/tools/dolibarr_import.php

@@ -144,75 +144,75 @@ if (in_array($type, array('mysql', 'mysqli'))) {
 		print '<div class="formelementrow centpercent">';
 		// Parameteres execution
 		$command = $db->getPathOfRestore();
-		if (preg_match("/\s/", $command)) {
-			$command = $command = escapeshellarg($command); // Use quotes on command
-		}
+	if (preg_match("/\s/", $command)) {
+		$command = $command = escapeshellarg($command); // Use quotes on command
+	}
 
 		$param = $dolibarr_main_db_name;
 		$param .= " -h ".$dolibarr_main_db_host;
-		if (!empty($dolibarr_main_db_port)) {
-			$param .= " -P ".$dolibarr_main_db_port;
-		}
+	if (!empty($dolibarr_main_db_port)) {
+		$param .= " -P ".$dolibarr_main_db_port;
+	}
 		$param .= " -u ".$dolibarr_main_db_user;
 		$paramcrypted = $param;
 		$paramclear = $param;
-		if (!empty($dolibarr_main_db_pass)) {
-			$paramcrypted .= " -p".preg_replace('/./i', '*', $dolibarr_main_db_pass);
-			$paramclear .= " -p".$dolibarr_main_db_pass;
-		}
+	if (!empty($dolibarr_main_db_pass)) {
+		$paramcrypted .= " -p".preg_replace('/./i', '*', $dolibarr_main_db_pass);
+		$paramclear .= " -p".$dolibarr_main_db_pass;
+	}
 
 		echo $langs->trans("ImportMySqlDesc");
 		print '<br>';
 		print '<textarea rows="1" id="restorecommand" class="centpercent">'.$langs->trans("ImportMySqlCommand", $command, ($showpass ? $paramclear : $paramcrypted)).'</textarea><br>';
 		print ajax_autoselect('restorecommand');
 
-		if (empty($_GET["showpass"]) && $dolibarr_main_db_pass) {
-			print '<br><a href="'.$_SERVER["PHP_SELF"].'?showpass=1&amp;radio_dump=mysql_options">'.$langs->trans("UnHidePassword").'</a>';
-		}
+	if (empty($_GET["showpass"]) && $dolibarr_main_db_pass) {
+		print '<br><a href="'.$_SERVER["PHP_SELF"].'?showpass=1&amp;radio_dump=mysql_options">'.$langs->trans("UnHidePassword").'</a>';
+	}
 		//else print '<br><a href="'.$_SERVER["PHP_SELF"].'?showpass=0&amp;radio_dump=mysql_options">'.$langs->trans("HidePassword").'</a>';
 		print '</div>';
 		print '</fieldset>';
-	} elseif (in_array($type, array('pgsql'))) {
-		print '<fieldset id="postgresql_options">';
-		print '<legend>Restore PostgreSQL</legend>';
-		print '<div class="formelementrow">';
-		// Parameteres execution
-		$command = $db->getPathOfRestore();
-		if (preg_match("/\s/", $command)) {
-			$command = $command = escapeshellarg($command); // Use quotes on command
-		}
-
-		$param = " -d ".$dolibarr_main_db_name;
-		$param .= " -h ".$dolibarr_main_db_host;
-		if (!empty($dolibarr_main_db_port)) {
-			$param .= " -p ".$dolibarr_main_db_port;
-		}
-		$param .= " -U ".$dolibarr_main_db_user;
-		$paramcrypted = $param;
-		$paramclear = $param;
-		/*if (!empty($dolibarr_main_db_pass))
-		{
-			$paramcrypted.=" -p".preg_replace('/./i','*',$dolibarr_main_db_pass);
-			$paramclear.=" -p".$dolibarr_main_db_pass;
-		}*/
-		$paramcrypted .= " -W";
-		$paramclear .= " -W";
-		// With psql:
-		$paramcrypted .= " -f";
-		$paramclear .= " -f";
-
-		echo $langs->trans("ImportPostgreSqlDesc");
-		print '<br>';
-		print '<textarea rows="1" id="restorecommand" class="centpercent">'.$langs->trans("ImportPostgreSqlCommand", $command, ($showpass ? $paramclear : $paramcrypted)).'</textarea><br>';
-		print ajax_autoselect('restorecommand');
-		//if (empty($_GET["showpass"]) && $dolibarr_main_db_pass) print '<br><a href="'.$_SERVER["PHP_SELF"].'?showpass=1&amp;radio_dump=postgresql_options">'.$langs->trans("UnHidePassword").'</a>';
-		//else print '<br><a href="'.$_SERVER["PHP_SELF"].'?showpass=0&amp;radio_dump=mysql_options">'.$langs->trans("HidePassword").'</a>';
-		print '</div>';
-
-		print '<br>';
+} elseif (in_array($type, array('pgsql'))) {
+	print '<fieldset id="postgresql_options">';
+	print '<legend>Restore PostgreSQL</legend>';
+	print '<div class="formelementrow">';
+	// Parameteres execution
+	$command = $db->getPathOfRestore();
+	if (preg_match("/\s/", $command)) {
+		$command = $command = escapeshellarg($command); // Use quotes on command
+	}
 
-		print '</fieldset>';
+	$param = " -d ".$dolibarr_main_db_name;
+	$param .= " -h ".$dolibarr_main_db_host;
+	if (!empty($dolibarr_main_db_port)) {
+		$param .= " -p ".$dolibarr_main_db_port;
 	}
+	$param .= " -U ".$dolibarr_main_db_user;
+	$paramcrypted = $param;
+	$paramclear = $param;
+	/*if (!empty($dolibarr_main_db_pass))
+	{
+		$paramcrypted.=" -p".preg_replace('/./i','*',$dolibarr_main_db_pass);
+		$paramclear.=" -p".$dolibarr_main_db_pass;
+	}*/
+	$paramcrypted .= " -W";
+	$paramclear .= " -W";
+	// With psql:
+	$paramcrypted .= " -f";
+	$paramclear .= " -f";
+
+	echo $langs->trans("ImportPostgreSqlDesc");
+	print '<br>';
+	print '<textarea rows="1" id="restorecommand" class="centpercent">'.$langs->trans("ImportPostgreSqlCommand", $command, ($showpass ? $paramclear : $paramcrypted)).'</textarea><br>';
+	print ajax_autoselect('restorecommand');
+	//if (empty($_GET["showpass"]) && $dolibarr_main_db_pass) print '<br><a href="'.$_SERVER["PHP_SELF"].'?showpass=1&amp;radio_dump=postgresql_options">'.$langs->trans("UnHidePassword").'</a>';
+	//else print '<br><a href="'.$_SERVER["PHP_SELF"].'?showpass=0&amp;radio_dump=mysql_options">'.$langs->trans("HidePassword").'</a>';
+	print '</div>';
+
+	print '<br>';
+
+	print '</fieldset>';
+}
 
 print '</div>';
 

+ 9 - 9
htdocs/install/check.php

@@ -131,7 +131,7 @@ if (!function_exists("session_id")) {
 if (!extension_loaded("mbstring")) {
 	$langs->load("errors");
 	print '<img src="../theme/eldy/img/warning.png" alt="Error" class="valignmiddle"> '.$langs->trans("ErrorPHPDoesNotSupport", "MBString")."<br>\n";
-// $checksok = 0; // If ko, just warning. So check must still be 1 (otherwise no way to install)
+	// $checksok = 0; // If ko, just warning. So check must still be 1 (otherwise no way to install)
 } else {
 	print '<img src="../theme/eldy/img/tick.png" alt="Ok" class="valignmiddle"> '.$langs->trans("PHPSupport", "MBString")."<br>\n";
 }
@@ -140,7 +140,7 @@ if (!extension_loaded("mbstring")) {
 if (!extension_loaded("json")) {
 	$langs->load("errors");
 	print '<img src="../theme/eldy/img/warning.png" alt="Error" class="valignmiddle"> '.$langs->trans("ErrorPHPDoesNotSupport", "JSON")."<br>\n";
-// $checksok = 0; // If ko, just warning. So check must still be 1 (otherwise no way to install)
+	// $checksok = 0; // If ko, just warning. So check must still be 1 (otherwise no way to install)
 } else {
 	print '<img src="../theme/eldy/img/tick.png" alt="Ok" class="valignmiddle"> '.$langs->trans("PHPSupport", "JSON")."<br>\n";
 }
@@ -149,7 +149,7 @@ if (!extension_loaded("json")) {
 if (!function_exists("imagecreate")) {
 	$langs->load("errors");
 	print '<img src="../theme/eldy/img/warning.png" alt="Error" class="valignmiddle"> '.$langs->trans("ErrorPHPDoesNotSupport", "GD")."<br>\n";
-// $checksok = 0;       // If ko, just warning. So check must still be 1 (otherwise no way to install)
+	// $checksok = 0;       // If ko, just warning. So check must still be 1 (otherwise no way to install)
 } else {
 	print '<img src="../theme/eldy/img/tick.png" alt="Ok" class="valignmiddle"> '.$langs->trans("PHPSupport", "GD")."<br>\n";
 }
@@ -158,7 +158,7 @@ if (!function_exists("imagecreate")) {
 if (!function_exists("curl_init")) {
 	$langs->load("errors");
 	print '<img src="../theme/eldy/img/warning.png" alt="Error" class="valignmiddle"> '.$langs->trans("ErrorPHPDoesNotSupport", "Curl")."<br>\n";
-// $checksok = 0;       // If ko, just warning. So check must still be 1 (otherwise no way to install)
+	// $checksok = 0;       // If ko, just warning. So check must still be 1 (otherwise no way to install)
 } else {
 	print '<img src="../theme/eldy/img/tick.png" alt="Ok" class="valignmiddle"> '.$langs->trans("PHPSupport", "Curl")."<br>\n";
 }
@@ -174,7 +174,7 @@ if (!function_exists("easter_date")) {
 if (!function_exists("simplexml_load_string")) {
 	$langs->load("errors");
 	print '<img src="../theme/eldy/img/warning.png" alt="Error" class="valignmiddle"> '.$langs->trans("ErrorPHPDoesNotSupport", "Xml")."<br>\n";
-// $checksok = 0;       // If ko, just warning. So check must still be 1 (otherwise no way to install)
+	// $checksok = 0;       // If ko, just warning. So check must still be 1 (otherwise no way to install)
 } else {
 	print '<img src="../theme/eldy/img/tick.png" alt="Ok" class="valignmiddle"> '.$langs->trans("PHPSupport", "Xml")."<br>\n";
 }
@@ -183,7 +183,7 @@ if (!function_exists("simplexml_load_string")) {
 if (!function_exists("utf8_encode")) {
 	$langs->load("errors");
 	print '<img src="../theme/eldy/img/warning.png" alt="Error" class="valignmiddle"> '.$langs->trans("ErrorPHPDoesNotSupport", "UTF8")."<br>\n";
-// $checksok = 0; // If ko, just warning. So check must still be 1 (otherwise no way to install)
+	// $checksok = 0; // If ko, just warning. So check must still be 1 (otherwise no way to install)
 } else {
 	print '<img src="../theme/eldy/img/tick.png" alt="Ok" class="valignmiddle"> '.$langs->trans("PHPSupport", "UTF8")."<br>\n";
 }
@@ -193,7 +193,7 @@ if (empty($_SERVER["SERVER_ADMIN"]) || $_SERVER["SERVER_ADMIN"] != 'doliwamp@loc
 	if (!function_exists("locale_get_primary_language") || !function_exists("locale_get_region")) {
 		$langs->load("errors");
 		print '<img src="../theme/eldy/img/warning.png" alt="Error" class="valignmiddle"> '.$langs->trans("ErrorPHPDoesNotSupport", "Intl")."<br>\n";
-	// $checksok = 0;		// If ko, just warning. So check must still be 1 (otherwise no way to install)
+		// $checksok = 0;		// If ko, just warning. So check must still be 1 (otherwise no way to install)
 	} else {
 		print '<img src="../theme/eldy/img/tick.png" alt="Ok" class="valignmiddle"> '.$langs->trans("PHPSupport", "Intl")."<br>\n";
 	}
@@ -203,7 +203,7 @@ if (empty($_SERVER["SERVER_ADMIN"]) || $_SERVER["SERVER_ADMIN"] != 'doliwamp@loc
 if (!function_exists("imap_open")) {
 	$langs->load("errors");
 	print '<img src="../theme/eldy/img/warning.png" alt="Error" class="valignmiddle"> '.$langs->trans("ErrorPHPDoesNotSupport", "IMAP")."<br>\n";
-// $checksok = 0;       // If ko, just warning. So check must still be 1 (otherwise no way to install)
+	// $checksok = 0;       // If ko, just warning. So check must still be 1 (otherwise no way to install)
 } else {
 	print '<img src="../theme/eldy/img/tick.png" alt="Ok" class="valignmiddle"> '.$langs->trans("PHPSupport", "IMAP")."<br>\n";
 }
@@ -212,7 +212,7 @@ if (!function_exists("imap_open")) {
 if (!class_exists('ZipArchive')) {
 	$langs->load("errors");
 	print '<img src="../theme/eldy/img/warning.png" alt="Error" class="valignmiddle"> '.$langs->trans("ErrorPHPDoesNotSupport", "ZIP")."<br>\n";
-// $checksok = 0;       // If ko, just warning. So check must still be 1 (otherwise no way to install)
+	// $checksok = 0;       // If ko, just warning. So check must still be 1 (otherwise no way to install)
 } else {
 	print '<img src="../theme/eldy/img/tick.png" alt="Ok" class="valignmiddle"> '.$langs->trans("PHPSupport", "ZIP")."<br>\n";
 }

+ 21 - 21
htdocs/install/fileconf.php

@@ -130,7 +130,7 @@ if (!empty($force_install_message)) {
 
 <table class="nobordernopadding<?php if ($force_install_noedit) {
 	print ' hidewhennoedit';
-} ?>">
+							   } ?>">
 
 	<tr>
 		<td colspan="3" class="label">
@@ -189,7 +189,7 @@ if (!empty($force_install_noedit)) {
 				   value="<?php print $dolibarr_main_data_root ?>"
 <?php if (!empty($force_install_noedit)) {
 			print ' disabled';
-		} ?>
+} ?>
 			>
 		</td>
 		<td class="comment"><?php
@@ -221,7 +221,7 @@ if (!empty($force_install_noedit)) {
 				   value="<?php print $dolibarr_main_url_root; ?> "
 <?php if (!empty($force_install_noedit)) {
 		print ' disabled';
-	}
+}
 ?>
 			>
 		</td>
@@ -244,11 +244,11 @@ if (!empty($force_install_noedit)) {
 							   id="main_force_https"
 							   name="main_force_https"
 				<?php if (!empty($force_install_mainforcehttps)) {
-			print ' checked';
-		} ?>
+					print ' checked';
+				} ?>
 				<?php if ($force_install_noedit == 2 && $force_install_mainforcehttps !== null) {
-			print ' disabled';
-		} ?>
+					print ' disabled';
+				} ?>
 			>
 		</td>
 		<td class="comment"><?php echo $langs->trans("CheckToForceHttps"); ?>
@@ -275,8 +275,8 @@ if (!empty($force_install_noedit)) {
 				   name="db_name"
 				   value="<?php echo (!empty($dolibarr_main_db_name)) ? $dolibarr_main_db_name : ($force_install_database ? $force_install_database : 'dolibarr'); ?>"
 				<?php if ($force_install_noedit == 2 && $force_install_database !== null) {
-		print ' disabled';
-	} ?>
+					print ' disabled';
+				} ?>
 			>
 		</td>
 		<td class="comment"><?php echo $langs->trans("DatabaseName"); ?></td>
@@ -388,8 +388,8 @@ if (!empty($force_install_noedit)) {
 			<select id="db_type"
 					name="db_type"
 				<?php if ($force_install_noedit == 2 && $force_install_type !== null) {
-			print ' disabled';
-		} ?>
+					print ' disabled';
+				} ?>
 			>
 				<?php print $option; ?>
 			</select>
@@ -407,8 +407,8 @@ if (!empty($force_install_noedit)) {
 				   name="db_host"
 				   value="<?php print(!empty($force_install_dbserver) ? $force_install_dbserver : (!empty($dolibarr_main_db_host) ? $dolibarr_main_db_host : 'localhost')); ?>"
 				<?php if ($force_install_noedit == 2 && $force_install_dbserver !== null) {
-			print ' disabled';
-		} ?>
+					print ' disabled';
+				} ?>
 			>
 		</td>
 		<td class="comment"><?php echo $langs->trans("ServerAddressDescription"); ?>
@@ -424,8 +424,8 @@ if (!empty($force_install_noedit)) {
 				   id="db_port"
 				   value="<?php print (!empty($force_install_port)) ? $force_install_port : $dolibarr_main_db_port; ?>"
 				<?php if ($force_install_noedit == 2 && $force_install_port !== null) {
-			print ' disabled';
-		} ?>
+					print ' disabled';
+				} ?>
 			>
 		</td>
 		<td class="comment"><?php echo $langs->trans("ServerPortDescription"); ?>
@@ -441,8 +441,8 @@ if (!empty($force_install_noedit)) {
 				   name="db_prefix"
 				   value="<?php echo(!empty($force_install_prefix) ? $force_install_prefix : (!empty($dolibarr_main_db_prefix) ? $dolibarr_main_db_prefix : 'llx_')); ?>"
 				<?php if ($force_install_noedit == 2 && $force_install_prefix !== null) {
-			print ' disabled';
-		} ?>
+					print ' disabled';
+				} ?>
 			>
 		</td>
 		<td class="comment"><?php echo $langs->trans("DatabasePrefixDescription"); ?></td>
@@ -502,7 +502,7 @@ if (!empty($force_install_noedit)) {
 					?>"
 				<?php if ($force_install_noedit == 2 && $force_install_databasepass !== null) {
 						print ' disabled';
-					} ?>
+				} ?>
 			>
 		</td>
 		<td class="comment"><?php echo $langs->trans("AdminPassword"); ?></td>
@@ -552,8 +552,8 @@ if (!empty($force_install_noedit)) {
 				   class="needroot"
 				   value="<?php print (!empty($force_install_databaserootlogin)) ? $force_install_databaserootlogin : (GETPOSTISSET('db_user_root') ? GETPOST('db_user_root') : (isset($db_user_root) ? $db_user_root : '')); ?>"
 				<?php if ($force_install_noedit > 0 && !empty($force_install_databaserootlogin)) {
-		print ' disabled';
-	} ?>
+					print ' disabled';
+				} ?>
 			>
 		</td>
 		<td class="comment"><?php echo $langs->trans("DatabaseRootLoginDescription"); ?>
@@ -593,7 +593,7 @@ if (!empty($force_install_noedit)) {
 					?>"
 				<?php if ($force_install_noedit > 0 && !empty($force_install_databaserootpass)) {
 						print ' disabled'; /* May be removed by javascript*/
-					} ?>
+				} ?>
 			>
 		</td>
 		<td class="comment"><?php echo $langs->trans("KeepEmptyIfNoPassword"); ?>

+ 1 - 1
htdocs/install/step1.php

@@ -645,7 +645,7 @@ if (!$error && $db->connected && $action == "set") {
 					$check2 = $newdb->getDefaultCollationDatabase();
 					dolibarr_install_syslog('step1: new database is using charset='.$check1.' collation='.$check2);
 
-				// If values differs, we save conf file again
+					// If values differs, we save conf file again
 					//if ($check1 != $dolibarr_main_db_character_set) dolibarr_install_syslog('step1: value for character_set is not the one asked for database creation', LOG_WARNING);
 					//if ($check2 != $dolibarr_main_db_collation)     dolibarr_install_syslog('step1: value for collation is not the one asked for database creation', LOG_WARNING);
 				} else {

+ 1 - 1
htdocs/install/upgrade2.php

@@ -3310,7 +3310,7 @@ function migrate_actioncomm_element($db, $langs, $conf)
 			if ($resql) {
 				$db->commit();
 
-			// DDL commands must not be inside a transaction
+				// DDL commands must not be inside a transaction
 				// We will drop at next version because a migrate should be runnable several times if it fails.
 				//$sqlDrop = "ALTER TABLE ".MAIN_DB_PREFIX."actioncomm DROP COLUMN ".$field;
 				//$db->query($sqlDrop);

+ 15 - 15
htdocs/modulebuilder/index.php

@@ -3137,7 +3137,7 @@ if (is_array($listofmodules) && count($listofmodules) > 0) {
 				$urlpage = $page;
 				if ($i++) {
 					$linktoenabledisable .= ' <a href="'.$urlpage.'" title="'.$langs->trans($page).'">'.img_picto(ucfirst($page), "setup").'</a>';
-				//    print '<a href="'.$page.'">'.ucfirst($page).'</a>&nbsp;';
+					//    print '<a href="'.$page.'">'.ucfirst($page).'</a>&nbsp;';
 				} else {
 					if (preg_match('/^([^@]+)@([^@]+)$/i', $urlpage, $regs)) {
 						$urltouse = dol_buildpath('/'.$regs[2].'/admin/'.$regs[1], 1);
@@ -3913,7 +3913,7 @@ if ($module == 'initmodule') {
 						*/
 						print '</datalist>';
 						print '</td>';
-					//} elseif ($key == 'propvalidate') {
+						//} elseif ($key == 'propvalidate') {
 						//	print '<td class="titlefieldcreate">'.$attribute.'</td><td class="valuefieldcreate maxwidth50"><input type="number" step="1" min="0" max="1" class="text maxwidth100" value="'.dol_escape_htmltag(GETPOST($key, 'alpha')).'"></td>';
 					} elseif ($key == 'propvisible') {
 						print '<td class="titlefieldcreate">'.$attribute.'</td><td class="valuefieldcreate"><input class="maxwidth200" type="text" name="'.$key.'" value="'.dol_escape_htmltag(GETPOSTISSET($key) ? GETPOST($key, 'alpha') : "1").'"></td>';
@@ -4933,18 +4933,18 @@ if ($module == 'initmodule') {
 					});
 					</script>';
 
-				/*print '<br>';
-				print '<br>';
-				print '<br>';
-				print '<span class="opacitymedium">'.$langs->trans("or").'</span>';
-				print '<br>';
-				print '<br>';
-				//print '<input type="checkbox" name="initfromtablecheck"> ';
-				print $langs->trans("InitStructureFromExistingTable");
-				print '<input type="text" name="initfromtablename" value="" placeholder="'.$langs->trans("TableName").'">';
-				print '<input type="submit" class="button smallpaddingimp" name="createtablearray" value="'.dol_escape_htmltag($langs->trans("GenerateCode")).'"'.($dirins ? '' : ' disabled="disabled"').'>';
-				print '<br>';
-				*/
+					/*print '<br>';
+					print '<br>';
+					print '<br>';
+					print '<span class="opacitymedium">'.$langs->trans("or").'</span>';
+					print '<br>';
+					print '<br>';
+					//print '<input type="checkbox" name="initfromtablecheck"> ';
+					print $langs->trans("InitStructureFromExistingTable");
+					print '<input type="text" name="initfromtablename" value="" placeholder="'.$langs->trans("TableName").'">';
+					print '<input type="submit" class="button smallpaddingimp" name="createtablearray" value="'.dol_escape_htmltag($langs->trans("GenerateCode")).'"'.($dirins ? '' : ' disabled="disabled"').'>';
+					print '<br>';
+					*/
 				} elseif ($tabdic == 'deletedictionary') {
 					// Delete dic tab
 					print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';
@@ -5394,7 +5394,7 @@ if ($module == 'initmodule') {
 				});
 				</script>';
 
-			// display permissions for each object
+				// display permissions for each object
 			} else {
 				$fullpathoffile = dol_buildpath($file, 0);
 

+ 1 - 1
htdocs/mrp/class/mo.class.php

@@ -1767,7 +1767,7 @@ class Mo extends CommonObject
 			$productstatic->fetch($line->fk_product);
 			$productstatic->load_virtual_stock();
 			$this->tpl['label'] .= $productstatic->getNomUrl(1);
-		//$this->tpl['label'].= ' - '.$productstatic->label;
+			//$this->tpl['label'].= ' - '.$productstatic->label;
 		} else {
 			// If origin MRP line is not a product, but another MRP
 			// TODO

+ 1 - 1
htdocs/paypal/lib/paypal.lib.php

@@ -556,7 +556,7 @@ function hash_call($methodName, $nvpStr)
 		$_SESSION['curl_error_no'] = curl_errno($ch);
 		$_SESSION['curl_error_msg'] = curl_error($ch);
 
-	//Execute the Error handling module to display errors.
+		//Execute the Error handling module to display errors.
 	} else {
 		//closing the curl
 		curl_close($ch);

+ 2 - 2
htdocs/product/class/product.class.php

@@ -2304,7 +2304,7 @@ class Product extends CommonObject
 					$price_min = price2num($newminprice, 'MU');
 					$price_min_ttc = price2num($newminprice) * (1 + ($newvat / 100));
 					$price_min_ttc = price2num($price_min_ttc, 'MU');
-				//print 'X'.$newminprice.'-'.$price_min;
+					//print 'X'.$newminprice.'-'.$price_min;
 				} else {
 					$price_min = 0;
 					$price_min_ttc = 0;
@@ -2688,7 +2688,7 @@ class Product extends CommonObject
 							$this->multiprices_tva_tx[$i] = $result ? $result["tva_tx"].($result ? ' ('.$result['default_vat_code'].')' : '') : null;
 							$this->multiprices_recuperableonly[$i] = $result ? $result["recuperableonly"] : null;
 
-						// Price by quantity
+							// Price by quantity
 							/*
 							 $this->prices_by_qty[$i]=$result["price_by_qty"];
 							 $this->prices_by_qty_id[$i]=$result["rowid"];

+ 2 - 2
htdocs/product/class/productcustomerprice.class.php

@@ -199,7 +199,7 @@ class ProductCustomerPrice extends CommonObject
 					$this->price_min = price2num($this->price_min, 'MU');
 					$this->price_min_ttc = price2num($this->price_min) * (1 + ($this->tva_tx / 100));
 					$this->price_min_ttc = price2num($this->price_min_ttc, 'MU');
-				// print 'X'.$newminprice.'-'.$price_min;
+					// print 'X'.$newminprice.'-'.$price_min;
 				} else {
 					$this->price_min = 0;
 					$this->price_min_ttc = 0;
@@ -677,7 +677,7 @@ class ProductCustomerPrice extends CommonObject
 					$this->price_min = price2num($this->price_min, 'MU');
 					$this->price_min_ttc = price2num($this->price_min) * (1 + ($this->tva_tx / 100));
 					$this->price_min_ttc = price2num($this->price_min_ttc, 'MU');
-				// print 'X'.$newminprice.'-'.$price_min;
+					// print 'X'.$newminprice.'-'.$price_min;
 				} else {
 					$this->price_min = 0;
 					$this->price_min_ttc = 0;

+ 1 - 1
htdocs/product/stock/massstockmove.php

@@ -247,7 +247,7 @@ if ($action == 'createmovements' && $user->hasRight('stock', 'mouvement', 'creer
 						$firstrecord = array_shift($arraybatchinfo);
 						$dlc = $firstrecord['eatby'];
 						$dluo = $firstrecord['sellby'];
-					//var_dump($batch);
+						//var_dump($batch);
 						//var_dump($arraybatchinfo);
 						//var_dump($firstrecord);
 						//var_dump($dlc);

+ 7 - 7
htdocs/product/stock/product.php

@@ -1356,15 +1356,15 @@ if (!$variants || getDolGlobalString('VARIANT_ALLOW_STOCK_MOVEMENT_ON_VARIANT_PA
 						<?php
 
 						$productCombination2ValuePairs = $comb2val->fetchByFkCombination($currcomb->id);
-				$iMax = count($productCombination2ValuePairs);
+						$iMax = count($productCombination2ValuePairs);
 
-				for ($i = 0; $i < $iMax; $i++) {
-					echo dol_htmlentities($productCombination2ValuePairs[$i]);
+						for ($i = 0; $i < $iMax; $i++) {
+							echo dol_htmlentities($productCombination2ValuePairs[$i]);
 
-					if ($i !== ($iMax - 1)) {
-						echo ', ';
-					}
-				} ?>
+							if ($i !== ($iMax - 1)) {
+								echo ', ';
+							}
+						} ?>
 					</td>
 					<td style="text-align: center;"><?php echo $prodstatic->getLibStatut(2, 0) ?></td>
 					<td style="text-align: center;"><?php echo $prodstatic->getLibStatut(2, 1) ?></td>

+ 7 - 7
htdocs/product/stock/replenish.php

@@ -839,7 +839,7 @@ while ($i < ($limit ? min($num, $limit) : $num)) {
 		if ($usevirtualstock) {
 			// If option to increase/decrease is not on an object validation, virtual stock may differs from physical stock.
 			$stock = $prod->stock_theorique;
-		//TODO $stockwarehouse = $prod->stock_warehouse[$fk_entrepot]->;
+			//TODO $stockwarehouse = $prod->stock_warehouse[$fk_entrepot]->;
 		} else {
 			$stock = $prod->stock_reel;
 			$stockwarehouse = $prod->stock_warehouse[$fk_entrepot]->real;
@@ -891,12 +891,12 @@ while ($i < ($limit ? min($num, $limit) : $num)) {
 		$picto = '';
 		if ($ordered > 0) {
 			$stockforcompare = ($usevirtualstock ? $stock : $stock + $ordered);
-		/*if ($stockforcompare >= $desiredstock)
-		{
-		$picto = img_picto('', 'help');
-		} else {
-		$picto = img_picto('', 'help');
-		}*/
+			/*if ($stockforcompare >= $desiredstock)
+			{
+			$picto = img_picto('', 'help');
+			} else {
+			$picto = img_picto('', 'help');
+			}*/
 		} else {
 			$picto = img_picto($langs->trans("NoPendingReceptionOnSupplierOrder"), 'help');
 		}

+ 1 - 1
htdocs/product/stock/stocktransfer/class/stocktransferline.class.php

@@ -476,7 +476,7 @@ class StockTransferLine extends CommonObjectLine
 					$firstrecord = array_shift($arraybatchinfo);
 					$dlc = $firstrecord['eatby'];
 					$dluo = $firstrecord['sellby'];
-				//var_dump($batch); var_dump($arraybatchinfo); var_dump($firstrecord); var_dump($dlc); var_dump($dluo); exit;
+					//var_dump($batch); var_dump($arraybatchinfo); var_dump($firstrecord); var_dump($dlc); var_dump($dluo); exit;
 				} else {
 					$dlc = '';
 					$dluo = '';

+ 1 - 1
htdocs/projet/class/project.class.php

@@ -2494,7 +2494,7 @@ class Project extends CommonObject
 			$return .= '<br>';
 			if ($this->public) {
 				$return .= img_picto($langs->trans('Visibility').': '.$langs->trans('SharedProject'), 'world', 'class="paddingrightonly valignmiddle"');
-			//print $langs->trans('SharedProject');
+				//print $langs->trans('SharedProject');
 			} else {
 				$return .= img_picto($langs->trans('Visibility').': '.$langs->trans('PrivateProject'), 'private', 'class="paddingrightonly valignmiddle"');
 				//print $langs->trans('PrivateProject');

+ 1 - 1
htdocs/projet/ganttview.php

@@ -297,7 +297,7 @@ if (count($tasksarray) > 0) {
 		if ($val->fk_parent != 0 && $task->hasChildren() > 0) {
 			$tasks[$taskcursor]['task_is_group'] = 1;
 			$tasks[$taskcursor]['task_css'] = 'ggroupblack';
-		//$tasks[$taskcursor]['task_css'] = 'gtaskblue';
+			//$tasks[$taskcursor]['task_css'] = 'gtaskblue';
 		} elseif ($task->hasChildren() > 0) {
 			$tasks[$taskcursor]['task_is_group'] = 1;
 			//$tasks[$taskcursor]['task_is_group'] = 0;

+ 1 - 1
htdocs/projet/list.php

@@ -1773,7 +1773,7 @@ while ($i < $imaxinloop) {
 			print '<td class="center">';
 			if ($obj->public) {
 				print img_picto($langs->trans('SharedProject'), 'world', 'class="paddingrightonly"');
-			//print $langs->trans('SharedProject');
+				//print $langs->trans('SharedProject');
 			} else {
 				print img_picto($langs->trans('PrivateProject'), 'private', 'class="paddingrightonly"');
 				//print $langs->trans('PrivateProject');

+ 1 - 1
htdocs/projet/tasks/time.php

@@ -2816,7 +2816,7 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0 || $allprojectforuser
 					print '<td class="right">' . convertSecondToTime($totalarray['totalduration'], 'allhourmin') . '</td>';
 				} elseif (isset($totalarray['totalvaluefield']) && $totalarray['totalvaluefield'] == $i) {
 					print '<td class="right">' . price($totalarray['totalvalue']) . '</td>';
-				//} elseif ($totalarray['totalvaluebilledfield'] == $i) { print '<td class="center">'.price($totalarray['totalvaluebilled']).'</td>';
+					//} elseif ($totalarray['totalvaluebilledfield'] == $i) { print '<td class="center">'.price($totalarray['totalvaluebilled']).'</td>';
 				} else {
 					print '<td></td>';
 				}

+ 1 - 1
htdocs/public/company/new.php

@@ -244,7 +244,7 @@ if (empty($reshook) && $action == 'add') {
 					$urlback = $backtopage;
 				} elseif (getDolGlobalString('MEMBER_URL_REDIRECT_SUBSCRIPTION')) {
 					$urlback = $conf->global->MEMBER_URL_REDIRECT_SUBSCRIPTION;
-				// TODO Make replacement of __AMOUNT__, etc...
+					// TODO Make replacement of __AMOUNT__, etc...
 				} else {
 					$urlback = $_SERVER["PHP_SELF"] . "?action=added&token=" . newToken();
 				}

+ 1 - 1
htdocs/public/members/new.php

@@ -440,7 +440,7 @@ if (empty($reshook) && $action == 'add') {
 					$urlback = $backtopage;
 				} elseif (getDolGlobalString('MEMBER_URL_REDIRECT_SUBSCRIPTION')) {
 					$urlback = $conf->global->MEMBER_URL_REDIRECT_SUBSCRIPTION;
-				// TODO Make replacement of __AMOUNT__, etc...
+					// TODO Make replacement of __AMOUNT__, etc...
 				} else {
 					$urlback = $_SERVER["PHP_SELF"]."?action=added&token=".newToken();
 				}

+ 1 - 1
htdocs/public/partnership/new.php

@@ -423,7 +423,7 @@ if (empty($reshook) && $action == 'add') {
 					$urlback = $backtopage;
 				} elseif (getDolGlobalString('PARTNERSHIP_URL_REDIRECT_SUBSCRIPTION')) {
 					$urlback = $conf->global->PARTNERSHIP_URL_REDIRECT_SUBSCRIPTION;
-				// TODO Make replacement of __AMOUNT__, etc...
+					// TODO Make replacement of __AMOUNT__, etc...
 				} else {
 					$urlback = $_SERVER["PHP_SELF"]."?action=added&token=".newToken();
 				}

+ 25 - 25
htdocs/public/payment/newpayment.php

@@ -382,7 +382,7 @@ if ($action == 'dopayment') {
 		if (empty($PAYPAL_API_PRICE) || !is_numeric($PAYPAL_API_PRICE)) {
 			$mesg = $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Amount"));
 			$action = '';
-		// } elseif (empty($EMAIL)) { $mesg=$langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("YourEMail"));
+			// } elseif (empty($EMAIL)) { $mesg=$langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("YourEMail"));
 			// } elseif (! isValidEMail($EMAIL)) { $mesg=$langs->trans("ErrorBadEMail",$EMAIL);
 		} elseif (!$origfulltag) {
 			$mesg = $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("PaymentCode"));
@@ -2542,29 +2542,29 @@ if (preg_match('/^dopayment/', $action)) {			// If we choosed/click on the payme
 							billing_details: {
 								name: 'test'
 								<?php if (GETPOST('email', 'alpha') || (is_object($object) && is_object($object->thirdparty) && !empty($object->thirdparty->email))) {
-						?>, email: '<?php echo dol_escape_js(GETPOST('email', 'alpha') ? GETPOST('email', 'alpha') : $object->thirdparty->email); ?>'<?php
-					} ?>
+									?>, email: '<?php echo dol_escape_js(GETPOST('email', 'alpha') ? GETPOST('email', 'alpha') : $object->thirdparty->email); ?>'<?php
+								} ?>
 								<?php if (is_object($object) && is_object($object->thirdparty) && !empty($object->thirdparty->phone)) {
-						?>, phone: '<?php echo dol_escape_js($object->thirdparty->phone); ?>'<?php
-					} ?>
+									?>, phone: '<?php echo dol_escape_js($object->thirdparty->phone); ?>'<?php
+								} ?>
 								<?php if (is_object($object) && is_object($object->thirdparty)) {
-						?>, address: {
+									?>, address: {
 									city: '<?php echo dol_escape_js($object->thirdparty->town); ?>',
 									<?php if ($object->thirdparty->country_code) {
-							?>country: '<?php echo dol_escape_js($object->thirdparty->country_code); ?>',<?php
-						} ?>
+										?>country: '<?php echo dol_escape_js($object->thirdparty->country_code); ?>',<?php
+									} ?>
 									line1: '<?php echo dol_escape_js(preg_replace('/\s\s+/', ' ', $object->thirdparty->address)); ?>',
 									postal_code: '<?php echo dol_escape_js($object->thirdparty->zip); ?>'
 									}
 									<?php
-					} ?>
+								} ?>
 							}
 							},
 							save_payment_method:<?php if ($stripecu) {
-						print 'true';
-					} else {
-						print 'false';
-					} ?>	/* true when a customer was provided when creating payment intent. true ask to save the card */
+								print 'true';
+												} else {
+													print 'false';
+												} ?>	/* true when a customer was provided when creating payment intent. true ask to save the card */
 						},
 					}
 					).then(function(result) {
@@ -2636,29 +2636,29 @@ if (preg_match('/^dopayment/', $action)) {			// If we choosed/click on the payme
 							billing_details: {
 								name: cardholderName.value
 								<?php if (GETPOST('email', 'alpha') || (is_object($object) && is_object($object->thirdparty) && !empty($object->thirdparty->email))) {
-						?>, email: '<?php echo dol_escape_js(GETPOST('email', 'alpha') ? GETPOST('email', 'alpha') : $object->thirdparty->email); ?>'<?php
-					} ?>
+									?>, email: '<?php echo dol_escape_js(GETPOST('email', 'alpha') ? GETPOST('email', 'alpha') : $object->thirdparty->email); ?>'<?php
+								} ?>
 								<?php if (is_object($object) && is_object($object->thirdparty) && !empty($object->thirdparty->phone)) {
-						?>, phone: '<?php echo dol_escape_js($object->thirdparty->phone); ?>'<?php
-					} ?>
+									?>, phone: '<?php echo dol_escape_js($object->thirdparty->phone); ?>'<?php
+								} ?>
 								<?php if (is_object($object) && is_object($object->thirdparty)) {
-						?>, address: {
+									?>, address: {
 									city: '<?php echo dol_escape_js($object->thirdparty->town); ?>',
 									<?php if ($object->thirdparty->country_code) {
-							?>country: '<?php echo dol_escape_js($object->thirdparty->country_code); ?>',<?php
-						} ?>
+										?>country: '<?php echo dol_escape_js($object->thirdparty->country_code); ?>',<?php
+									} ?>
 									line1: '<?php echo dol_escape_js(preg_replace('/\s\s+/', ' ', $object->thirdparty->address)); ?>',
 									postal_code: '<?php echo dol_escape_js($object->thirdparty->zip); ?>'
 									}
 									<?php
-					} ?>
+								} ?>
 							}
 							},
 							save_payment_method:<?php if ($stripecu) {
-						print 'true';
-					} else {
-						print 'false';
-					} ?>	/* true when a customer was provided when creating payment intent. true ask to save the card */
+								print 'true';
+												} else {
+													print 'false';
+												} ?>	/* true when a customer was provided when creating payment intent. true ask to save the card */
 					}
 					).then(function(result) {
 						console.log(result);

+ 1 - 1
htdocs/public/payment/paymentok.php

@@ -1867,7 +1867,7 @@ if ($ispaymentok) {
 		$result = $mailfile->sendfile();
 		if ($result) {
 			dol_syslog("EMail sent to ".$sendto, LOG_DEBUG, 0, '_payment');
-		//dol_syslog("EMail sent to ".$sendto, LOG_DEBUG, 0);
+			//dol_syslog("EMail sent to ".$sendto, LOG_DEBUG, 0);
 		} else {
 			dol_syslog("Failed to send EMail to ".$sendto, LOG_ERR, 0, '_payment');
 			//dol_syslog("Failed to send EMail to ".$sendto, LOG_ERR, 0);

+ 1 - 1
htdocs/public/project/new.php

@@ -397,7 +397,7 @@ if (empty($reshook) && $action == 'add') {
 					$urlback = $backtopage;
 				} elseif (getDolGlobalString('PROJECT_URL_REDIRECT_LEAD')) {
 					$urlback = $conf->global->PROJECT_URL_REDIRECT_LEAD;
-				// TODO Make replacement of __AMOUNT__, etc...
+					// TODO Make replacement of __AMOUNT__, etc...
 				} else {
 					$urlback = $_SERVER["PHP_SELF"]."?action=added&token=".newToken();
 				}

+ 1 - 1
htdocs/public/test/test_arrays.php

@@ -89,7 +89,7 @@ if (empty($usedolheader)) {
 		*/
 
 		llxHeader('', '', '', '', 0, 0, $arrayjs, $arraycss);
-	}
+}
 
 
 // CONTENT

+ 1 - 1
htdocs/reception/list.php

@@ -414,7 +414,7 @@ if (empty($reshook)) {
 							$discountid = $discount->create($user);
 							if ($discountid > 0) {
 								$result = $objecttmp->insert_discount($discountid);
-							//$result=$discount->link_to_invoice($lineid,$id);
+								//$result=$discount->link_to_invoice($lineid,$id);
 							} else {
 								setEventMessages($discount->error, $discount->errors, 'errors');
 								$error++;

+ 2 - 2
htdocs/reception/tpl/linkedobjectblock.tpl.php

@@ -51,8 +51,8 @@ foreach ($linkedObjectBlock as $key => $objectlink) {
 	<tr class="<?php echo $trclass; ?>">
 		<td class="linkedcol-element tdoverflowmax100"><?php echo $langs->trans("Reception"); ?>
 		<?php if (!empty($showImportButton) && $conf->global->MAIN_ENABLE_IMPORT_LINKED_OBJECT_LINES) {
-		print '<a class="objectlinked_importbtn" href="'.$objectlink->getNomUrl(0, '', 0, 1).'&amp;action=selectlines"  data-element="'.$objectlink->element.'"  data-id="'.$objectlink->id.'"  > <i class="fa fa-indent"></i> </a';
-	} ?>
+			print '<a class="objectlinked_importbtn" href="'.$objectlink->getNomUrl(0, '', 0, 1).'&amp;action=selectlines"  data-element="'.$objectlink->element.'"  data-id="'.$objectlink->id.'"  > <i class="fa fa-indent"></i> </a';
+		} ?>
 		</td>
 		<td class="linkedcol-name tdoverflowmax150"><?php echo $objectlink->getNomUrl(1); ?></td>
 		<td class="linkedcol-ref tdoverflowmax100" title="<?php echo dol_escape_htmltag($objectlink->ref_supplier); ?>"><?php echo dol_escape_htmltag($objectlink->ref_supplier); ?></td>

+ 1 - 1
htdocs/salaries/card.php

@@ -452,7 +452,7 @@ if ($action == "update_extras" && $permissiontoadd) {
 	if (GETPOSTISSET($attributekeylong.'day') && GETPOSTISSET($attributekeylong.'month') && GETPOSTISSET($attributekeylong.'year')) {
 		// This is properties of a date
 		$object->array_options['options_'.$attributekey] = dol_mktime(GETPOST($attributekeylong.'hour', 'int'), GETPOST($attributekeylong.'min', 'int'), GETPOST($attributekeylong.'sec', 'int'), GETPOST($attributekeylong.'month', 'int'), GETPOST($attributekeylong.'day', 'int'), GETPOST($attributekeylong.'year', 'int'));
-	//var_dump(dol_print_date($object->array_options['options_'.$attributekey]));exit;
+		//var_dump(dol_print_date($object->array_options['options_'.$attributekey]));exit;
 	} else {
 		$object->array_options['options_'.$attributekey] = GETPOST($attributekeylong, 'alpha');
 	}

+ 1 - 1
htdocs/societe/checkvat/checkVatPopup.php

@@ -118,7 +118,7 @@ if (!$vatNumber) {
 		}
 		print $langs->trans("VATIntraSyntaxIsValid").': <span class="error">'.$langs->trans("No").'</span> (Might be a non europeen VAT)<br>';
 		print $langs->trans("ValueIsValid").': <span class="error">'.$langs->trans("No").'</span> (Might be a non europeen VAT)<br>';
-	//$messagetoshow=$soapclient->response;
+		//$messagetoshow=$soapclient->response;
 	} else {
 		// Syntaxe ok
 		if ($result['requestDate']) {

+ 1 - 1
htdocs/societe/list.php

@@ -555,7 +555,7 @@ $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX."c_stcomm as st ON s.fk_stcomm = st.id";
 // We'll need this table joined to the select in order to filter by sale
 if ($search_sale == -2) {
 	$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON sc.fk_soc = s.rowid";
-//elseif ($search_sale || (empty($user->rights->societe->client->voir) && (empty($conf->global->MAIN_USE_ADVANCED_PERMS) || empty($user->rights->societe->client->readallthirdparties_advance)) && !$socid)) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
+	//elseif ($search_sale || (empty($user->rights->societe->client->voir) && (empty($conf->global->MAIN_USE_ADVANCED_PERMS) || empty($user->rights->societe->client->readallthirdparties_advance)) && !$socid)) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
 } elseif (!empty($search_sale) && $search_sale != '-1' || (!$user->hasRight('societe', 'client', 'voir') && !$socid)) {
 	$sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
 }

+ 1 - 1
htdocs/societe/paymentmodes.php

@@ -707,7 +707,7 @@ if (empty($reshook)) {
 
 			if (empty($newsup)) {
 				$sql = "DELETE FROM ".MAIN_DB_PREFIX."oauth_token WHERE fk_soc = ".$object->id." AND service = '".$db->escape($tmpservice)."' AND entity = ".$conf->entity;
-			// TODO Add site and site_account on oauth_token table
+				// TODO Add site and site_account on oauth_token table
 				//$sql = "DELETE FROM ".MAIN_DB_PREFIX."oauth_token WHERE site = 'stripe' AND (site_account IS NULL or site_account = '".$db->escape($site_account)."') AND fk_soc = ".((int) $object->id)." AND service = '".$db->escape($service)."' AND entity = ".$conf->entity;
 			} else {
 				try {

+ 38 - 38
htdocs/ticket/card.php

@@ -755,57 +755,57 @@ if ($action == 'create' || $action == 'presend') {
 	$formticket->withcancel = 1;
 
 	$formticket->showForm(1, 'create', 0, null, $action);
-/*} elseif ($action == 'edit' && $user->rights->ticket->write && $object->status < Ticket::STATUS_CLOSED) {
-$formticket = new FormTicket($db);
+	/*} elseif ($action == 'edit' && $user->rights->ticket->write && $object->status < Ticket::STATUS_CLOSED) {
+	$formticket = new FormTicket($db);
 
-$head = ticket_prepare_head($object);
+	$head = ticket_prepare_head($object);
 
-print '<form method="POST" name="form_ticket" id="form_edit_ticket" action="'.$_SERVER['PHP_SELF'].'?track_id='.$object->track_id.'">';
-print '<input type="hidden" name="token" value="'.newToken().'">';
-print '<input type="hidden" name="action" value="update">';
-print '<input type="hidden" name="tack_id" value="'.$object->track_id.'">';
+	print '<form method="POST" name="form_ticket" id="form_edit_ticket" action="'.$_SERVER['PHP_SELF'].'?track_id='.$object->track_id.'">';
+	print '<input type="hidden" name="token" value="'.newToken().'">';
+	print '<input type="hidden" name="action" value="update">';
+	print '<input type="hidden" name="tack_id" value="'.$object->track_id.'">';
 
-print dol_get_fiche_head($head, 'card', $langs->trans('Ticket'), 0, 'ticket');
+	print dol_get_fiche_head($head, 'card', $langs->trans('Ticket'), 0, 'ticket');
 
-print '<div class="fichecenter2">';
-print '<table class="border" width="100%">';
+	print '<div class="fichecenter2">';
+	print '<table class="border" width="100%">';
 
-// Type
-print '<tr><td class="titlefield"><span class="fieldrequired"><label for="selecttype_code">'.$langs->trans("TicketTypeRequest").'</span></label></td><td>';
-$formticket->selectTypesTickets((GETPOSTISSET('type_code') ? GETPOST('type_code') : $object->type_code), 'type_code', '', '2');
-print '</td></tr>';
+	// Type
+	print '<tr><td class="titlefield"><span class="fieldrequired"><label for="selecttype_code">'.$langs->trans("TicketTypeRequest").'</span></label></td><td>';
+	$formticket->selectTypesTickets((GETPOSTISSET('type_code') ? GETPOST('type_code') : $object->type_code), 'type_code', '', '2');
+	print '</td></tr>';
 
-// Severity
-print '<tr><td><span class="fieldrequired"><label for="selectseverity_code">'.$langs->trans("TicketSeverity").'</span></label></td><td>';
-$formticket->selectSeveritiesTickets((GETPOSTISSET('severity_code') ? GETPOST('severity_code') : $object->severity_code), 'severity_code', '', '2');
-print '</td></tr>';
+	// Severity
+	print '<tr><td><span class="fieldrequired"><label for="selectseverity_code">'.$langs->trans("TicketSeverity").'</span></label></td><td>';
+	$formticket->selectSeveritiesTickets((GETPOSTISSET('severity_code') ? GETPOST('severity_code') : $object->severity_code), 'severity_code', '', '2');
+	print '</td></tr>';
 
-// Group
-print '<tr><td><span class="fieldrequired"><label for="selectcategory_code">'.$langs->trans("TicketCategory").'</span></label></td><td>';
-$formticket->selectGroupTickets((GETPOSTISSET('category_code') ? GETPOST('category_code') : $object->category_code), 'category_code', '', '2');
-print '</td></tr>';
+	// Group
+	print '<tr><td><span class="fieldrequired"><label for="selectcategory_code">'.$langs->trans("TicketCategory").'</span></label></td><td>';
+	$formticket->selectGroupTickets((GETPOSTISSET('category_code') ? GETPOST('category_code') : $object->category_code), 'category_code', '', '2');
+	print '</td></tr>';
 
-// Subject
-print '<tr><td><label for="subject"><span class="fieldrequired">'.$langs->trans("Subject").'</span></label></td><td>';
-print '<input class="text minwidth200" id="subject" name="subject" value="'.dol_escape_htmltag(GETPOSTISSET('subject') ? GETPOST('subject', 'alpha') : $object->subject).'" />';
-print '</td></tr>';
+	// Subject
+	print '<tr><td><label for="subject"><span class="fieldrequired">'.$langs->trans("Subject").'</span></label></td><td>';
+	print '<input class="text minwidth200" id="subject" name="subject" value="'.dol_escape_htmltag(GETPOSTISSET('subject') ? GETPOST('subject', 'alpha') : $object->subject).'" />';
+	print '</td></tr>';
 
-// Other attributes
-$parameters = array('colspan' => ' colspan="3"', 'colspanvalue' => '3');
-$reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
-print $hookmanager->resPrint;
-if (empty($reshook)) {
-print $object->showOptionals($extrafields, 'edit');
-}
+	// Other attributes
+	$parameters = array('colspan' => ' colspan="3"', 'colspanvalue' => '3');
+	$reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
+	print $hookmanager->resPrint;
+	if (empty($reshook)) {
+	print $object->showOptionals($extrafields, 'edit');
+	}
 
-print '</table>';
-print '</div>';
+	print '</table>';
+	print '</div>';
 
-print dol_get_fiche_end();
+	print dol_get_fiche_end();
 
-print $form->buttonsSaveCancel();
+	print $form->buttonsSaveCancel();
 
-print '</form>'; */
+	print '</form>'; */
 } elseif (empty($action) || $action == 'view' || $action == 'addlink' || $action == 'dellink' || $action == 'presend' || $action == 'presend_addmessage' || $action == 'close' || $action == 'abandon' || $action == 'delete' || $action == 'editcustomer' || $action == 'progression' || $action == 'categories' || $action == 'reopen'
 	|| $action== 'edit_contrat' || $action == 'editsubject' || $action == 'edit_extras' || $action == 'update_extras' || $action == 'edit_extrafields' || $action == 'set_extrafields' || $action == 'classify' || $action == 'sel_contract' || $action == 'edit_message_init' || $action == 'set_status' || $action == 'dellink') {
 	if ($res > 0) {

+ 2 - 2
htdocs/ticket/tpl/linkedobjectblock.tpl.php

@@ -47,8 +47,8 @@ foreach ($linkedObjectBlock as $key => $objectlink) {
 	<tr class="<?php echo $trclass; ?>" >
 		<td class="linkedcol-element tdoverflowmax100"><?php echo $langs->trans("Ticket"); ?>
 		<?php if (!empty($showImportButton) && $conf->global->MAIN_ENABLE_IMPORT_LINKED_OBJECT_LINES) {
-		print '<a class="objectlinked_importbtn" href="'.$objectlink->getNomUrl(0, '', 0, 1).'&amp;action=selectlines"  data-element="'.$objectlink->element.'"  data-id="'.$objectlink->id.'"  > <i class="fa fa-indent"></i> </a';
-	} ?>
+			print '<a class="objectlinked_importbtn" href="'.$objectlink->getNomUrl(0, '', 0, 1).'&amp;action=selectlines"  data-element="'.$objectlink->element.'"  data-id="'.$objectlink->id.'"  > <i class="fa fa-indent"></i> </a';
+		} ?>
 		</td>
 		<td class="linkedcol-name tdoverflowmax150"><?php echo $objectlink->getNomUrl(1); ?></td>
 		<td class="linkedcol-ref center"><?php echo $objectlink->ref_client; ?></td>

+ 1 - 1
htdocs/user/card.php

@@ -2321,7 +2321,7 @@ if ($action == 'create' || $action == 'adduserldap') {
 			print '<td>'.$form->editfieldkey('Employee', 'employee', '', $object, 0).'</td><td>';
 			if ($caneditfield) {
 				print '<input type="checkbox" name="employee" value="1"'.($object->employee ? ' checked="checked"' : '').'>';
-			//print $form->selectyesno("employee", $object->employee, 1);
+				//print $form->selectyesno("employee", $object->employee, 1);
 			} else {
 				print '<input type="checkbox" name="employee" disabled value="1"'.($object->employee ? ' checked="checked"' : '').'>';
 				/*if ($object->employee) {

+ 8 - 8
htdocs/variants/combinations.php

@@ -518,7 +518,7 @@ if (!empty($id) || !empty($ref)) {
 				$listofvariantselected .= '<div class="select2-container-multi-dolibarr" style="width: 90%;"><ul class="select2-choices-dolibarr">' . implode(' ', $toprint) . '</ul></div>';
 			}
 			$listofvariantselected .= '</div>';
-		//print dol_get_fiche_end();
+			//print dol_get_fiche_end();
 		} else {
 			$title = $langs->trans('EditProductCombination');
 		}
@@ -654,12 +654,12 @@ if (!empty($id) || !empty($ref)) {
 					</select>
 					<?php
 					$htmltext = $langs->trans("GoOnMenuToCreateVairants", $langs->transnoentities("Product"), $langs->transnoentities("VariantAttributes"));
-			print $form->textwithpicto('', $htmltext);
-			/*
-			print ' &nbsp; &nbsp; <a href="'.DOL_URL_ROOT.'/variants/create.php?action=create&backtopage='.urlencode($_SERVER["PHP_SELF"].'?action=add&token='.newToken().'&id='.$object->id).'">';
-			print $langs->trans("Create");
-			print '</a>';
-			*/ ?>
+					print $form->textwithpicto('', $htmltext);
+					/*
+					print ' &nbsp; &nbsp; <a href="'.DOL_URL_ROOT.'/variants/create.php?action=create&backtopage='.urlencode($_SERVER["PHP_SELF"].'?action=add&token='.newToken().'&id='.$object->id).'">';
+					print $langs->trans("Create");
+					print '</a>';
+					*/ ?>
 				</td>
 			</tr>
 			<tr>
@@ -778,7 +778,7 @@ if (!empty($id) || !empty($ref)) {
 		<div style="text-align: center">
 		<input type="submit" name="create" <?php if (!is_array($productCombination2ValuePairs1)) {
 			print ' disabled="disabled"';
-		} ?> value="<?php echo $action == 'add' ? $langs->trans('Create') : $langs->trans("Save") ?>" class="button button-save">
+										   } ?> value="<?php echo $action == 'add' ? $langs->trans('Create') : $langs->trans("Save") ?>" class="button button-save">
 		&nbsp;
 		<input type="submit" name="cancel" value="<?php echo $langs->trans("Cancel"); ?>" class="button button-cancel">
 		</div>

+ 2 - 2
htdocs/variants/tpl/productattributevalueline_create.tpl.php

@@ -53,8 +53,8 @@ $nolinesbefore = (count($this->lines) == 0 || $forcetoshowtitlelines);
 	?>
 	<td class="nobottom linecolref">
 		<?php $coldisplay++; if ($nolinesbefore) {
-		echo $langs->trans('Ref') . ': ';
-	} ?>
+			echo $langs->trans('Ref') . ': ';
+		} ?>
 		<input type="text" name="line_ref" id="line_ref" class="flat" value="<?php echo(GETPOSTISSET("line_ref") ? GETPOST("line_ref", 'alpha', 2) : ''); ?>" autofocus>
 		<?php
 		if (is_object($hookmanager)) {

+ 13 - 13
htdocs/website/index.php

@@ -5140,22 +5140,22 @@ if ((empty($action) || $action == 'preview' || $action == 'createfromclone' || $
 
 		print $out;
 
-	/*file_put_contents($filetpl, $out);
-	dolChmod($filetpl);
+		/*file_put_contents($filetpl, $out);
+		dolChmod($filetpl);
 
-	// Output file on browser
-	dol_syslog("index.php include $filetpl $filename content-type=$type");
-	$original_file_osencoded=dol_osencode($filetpl);    // New file name encoded in OS encoding charset
+		// Output file on browser
+		dol_syslog("index.php include $filetpl $filename content-type=$type");
+		$original_file_osencoded=dol_osencode($filetpl);    // New file name encoded in OS encoding charset
 
-	// This test if file exists should be useless. We keep it to find bug more easily
-	if (! file_exists($original_file_osencoded))
-	{
-	dol_print_error(0,$langs->trans("ErrorFileDoesNotExists",$original_file));
-	exit;
-	}
+		// This test if file exists should be useless. We keep it to find bug more easily
+		if (! file_exists($original_file_osencoded))
+		{
+		dol_print_error(0,$langs->trans("ErrorFileDoesNotExists",$original_file));
+		exit;
+		}
 
-	//include_once $original_file_osencoded;
-	*/
+		//include_once $original_file_osencoded;
+		*/
 
 		/*print '<iframe class="websiteiframenoborder centpercent" src="'.DOL_URL_ROOT.'/public/website/index.php?website='.$websitekey.'&pageid='.$pageid.'"/>';
 		print '</iframe>';*/