Completed
Branch develop (30080e)
by
unknown
16:47
created
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/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.
htdocs/modulebuilder/template/myobject_contact.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.
htdocs/hrm/establishment/card.php 1 patch
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -46,8 +46,12 @@
 block discarded – undo
46 46
 //if ($user->socid > 0) $socid = $user->socid;
47 47
 //$isdraft = (($object->status == $object::STATUS_DRAFT) ? 1 : 0);
48 48
 //restrictedArea($user, $object->element, $object->id, '', '', 'fk_soc', 'rowid', 0);
49
-if (!isModEnabled('hrm')) accessforbidden();
50
-if (empty($permissiontoread)) accessforbidden();
49
+if (!isModEnabled('hrm')) {
50
+	accessforbidden();
51
+}
52
+if (empty($permissiontoread)) {
53
+	accessforbidden();
54
+}
51 55
 
52 56
 
53 57
 /*
Please login to merge, or discard this patch.