Completed
Branch develop (404fac)
by
unknown
20:18
created
htdocs/bom/tpl/objectline_create.tpl.php 1 patch
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -44,7 +44,9 @@  discard block
 block discarded – undo
44 44
 	$forceall = 0;
45 45
 }
46 46
 
47
-if (empty($filtertype))	$filtertype = 0;
47
+if (empty($filtertype)) {
48
+	$filtertype = 0;
49
+}
48 50
 if (!empty($object->element) && $object->element == 'contrat' && empty($conf->global->STOCK_SUPPORT_SERVICES)) {
49 51
 	$filtertype = -1;
50 52
 }
@@ -84,7 +86,9 @@  discard block
 block discarded – undo
84 86
 		print '<td class="linecollost right">' . $form->textwithpicto($langs->trans('ManufacturingEfficiency'), $langs->trans('ValueOfMeansLoss')) . '</td>';
85 87
 	} else {
86 88
 		print '<td class="linecolunit right">' . $form->textwithpicto($langs->trans('Unit'), '').'</td>';
87
-		if (isModEnabled('workstation')) print '<td class="linecolworkstation right">' .  $form->textwithpicto($langs->trans('Workstation'), '') . '</td>';
89
+		if (isModEnabled('workstation')) {
90
+			print '<td class="linecolworkstation right">' .  $form->textwithpicto($langs->trans('Workstation'), '') . '</td>';
91
+		}
88 92
 		print '<td class="linecoltotalcost right">' .  $form->textwithpicto($langs->trans('TotalCost'), '') . '</td>';
89 93
 	}
90 94
 
Please login to merge, or discard this patch.
htdocs/mrp/tpl/linkedobjectblock.tpl.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -77,7 +77,9 @@
 block discarded – undo
77 77
 			$k = 0;
78 78
 			if ($resql) {
79 79
 				$obj = $db->fetch_object($resql);
80
-				if ($obj->rowid && $obj->rowid > 0) $k = $obj->rowid;
80
+				if ($obj->rowid && $obj->rowid > 0) {
81
+					$k = $obj->rowid;
82
+				}
81 83
 			}
82 84
 			echo '<a class="reposition" href="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&action=dellink&token=' . newToken() . '&dellinkid=' . $k . '">' . img_picto($langs->transnoentitiesnoconv("RemoveLink"), 'unlink') . '</a>';
83 85
 			echo '</td>';
Please login to merge, or discard this patch.
htdocs/commande/card.php 1 patch
Braces   +9 added lines, -4 removed lines patch added patch discarded remove patch
@@ -2104,7 +2104,9 @@  discard block
 block discarded – undo
2104 2104
 					}
2105 2105
 				}
2106 2106
 			}
2107
-			if ($nbMandated > 0 ) $text .= '<div><span class="clearboth nowraponall warning">'.$langs->trans("mandatoryPeriodNeedTobeSetMsgValidate").'</span></div>';
2107
+			if ($nbMandated > 0 ) {
2108
+				$text .= '<div><span class="clearboth nowraponall warning">'.$langs->trans("mandatoryPeriodNeedTobeSetMsgValidate").'</span></div>';
2109
+			}
2108 2110
 
2109 2111
 			if (getDolGlobalInt('SALE_ORDER_SUGGEST_DOWN_PAYMENT_INVOICE_CREATION')) {
2110 2112
 				// This is a hidden option:
@@ -2751,9 +2753,12 @@  discard block
 block discarded – undo
2751 2753
 				$parameters = array();
2752 2754
 				// Note that $action and $object may be modified by hook
2753 2755
 				$reshook = $hookmanager->executeHooks('formAddObjectLine', $parameters, $object, $action);
2754
-				if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
2755
-				if (empty($reshook))
2756
-					$object->formAddObjectLine(1, $mysoc, $soc);
2756
+				if ($reshook < 0) {
2757
+					setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
2758
+				}
2759
+				if (empty($reshook)) {
2760
+									$object->formAddObjectLine(1, $mysoc, $soc);
2761
+				}
2757 2762
 			}
2758 2763
 		}
2759 2764
 		print '</table>';
Please login to merge, or discard this patch.
htdocs/asset/tpl/accountancy_codes_view.tpl.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -50,7 +50,9 @@
 block discarded – undo
50 50
 }
51 51
 
