@@ -39,7 +39,9 @@ discard block |
||
39 | 39 | $action = GETPOST('action', 'aZ09'); |
40 | 40 | |
41 | 41 | // Security check |
42 | -if ($user->socid) $socid = $user->socid; |
|
42 | +if ($user->socid) { |
|
43 | + $socid = $user->socid; |
|
44 | +} |
|
43 | 45 | $result = restrictedArea($user, 'resource', $id, 'resource'); |
44 | 46 | |
45 | 47 | $object = new DolResource($db); |
@@ -151,8 +153,12 @@ discard block |
||
151 | 153 | |
152 | 154 | print '<br>'; |
153 | 155 | |
154 | - if (!empty($conf->global->RESOURCE_HIDE_ADD_CONTACT_USER)) $hideaddcontactforuser = 1; |
|
155 | - if (!empty($conf->global->RESOURCE_HIDE_ADD_CONTACT_THIPARTY)) $hideaddcontactforthirdparty = 1; |
|
156 | + if (!empty($conf->global->RESOURCE_HIDE_ADD_CONTACT_USER)) { |
|
157 | + $hideaddcontactforuser = 1; |
|
158 | + } |
|
159 | + if (!empty($conf->global->RESOURCE_HIDE_ADD_CONTACT_THIPARTY)) { |
|
160 | + $hideaddcontactforthirdparty = 1; |
|
161 | + } |
|
156 | 162 | |
157 | 163 | $permission = 1; |
158 | 164 | // Contacts lines |
@@ -37,7 +37,9 @@ |
||
37 | 37 | $action = GETPOST('action', 'aZ09'); |
38 | 38 | |
39 | 39 | // Security check |
40 | -if ($user->socid) $socid = $user->socid; |
|
40 | +if ($user->socid) { |
|
41 | + $socid = $user->socid; |
|
42 | +} |
|
41 | 43 | $result = restrictedArea($user, 'resource', $id, 'resource'); |
42 | 44 | |
43 | 45 | $object = new DolResource($db); |
@@ -33,7 +33,9 @@ |
||
33 | 33 | $langs->load('datapolicy@datapolicy'); |
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'); |
@@ -31,7 +31,9 @@ discard block |
||
31 | 31 | // Load translation files required by the page |
32 | 32 | $langs->loadLangs(array("admin", "other", "website")); |
33 | 33 | |
34 | -if (!$user->admin) accessforbidden(); |
|
34 | +if (!$user->admin) { |
|
35 | + accessforbidden(); |
|
36 | +} |
|
35 | 37 | |
36 | 38 | $conf->dol_hide_leftmenu = 1; // Force hide of left menu. |
37 | 39 | |
@@ -42,7 +44,9 @@ discard block |
||
42 | 44 | $action = GETPOST('action', 'aZ09'); |
43 | 45 | |
44 | 46 | if (GETPOST('delete')) { $action = 'delete'; } |
45 | -if (GETPOST('preview')) $action = 'preview'; |
|
47 | +if (GETPOST('preview')) { |
|
48 | + $action = 'preview'; |
|
49 | +} |
|
46 | 50 | if (GETPOST('create')) { $action = 'create'; } |
47 | 51 | if (GETPOST('editmedia')) { $action = 'editmedia'; } |
48 | 52 | if (GETPOST('editcss')) { $action = 'editcss'; } |
@@ -51,7 +55,9 @@ discard block |
||
51 | 55 | if (GETPOST('editmeta')) { $action = 'editmeta'; } |
52 | 56 | if (GETPOST('editcontent')) { $action = 'editcontent'; } |
53 | 57 | |
54 | -if (empty($action)) $action = 'preview'; |
|
58 | +if (empty($action)) { |
|
59 | + $action = 'preview'; |
|
60 | +} |
|
55 | 61 | |
56 | 62 | |
57 | 63 | |
@@ -60,8 +66,13 @@ discard block |
||
60 | 66 | * Actions |
61 | 67 | */ |
62 | 68 | |
63 | -if (GETPOST('refreshsite')) $pageid = 0; // If we change the site, we reset the pageid. |
|
64 | -if (GETPOST('refreshpage')) $action = 'preview'; |
|
69 | +if (GETPOST('refreshsite')) { |
|
70 | + $pageid = 0; |
|
71 | +} |
|
72 | +// If we change the site, we reset the pageid. |
|
73 | +if (GETPOST('refreshpage')) { |
|
74 | + $action = 'preview'; |
|
75 | +} |
|
65 | 76 | |
66 | 77 | |
67 | 78 | // Add a collab page |
@@ -157,7 +168,9 @@ discard block |
||
157 | 168 | |
158 | 169 | // Add a margin under toolbar ? |
159 | 170 | $style = ''; |
160 | -if ($action != 'preview' && $action != 'editcontent') $style = ' margin-bottom: 5px;'; |
|
171 | +if ($action != 'preview' && $action != 'editcontent') { |
|
172 | + $style = ' margin-bottom: 5px;'; |
|
173 | +} |
|
161 | 174 | |
162 | 175 | //var_dump($objectpage);exit; |
163 | 176 | print '<div class="centpercent websitebar">'; |
@@ -44,7 +44,9 @@ discard block |
||
44 | 44 | $action = GETPOST('action', 'aZ09'); |
45 | 45 | |
46 | 46 | // Security check |
47 | -if ($user->socid) $socid = $user->socid; |
|
47 | +if ($user->socid) { |
|
48 | + $socid = $user->socid; |
|
49 | +} |
|
48 | 50 | $result = restrictedArea($user, 'reception', $id, ''); |
49 | 51 | |
50 | 52 | $object = new Reception($db); |
@@ -262,7 +264,9 @@ discard block |
||
262 | 264 | foreach ($dirtpls as $reldir) |
263 | 265 | { |
264 | 266 | $res = @include dol_buildpath($reldir.'/contacts.tpl.php'); |
265 | - if ($res) break; |
|
267 | + if ($res) { |
|
268 | + break; |
|
269 | + } |
|
266 | 270 | } |
267 | 271 | } |
268 | 272 |
@@ -27,8 +27,9 @@ |
||
27 | 27 | // Load translation files required by the page |
28 | 28 | $langs->loadLangs(array('admin', 'hrm')); |
29 | 29 | |
30 | -if (!$user->admin) |
|
30 | +if (!$user->admin) { |
|
31 | 31 | accessforbidden(); |
32 | +} |
|
32 | 33 | |
33 | 34 | $action = GETPOST('action', 'aZ09'); |
34 | 35 |
@@ -261,7 +261,9 @@ |
||
261 | 261 | |
262 | 262 | // Load logs in cache |
263 | 263 | $ret = $this->dao->loadCacheMsgsTicket(); |
264 | - if ($ret < 0) dol_print_error($this->dao->db); |
|
264 | + if ($ret < 0) { |
|
265 | + dol_print_error($this->dao->db); |
|
266 | + } |
|
265 | 267 | |
266 | 268 | $action = GETPOST('action', 'aZ09'); |
267 | 269 |
@@ -34,13 +34,17 @@ |
||
34 | 34 | // List of supported format |
35 | 35 | $tmptype2label = ExtraFields::$type2label; |
36 | 36 | $type2label = array(''); |
37 | -foreach ($tmptype2label as $key => $val) $type2label[$key] = $langs->transnoentitiesnoconv($val); |
|
37 | +foreach ($tmptype2label as $key => $val) { |
|
38 | + $type2label[$key] = $langs->transnoentitiesnoconv($val); |
|
39 | +} |
|
38 | 40 | |
39 | 41 | $action = GETPOST('action', 'aZ09'); |
40 | 42 | $attrname = GETPOST('attrname', 'alpha'); |
41 | 43 | $elementtype = 'recruitment_recruitmentcandidature'; |
42 | 44 | |
43 | -if (!$user->admin) accessforbidden(); |
|
45 | +if (!$user->admin) { |
|
46 | + accessforbidden(); |
|
47 | +} |
|
44 | 48 | |
45 | 49 | |
46 | 50 | /* |
@@ -34,13 +34,17 @@ |
||
34 | 34 | // List of supported format |
35 | 35 | $tmptype2label = ExtraFields::$type2label; |
36 | 36 | $type2label = array(''); |
37 | -foreach ($tmptype2label as $key => $val) $type2label[$key] = $langs->transnoentitiesnoconv($val); |
|
37 | +foreach ($tmptype2label as $key => $val) { |
|
38 | + $type2label[$key] = $langs->transnoentitiesnoconv($val); |
|
39 | +} |
|
38 | 40 | |
39 | 41 | $action = GETPOST('action', 'aZ09'); |
40 | 42 | $attrname = GETPOST('attrname', 'alpha'); |
41 | 43 | $elementtype = 'recruitment_recruitmentjobposition'; |
42 | 44 | |
43 | -if (!$user->admin) accessforbidden(); |
|
45 | +if (!$user->admin) { |
|
46 | + accessforbidden(); |
|
47 | +} |
|
44 | 48 | |
45 | 49 | |
46 | 50 | /* |