Passed
Branch develop (66e4de)
by Laurent
33:03
created
htdocs/zapier/admin/about.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -34,7 +34,9 @@
 block discarded – undo
34 34
 $langs->loadLangs(array("errors", "admin", "zapier@zapier"));
35 35
 
36 36
 // Access control
37
-if (!$user->admin) accessforbidden();
37
+if (!$user->admin) {
38
+	accessforbidden();
39
+}
38 40
 
39 41
 // Parameters
40 42
 $action = GETPOST('action', 'aZ09');
Please login to merge, or discard this patch.
htdocs/zapier/admin/setup.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,9 @@
 block discarded – undo
33 33
 $langs->loadLangs(array("admin", "zapier@zapier"));
34 34
 
35 35
 // Access control
36
-if (!$user->admin) accessforbidden();
36
+if (!$user->admin) {
37
+	accessforbidden();
38
+}
37 39
 
38 40
 // Parameters
39 41
 $action = GETPOST('action', 'aZ09');
Please login to merge, or discard this patch.
htdocs/bookmarks/admin/bookmark.php 1 patch
Braces   +6 added lines, -3 removed lines patch added patch discarded remove patch
@@ -28,8 +28,9 @@  discard block
 block discarded – undo
28 28
 // Load translation files required by the page
29 29
 $langs->load("admin");
30 30
 
31
-if (!$user->admin)
32
-accessforbidden();
31
+if (!$user->admin) {
32
+	accessforbidden();
33
+}
33 34
 
34 35
 $action = GETPOST('action', 'aZ09');
35 36
 
@@ -38,7 +39,9 @@  discard block
 block discarded – undo
38 39
 	$showmenu = GETPOST('BOOKMARKS_SHOW_IN_MENU', 'alpha');
39 40
 	$res = dolibarr_set_const($db, "BOOKMARKS_SHOW_IN_MENU", $showmenu, 'chaine', 0, '', $conf->entity);
40 41
 
41
-	if (!$res > 0) $error++;
42
+	if (!$res > 0) {
43
+		$error++;
44
+	}
42 45
 
43 46
 	if (!$error)