52 52
 if (empty($reshook)) {
53
-	if (isModEnabled('accounting')) require_once DOL_DOCUMENT_ROOT . '/accountancy/class/accountingaccount.class.php';
53
+	if (isModEnabled('accounting')) {
54
+		require_once DOL_DOCUMENT_ROOT . '/accountancy/class/accountingaccount.class.php';
55
+	}
54 56
 
55 57
 	foreach ($assetaccountancycodes->accountancy_codes_fields as $mode_key => $mode_info) {
56 58
 		//if (empty($object->enabled_modes[$mode_key])) continue;
Please login to merge, or discard this patch.
htdocs/ticket/agenda.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -61,7 +61,9 @@
 block discarded – undo
61 61
 
62 62
 // Security check
63 63
 $id = GETPOST("id", 'int');
64
-if ($user->socid > 0) $socid = $user->socid;
64
+if ($user->socid > 0) {
65
+	$socid = $user->socid;
66
+}
65 67
 $result = restrictedArea($user, 'ticket', $object->id, '');
66 68
 
67 69
 // restrict access for externals users
Please login to merge, or discard this patch.
htdocs/comm/remx.php 1 patch
Braces   +4 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,10 @@
 block discarded – undo
24 24
  *		\brief      Page to edit absolute discounts for a customer
25 25
  */
26 26
 
27
-if (! defined('CSRFCHECK_WITH_TOKEN')) define('CSRFCHECK_WITH_TOKEN', '1');		// Force use of CSRF protection with tokens even for GET
27
+if (! defined('CSRFCHECK_WITH_TOKEN')) {
28
+	define('CSRFCHECK_WITH_TOKEN', '1');
29
+}
30
+// Force use of CSRF protection with tokens even for GET
28 31
 
29 32
 // Load Dolibarr environment
30 33
 require '../main.inc.php';
Please login to merge, or discard this patch.
htdocs/comm/propal/card.php 1 patch
Braces   +18 added lines, -7 removed lines patch added patch discarded remove patch
@@ -325,8 +325,12 @@  discard block
 block discarded – undo
325 325
 			} elseif (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) {
326 326
 				$outputlangs = $langs;
327 327
 				$newlang = '';
328
-				if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang) && GETPOST('lang_id', 'aZ09')) $newlang = GETPOST('lang_id', 'aZ09');
329
-				if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang))	$newlang = $object->thirdparty->default_lang;
328
+				if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang) && GETPOST('lang_id', 'aZ09')) {
329
+					$newlang = GETPOST('lang_id', 'aZ09');
330
+				}
331
+				if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang)) {
332
+					$newlang = $object->thirdparty->default_lang;
333
+				}
330 334
 				if (!empty($newlang)) {
331 335
 					$outputlangs = new Translate("", $conf);
332 336
 					$outputlangs->setDefaultLang($newlang);
@@ -346,8 +350,12 @@  discard block
 block discarded – undo
346 350
 			if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) {
347 351
 				$outputlangs = $langs;
348 352
 				$newlang = '';
349
-				if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang) && GETPOST('lang_id', 'aZ09')) $newlang = GETPOST('lang_id', 'aZ09');
350
-				if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang))	$newlang = $object->thirdparty->default_lang;
353
+				if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang) && GETPOST('lang_id', 'aZ09')) {
354
+					$newlang = GETPOST('lang_id', 'aZ09');
355
+				}
356
+				if (getDolGlobalInt('MAIN_MULTILANGS') && empty($newlang)) {
357
+					$newlang = $object->thirdparty->default_lang;
358
+				}
351 359
 				if (!empty($newlang)) {
352 360
 					$outputlangs = new Translate("", $conf);
353 361
 					$outputlangs->setDefaultLang($newlang);
@@ -2784,9 +2792,12 @@  discard block
 block discarded – undo
2784 2792
 		if ($action != 'editline') {
2785 2793
 			$parameters = array();
2786 2794
 			$reshook = $hookmanager->executeHooks('formAddObjectLine', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
2787
-			if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
2788
-			if (empty($reshook))
2789
-				$object->formAddObjectLine(1, $mysoc, $soc);
2795
+			if ($reshook < 0) {
2796
+				setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
2797
+			}
2798
+			if (empty($reshook)) {
2799
+							$object->formAddObjectLine(1, $mysoc, $soc);
2800
+			}
2790 2801
 		} else {
2791 2802
 			$parameters = array();
2792 2803
 			$reshook = $hookmanager->executeHooks('formEditObjectLine', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
Please login to merge, or discard this patch.
htdocs/comm/action/class/actioncomm.class.php 1 patch
Braces   +15 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1237,7 +1237,9 @@  discard block
 block discarded – undo
1237 1237
 					if (!is_array($val)) {	// For backward compatibility when val=id
1238 1238
 						$val = array('id'=>$val);
1239 1239
 					}
1240
-					if (!empty($already_inserted[$val['id']])) continue;
1240
+					if (!empty($already_inserted[$val['id']])) {
1241
+						continue;
1242
+					}
1241 1243
 
1242 1244
 					$sql = "INSERT INTO ".MAIN_DB_PREFIX."actioncomm_resources(fk_actioncomm, element_type, fk_element, mandatory, transparency, answer_status)";
1243 1245
 					$sql .= " VALUES(".((int) $this->id).", 'user', ".((int) $val['id']).", ".(empty($val['mandatory']) ? '0' : ((int) $val['mandatory'])).", ".(empty($val['transparency']) ? '0' : ((int) $val['transparency'])).", ".(empty($val['answer_status']) ? '0' : ((int) $val['answer_status'])).")";
@@ -1263,7 +1265,9 @@  discard block
 block discarded – undo
1263 1265
 						if (!is_array($val)) {	// For backward compatibility when val=id
1264 1266
 							$val = array('id'=>$val);
1265 1267
 						}
1266
-						if (!empty($already_inserted[$val['id']])) continue;
1268
+						if (!empty($already_inserted[$val['id']])) {
1269
+							continue;
1270
+						}
1267 1271
 
1268 1272
 						$sql = "INSERT INTO ".MAIN_DB_PREFIX."actioncomm_resources(fk_actioncomm, element_type, fk_element, mandatory, transparency, answer_status)";
1269 1273
 						$sql .= " VALUES(".((int) $this->id).", 'socpeople', ".((int) $val['id']).", 0, 0, 0)";
@@ -1334,7 +1338,9 @@  discard block
 block discarded – undo
1334 1338
 		// Fields from hook
1335 1339
 		$parameters = array('sql' => &$sql, 'socid' => $socid, 'fk_element' => $fk_element, 'elementtype' => $elementtype);
1336 1340
 		$reshook = $hookmanager->executeHooks('getActionsListFrom', $parameters);    // Note that $action and $object may have been modified by hook
1337
-		if (!empty($hookmanager->resPrint)) $sql.= $hookmanager->resPrint;
1341
+		if (!empty($hookmanager->resPrint)) {
1342
+			$sql.= $hookmanager->resPrint;
1343
+		}
1338 1344
 		$sql .= " WHERE a.entity IN (".getEntity('agenda').")";
1339 1345
 		if (!empty($socid)) {
1340 1346
 			$sql .= " AND a.fk_soc = ".((int) $socid);
@@ -1356,7 +1362,9 @@  discard block
 block discarded – undo
1356 1362
 		// Fields where hook
1357 1363
 		$parameters = array('sql' => &$sql, 'socid' => $socid, 'fk_element' => $fk_element, 'elementtype' => $elementtype);
1358 1364
 		$reshook = $hookmanager->executeHooks('getActionsListWhere', $parameters);    // Note that $action and $object may have been modified by hook
1359
-		if (!empty($hookmanager->resPrint)) $sql.= $hookmanager->resPrint;
1365
+		if (!empty($hookmanager->resPrint)) {
1366
+			$sql.= $hookmanager->resPrint;
1367
+		}
1360 1368
 		if ($sortorder && $sortfield) {
1361 1369
 			$sql .= $this->db->order($sortfield, $sortorder);
1362 1370
 		}
@@ -2553,7 +2561,9 @@  discard block
 block discarded – undo
2553 2561
 
2554 2562
 		$sql = "UPDATE ".MAIN_DB_PREFIX."actioncomm ";
2555 2563
 		$sql .= " SET percent = ".(int) $percent;
2556
-		if ($usermodid > 0) $sql .= ", fk_user_mod = ".$usermodid;
2564
+		if ($usermodid > 0) {
2565
+			$sql .= ", fk_user_mod = ".$usermodid;
2566
+		}
2557 2567
 		$sql .= " WHERE id = ".((int) $id);
2558 2568
 
2559 2569
 		if ($this->db->query($sql)) {
Please login to merge, or discard this patch.
htdocs/modulebuilder/template/myobject_note.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -149,7 +149,9 @@
 block discarded – undo
149 149
 if (!isModEnabled("mymodule")) {
150 150
 	accessforbidden();
151 151
 }
152
-if (!$permissiontoread) accessforbidden();
152
+if (!$permissiontoread) {
153
+	accessforbidden();
154
+}
153 155
 
154 156
 
155 157
 /*
Please login to merge, or discard this patch.