Completed
Branch develop (30080e)
by
unknown
16:47
created
htdocs/hrm/admin/admin_establishment.php 1 patch
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -40,8 +40,12 @@
 block discarded – undo
40 40
 //if ($user->socid > 0) $socid = $user->socid;
41 41
 //$isdraft = (($object->status == $object::STATUS_DRAFT) ? 1 : 0);
42 42
 //restrictedArea($user, $object->element, $object->id, '', '', 'fk_soc', 'rowid', 0);
43
-if (!isModEnabled('hrm')) accessforbidden();
44
-if (empty($permissiontoread)) accessforbidden();
43
+if (!isModEnabled('hrm')) {
44
+	accessforbidden();
45
+}
46
+if (empty($permissiontoread)) {
47
+	accessforbidden();
48
+}
45 49
 
46 50
 $sortorder     = GETPOST('sortorder', 'aZ09comma');
47 51
 $sortfield     = GETPOST('sortfield', 'aZ09comma');
Please login to merge, or discard this patch.
htdocs/hrm/establishment/info.php 1 patch
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -86,8 +86,12 @@
 block discarded – undo
86 86
 //if ($user->socid > 0) $socid = $user->socid;
87 87
 //$isdraft = (($object->status == $object::STATUS_DRAFT) ? 1 : 0);
88 88
 //restrictedArea($user, $object->element, $object->id, '', '', 'fk_soc', 'rowid', $isdraft);
89
-if (!isModEnabled('hrm')) accessforbidden();
90
-if (empty($permissiontoread)) accessforbidden();
89
+if (!isModEnabled('hrm')) {
90
+	accessforbidden();
91
+}
92
+if (empty($permissiontoread)) {
93
+	accessforbidden();
94
+}
91 95
 
92 96
 