44 47
 	{
Please login to merge, or discard this patch.
htdocs/ecm/search.php 1 patch
Braces   +18 added lines, -6 removed lines patch added patch discarded remove patch
@@ -33,7 +33,9 @@  discard block
 block discarded – undo
33 33
 $langs->loadLangs(array("ecm", "companies", "other", "users", "orders", "propal", "bills", "contracts"));
34 34
 
35 35
 // Security check
36
-if ($user->socid) $socid = $user->socid;
36
+if ($user->socid) {
37
+	$socid = $user->socid;
38
+}
37 39
 $result = restrictedArea($user, 'ecm', '');
38 40
 
39 41
 // Load permissions
@@ -43,12 +45,16 @@  discard block
 block discarded – undo
43 45
 $socid = GETPOST('socid', 'int');
44 46
 $action = GETPOST('action', 'aZ09');
45 47
 $section = GETPOST('section');
46
-if (!$section) $section = 0;
48
+if (!$section) {
49
+	$section = 0;
50
+}
47 51
 
48 52
 $module  = GETPOST('module', 'alpha');
49 53
 $website = GETPOST('website', 'alpha');
50 54
 $pageid  = GETPOST('pageid', 'int');
51
-if (empty($module)) $module = 'ecm';
55
+if (empty($module)) {
56
+	$module = 'ecm';
57
+}
52 58
 
53 59
 $upload_dir = $conf->ecm->dir_output.'/'.$section;
54 60
 
@@ -60,8 +66,12 @@  discard block
 block discarded – undo
60 66
 $offset = $limit * $page;
61 67
 $pageprev = $page - 1;
62 68
 $pagenext = $page + 1;
63
-if (!$sortorder) $sortorder = "ASC";
64
-if (!$sortfield) $sortfield = "label";
69
+if (!$sortorder) {
70
+	$sortorder = "ASC";
71
+}
72
+if (!$sortfield) {
73
+	$sortfield = "label";
74
+}
65 75
 
66 76
 $ecmdir = new EcmDirectory($db);
67 77
 if (!empty($section))
@@ -153,7 +163,9 @@  discard block
 block discarded – undo
153 163
 $butshown = 0;
154 164
 foreach ($sectionauto as $sectioncur)
155 165
 {
156
-	if (!$sectioncur['test']) continue;
166
+	if (!$sectioncur['test']) {
167
+		continue;
168
+	}
157 169
 	print '<tr class="impair">';
158 170
 	print "<td>".$sectioncur['label'].':</td>';
159 171
 	print '<td';
Please login to merge, or discard this patch.
htdocs/salaries/admin/salaries_extrafields.php 1 patch
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -36,13 +36,17 @@
 block discarded – undo
36 36
 // List of supported format
37 37
 $tmptype2label = ExtraFields::$type2label;
38 38
 $type2label = array('');
39
-foreach ($tmptype2label as $key => $val) $type2label[$key] = $langs->transnoentitiesnoconv($val);
39
+foreach ($tmptype2label as $key => $val) {
40
+	$type2label[$key] = $langs->transnoentitiesnoconv($val);
41
+}
40 42
 
41 43
 $action = GETPOST('action', 'aZ09');
42 44
 $attrname = GETPOST('attrname', 'alpha');
43 45
 $elementtype = 'payment_salary'; //Must be the $table_element of the class that manage extrafield
44 46
 
45
-if (!$user->admin) accessforbidden();
47
+if (!$user->admin) {
48
+	accessforbidden();
49
+}
46 50
 
47 51
 
48 52
 /*
Please login to merge, or discard this patch.
htdocs/margin/admin/margin.php 1 patch
Braces   +11 added lines, -4 removed lines patch added patch discarded remove patch
@@ -31,7 +31,9 @@  discard block
 block discarded – undo
31 31
 
32 32
 $langs->loadLangs(array("admin", "bills", "margins", "stocks"));
33 33
 
34
-if (!$user->admin) accessforbidden();
34
+if (!$user->admin) {
35
+	accessforbidden();
36
+}
35 37
 
36 38
 $action = GETPOST('action', 'aZ09');
37 39
 
@@ -126,18 +128,23 @@  discard block
 block discarded – undo
126 128
 print '<td>'.$langs->trans("MARGIN_TYPE").'</td>';
127 129
 print '<td>';
128 130
 print ' <input type="radio" name="MARGIN_TYPE" value="1" ';
129
-if (isset($conf->global->MARGIN_TYPE) && $conf->global->MARGIN_TYPE == '1')
131
+if (isset($conf->global->MARGIN_TYPE) && $conf->global->MARGIN_TYPE == '1') {
130 132
 	print 'checked ';
133
+}
131 134
 print '/> ';
132 135
 print $langs->trans('MargeType1');
133 136
 print '<br>';
134 137
 print ' <input type="radio" name="MARGIN_TYPE" value="pmp" ';
135
-if (isset($conf->global->MARGIN_TYPE) && $conf->global->MARGIN_TYPE == 'pmp') print 'checked ';
138
+if (isset($conf->global->MARGIN_TYPE) && $conf->global->MARGIN_TYPE == 'pmp') {
139
+	print 'checked ';
140
+}
136 141
 print '/> ';
137 142
 print $langs->trans('MargeType2');
138 143
 print '<br>';
139 144
 print ' <input type="radio" name="MARGIN_TYPE" value="costprice" ';
140
-if (isset($conf->global->MARGIN_TYPE) && $conf->global->MARGIN_TYPE == 'costprice') print 'checked ';
145
+if (isset($conf->global->MARGIN_TYPE) && $conf->global->MARGIN_TYPE == 'costprice') {
146
+	print 'checked ';
147
+}
141 148
 print '/> ';
142 149
 print $langs->trans('MargeType3');
143 150
 print '</td>';
Please login to merge, or discard this patch.
htdocs/admin/bank.php 1 patch
Braces   +28 added lines, -15 removed lines patch added patch discarded remove patch
@@ -34,8 +34,9 @@  discard block
 block discarded – undo
34 34
 // Load translation files required by the page
35 35
 $langs->loadLangs(array("admin", "companies", "bills", "other", "banks"));
36 36
 
37
-if (!$user->admin)
37
+if (!$user->admin) {
38 38
 	accessforbidden();
39
+}
39 40
 
40 41
 $action = GETPOST('action', 'aZ09');
41 42
 $actionsave = GETPOST('save', 'alpha');
@@ -109,10 +110,14 @@  discard block
 block discarded – undo
109 110
 	while ($i <= 2)
110 111
 	{
111 112
 		$color = GETPOST('BANK_COLORIZE_MOVEMENT_COLOR'.$i, 'alpha');
112
-		if ($color == '-1') $color = '';
113
+		if ($color == '-1') {
114
+			$color = '';
115
+		}
113 116
 
114 117
 		$res = dolibarr_set_const($db, 'BANK_COLORIZE_MOVEMENT_COLOR'.$i, $color, 'chaine', 0, '', $conf->entity);
115
-		if (!$res > 0) $error++;
118
+		if (!$res > 0) {
119
+			$error++;
120
+		}
116 121
 		$i++;
117 122
 	}
118 123
 
@@ -122,7 +127,9 @@  discard block
 block discarded – undo
122 127
 		setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
123 128
 	} else {
124 129
 		$db->rollback();
125
-		if (empty($errorsaved))	setEventMessages($langs->trans("Error"), null, 'errors');
130
+		if (empty($errorsaved)) {
131
+			setEventMessages($langs->trans("Error"), null, 'errors');
132
+		}
126 133
 	}
127 134
 }
128 135
 
@@ -175,8 +182,9 @@  discard block
 block discarded – undo
175 182
 } elseif ($action == 'del') {
176 183
 	$ret = delDocumentModel($value, $type);
177 184
 	if ($ret > 0) {
178
-		if ($conf->global->BANKADDON_PDF == "$value")
179
-			dolibarr_del_const($db, 'BANKADDON_PDF', $conf->entity);
185
+		if ($conf->global->BANKADDON_PDF == "$value") {
186
+					dolibarr_del_const($db, 'BANKADDON_PDF', $conf->entity);
187
+		}
180 188
 	}
181 189
 }
182 190
 // Set default model
@@ -247,8 +255,9 @@  discard block
 block discarded – undo
247 255
 	print '<td class="nowrap">';
248 256
 	$tmparray = explode(' ', $bankorder[$i][2]);
249 257
 	foreach ($tmparray as $key => $val) {
250
-		if ($key > 0)
251
-			print ', ';
258
+		if ($key > 0) {
259
+					print ', ';
260
+		}
252 261
 		print $langs->trans($val);
253 262
 	}
254 263
 	print "</td>\n";
@@ -333,18 +342,22 @@  discard block
 block discarded – undo
333 342
 							$module = new $classname($db);
334 343
 
335 344
 							$modulequalified = 1;
336
-							if ($module->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2)
337
-								$modulequalified = 0;
338
-							if ($module->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1)
339
-								$modulequalified = 0;
345
+							if ($module->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) {
346
+															$modulequalified = 0;
347
+							}
348
+							if ($module->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) {
349
+															$modulequalified = 0;
350
+							}
340 351
 
341 352
 							if ($modulequalified) {
342 353
 								print '<tr class="oddeven"><td width="100">';
343 354
 								print(empty($module->name) ? $name : $module->name);
344 355
 								print "</td><td>\n";
345
-								if (method_exists($module, 'info'))
346
-									print $module->info($langs);
347
-								else print $module->description;
356
+								if (method_exists($module, 'info')) {
357
+																	print $module->info($langs);
358
+								} else {
359
+									print $module->description;
360
+								}
348 361
 								print '</td>';
349 362
 
350 363
 								// Active
Please login to merge, or discard this patch.
htdocs/admin/agenda_extrafields.php 1 patch
Braces   +8 added lines, -3 removed lines patch added patch discarded remove patch
@@ -31,8 +31,9 @@  discard block
 block discarded – undo
31 31
 require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
32 32
 
33 33
 
34
-if (!$user->admin)
34
+if (!$user->admin) {
35 35
 	accessforbidden();
36
+}
36 37
 
37 38
 // Load translation files required by the page
38 39
 $langs->loadLangs(array('admin', 'other', 'agenda'));
@@ -43,13 +44,17 @@  discard block
 block discarded – undo
43 44
 // List of supported format
44 45
 $tmptype2label = ExtraFields::$type2label;
45 46
 $type2label = array('');
46
-foreach ($tmptype2label as $key => $val) $type2label[$key] = $langs->transnoentitiesnoconv($val);
47
+foreach ($tmptype2label as $key => $val) {
48
+	$type2label[$key] = $langs->transnoentitiesnoconv($val);
49
+}
47 50
 
48 51
 $action = GETPOST('action', 'aZ09');
49 52
 $attrname = GETPOST('attrname', 'alpha');
50 53
 $elementtype = 'actioncomm'; //Must be the $table_element of the class that manage extrafield
51 54
 
52
-if (!$user->admin) accessforbidden();
55
+if (!$user->admin) {
56
+	accessforbidden();
57
+}
53 58
 
54 59
 
55 60
 /*
Please login to merge, or discard this patch.
htdocs/admin/import.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,8 +35,9 @@
 block discarded – undo
35 35
 // Load translation files required by the page
36 36
 $langs->loadLangs(array('admin', 'exports', 'other'));
37 37
 
38
-if (!$user->admin)
38
+if (!$user->admin) {
39 39
 	accessforbidden();
40
+}
40 41
 
41 42
 $action = GETPOST('action', 'aZ09');
42 43
 $value = GETPOST('value', 'alpha');
Please login to merge, or discard this patch.