Completed
Branch develop (f5af02)
by
unknown
17:35
created
htdocs/takepos/pay.php 1 patch
Braces   +9 added lines, -3 removed lines patch added patch discarded remove patch
@@ -231,7 +231,9 @@  discard block
 block discarded – undo
231 231
 			$arrayOfValidPaymentModes[] = $obj;
232 232
 		}
233 233
 		if (!isModEnabled('banque')) {
234
-			if ($paycode == 'CASH' || $paycode == 'CB') $arrayOfValidPaymentModes[] = $obj;
234
+			if ($paycode == 'CASH' || $paycode == 'CB') {
235
+				$arrayOfValidPaymentModes[] = $obj;
236
+			}
235 237
 		}
236 238
 	}
237 239
 }
@@ -338,7 +340,9 @@  discard block
 block discarded – undo
338 340
 	  const bodyContent = JSON.stringify({ amount : amount, invoiceid : invoiceid });
339 341
   <?php
340 342
 	$urlpaymentintent = DOL_URL_ROOT.'/stripe/ajax/ajax.php?action=createPaymentIntent&token='.newToken().'&servicestatus='.$servicestatus;
341
-	if (!empty($stripeacc)) $urlpaymentintent .= '&stripeacc='.$stripeacc;
343
+	if (!empty($stripeacc)) {
344
+		$urlpaymentintent .= '&stripeacc='.$stripeacc;
345
+	}
342 346
 	?>
343 347
   return fetch('<?php echo $urlpaymentintent; ?>', {
344 348
 	method: "POST",
@@ -668,7 +672,9 @@  discard block
 block discarded – undo
668 672
 
669 673
 $parameters = array();
670 674
 $reshook = $hookmanager->executeHooks('addMoreActionsButtons', $parameters, $invoice, $action); // Note that $action and $object may have been modified by hook
671
-if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
675
+if ($reshook < 0) {
676
+	setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
677
+}
672 678
 
673 679
 $class = ($i == 3) ? "calcbutton3" : "calcbutton2";
674 680
 foreach ($action_buttons as $button) {
Please login to merge, or discard this patch.
htdocs/partnership/partnership_document.php 1 patch
Braces   +12 added lines, -4 removed lines patch added patch discarded remove patch
@@ -83,10 +83,18 @@
 block discarded – undo
83 83
 //if ($user->socid > 0) accessforbidden();
84 84
 //if ($user->socid > 0) $socid = $user->socid;
85 85
 //$result = restrictedArea($user, 'partnership', $object->id);
86
-if (empty($conf->partnership->enabled)) accessforbidden();
87
-if (empty($permissiontoread)) accessforbidden();
88
-if ($object->id > 0 && !($object->fk_member > 0) && $managedfor == 'member') accessforbidden();
89
-if ($object->id > 0 && !($object->fk_soc > 0) && $managedfor == 'thirdparty') accessforbidden();
86
+if (empty($conf->partnership->enabled)) {
87
+	accessforbidden();
88
+}
89
+if (empty($permissiontoread)) {
90
+	accessforbidden();
91
+}
92
+if ($object->id > 0 && !($object->fk_member > 0) && $managedfor == 'member') {
93
+	accessforbidden();
94
+}
95
+if ($object->id > 0 && !($object->fk_soc > 0) && $managedfor == 'thirdparty') {
96
+	accessforbidden();
97
+}
90 98
 
91 99
 
92 100
 
Please login to merge, or discard this patch.
htdocs/partnership/partnership_note.php 1 patch
Braces   +12 added lines, -4 removed lines patch added patch discarded remove patch
@@ -66,10 +66,18 @@
 block discarded – undo
66 66
 //if ($user->socid > 0) accessforbidden();
67 67
 //if ($user->socid > 0) $socid = $user->socid;
68 68
 //$result = restrictedArea($user, 'partnership', $object->id);
69
-if (empty($conf->partnership->enabled)) accessforbidden();
70
-if (empty($permissiontoread)) accessforbidden();
71
-if ($object->id > 0 && !($object->fk_member > 0) && $managedfor == 'member') accessforbidden();
72
-if ($object->id > 0 && !($object->fk_soc > 0) && $managedfor == 'thirdparty') accessforbidden();
69
+if (empty($conf->partnership->enabled)) {
70
+	accessforbidden();
71
+}
72
+if (empty($permissiontoread)) {
73
+	accessforbidden();
74
+}
75
+if ($object->id > 0 && !($object->fk_member > 0) && $managedfor == 'member') {
76
+	accessforbidden();
77
+}
78
+if ($object->id > 0 && !($object->fk_soc > 0) && $managedfor == 'thirdparty') {
79
+	accessforbidden();
80
+}
73 81
 
74 82
 
75 83
 /*
Please login to merge, or discard this patch.
htdocs/hrm/evaluation_card.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -97,7 +97,9 @@
 block discarded – undo
97 97
 if (!isModEnabled("hrm")) {
98 98
 	accessforbidden();
99 99
 }
100
-if (!$permissiontoread || ($action === 'create' && !$permissiontoadd)) accessforbidden();
100
+if (!$permissiontoread || ($action === 'create' && !$permissiontoadd)) {
101
+	accessforbidden();
102
+}
101 103
 
102 104
 
103 105
 /*
Please login to merge, or discard this patch.
htdocs/hrm/admin/admin_hrm.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.
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.