93 97
 /*
Please login to merge, or discard this patch.
htdocs/hrm/position_list.php 1 patch
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -139,7 +139,9 @@  discard block
 block discarded – undo
139 139
 $permissiontodelete = $user->rights->hrm->all->delete;
140 140
 
141 141
 // Security check (enable the most restrictive one)
142
-if ($user->socid > 0) accessforbidden();
142
+if ($user->socid > 0) {
143
+	accessforbidden();
144
+}
143 145
 //if ($user->socid > 0) accessforbidden();
144 146
 //$socid = 0; if ($user->socid > 0) $socid = $user->socid;
145 147
 //$isdraft = (($object->status == $object::STATUS_DRAFT) ? 1 : 0);
@@ -147,7 +149,9 @@  discard block
 block discarded – undo
147 149
 if (!isModEnabled('hrm')) {
148 150
 	accessforbidden('Module hrm not enabled');
149 151
 }
150
-if (!$permissiontoread) accessforbidden();
152
+if (!$permissiontoread) {
153
+	accessforbidden();
154
+}
151 155
 
152 156
 
153 157
 
Please login to merge, or discard this patch.
htdocs/hrm/evaluation_list.php 1 patch
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -144,13 +144,17 @@
 block discarded – undo
144 144
 }
145 145
 
146 146
 // Security check (enable the most restrictive one)
147
-if ($user->socid > 0) accessforbidden();
147
+if ($user->socid > 0) {
148
+	accessforbidden();
149
+}
148 150
 //if ($user->socid > 0) accessforbidden();
149 151
 //$socid = 0; if ($user->socid > 0) $socid = $user->socid;
150 152
 //$isdraft = (($object->status == $object::STATUS_DRAFT) ? 1 : 0);
151 153
 //restrictedArea($user, $object->element, $object->id, $object->table_element, '', 'fk_soc', 'rowid', $isdraft);
152 154
 //if (empty($conf->hrm->enabled)) accessforbidden();
153
-if (!$permissiontoread) accessforbidden();
155
+if (!$permissiontoread) {
156
+	accessforbidden();
157
+}
154 158
 
155 159
 
156 160
 
Please login to merge, or discard this patch.
htdocs/variants/card.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -286,7 +286,9 @@
 block discarded – undo
286 286
 		print '<div class="tabsAction">' . "\n";
287 287
 		$parameters = array();
288 288
 		$reshook = $hookmanager->executeHooks('addMoreActionsButtons', $parameters, $object, $action);    // Note that $action and $object may have been modified by hook
289
-		if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
289
+		if ($reshook < 0) {
290
+			setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
291
+		}
290 292
 
291 293
 		if (empty($reshook)) {
292 294
 			// Modify
Please login to merge, or discard this patch.
htdocs/variants/class/ProductAttribute.class.php 1 patch
Braces   +6 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1317,9 +1317,12 @@
 block discarded – undo
1317 1317
 
1318 1318
 					$parameters = array();
1319 1319
 					$reshook = $hookmanager->executeHooks('formAddObjectLine', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
1320
-					if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
1321
-					if (empty($reshook))
1322
-						$object->formAddObjectLine(1, $mysoc, $buyer);
1320
+					if ($reshook < 0) {
1321
+						setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
1322
+					}
1323
+					if (empty($reshook)) {
1324
+											$object->formAddObjectLine(1, $mysoc, $buyer);
1325
+					}
1323 1326
 				}
1324 1327
 			}
1325 1328
 		}
Please login to merge, or discard this patch.
htdocs/api/class/api_documents.class.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -524,7 +524,9 @@
 block discarded – undo
524 524
 				} elseif (is_array($ecmfile->lines) && count($ecmfile->lines) > 0) {
525 525
 					$count = count($filearray);
526 526
 					for ($i = 0 ; $i < $count ; $i++) {
527
-						if ($filearray[$i]['name'] == $ecmfile->lines[$i]->filename) $filearray[$i] = array_merge($filearray[$i], (array) $ecmfile->lines[0]);
527
+						if ($filearray[$i]['name'] == $ecmfile->lines[$i]->filename) {
528
+							$filearray[$i] = array_merge($filearray[$i], (array) $ecmfile->lines[0]);
529
+						}
528 530
 					}
529 531
 				}
530 532
 			}
Please login to merge, or discard this patch.
htdocs/bom/tpl/objectline_edit.tpl.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -47,7 +47,9 @@
 block discarded – undo
47 47
 	$forceall = 0;
48 48
 }
49 49
 
50
-if (empty($filtertype))	$filtertype = 0;
50
+if (empty($filtertype)) {
51
+	$filtertype = 0;
52
+}
51 53
 
52 54
 $formproduct = new FormProduct($object->db);
53 55
 
Please login to merge, or discard this patch.
htdocs/bom/tpl/objectline_title.tpl.php 1 patch
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -40,7 +40,9 @@  discard block
 block discarded – undo
40 40
 }
41 41
 
42 42
 global $filtertype;
43
-if (empty($filtertype))	$filtertype = 0;
43
+if (empty($filtertype)) {
44
+	$filtertype = 0;
45
+}
44 46
 
45 47
 print "<!-- BEGIN PHP TEMPLATE objectline_title.tpl.php -->\n";
46 48
 
@@ -85,7 +87,9 @@  discard block
 block discarded – undo
85 87
 } else {
86 88
 	print '<td class="linecolunit right">' . $form->textwithpicto($langs->trans('Unit'), '').'</td>';
87 89
 
88
-	if (isModEnabled('workstation')) print '<td class="linecolworkstation right">' .  $form->textwithpicto($langs->trans('DefaultWorkstation'), '') . '</td>';
90
+	if (isModEnabled('workstation')) {
91
+		print '<td class="linecolworkstation right">' .  $form->textwithpicto($langs->trans('DefaultWorkstation'), '') . '</td>';
92
+	}
89 93
 
90 94
 	// Cost
91 95
 	print '<td class="linecolcost right">'.$form->textwithpicto($langs->trans("TotalCost"), $langs->trans("BOMTotalCostService")).'</td>';
Please login to merge, or discard this patch.