@@ -51,7 +51,9 @@ |
||
51 | 51 | $object->fetch($id); |
52 | 52 | $object->fetch_thirdparty(); |
53 | 53 | $result = $object->add_object_linked($addlink, $objecttmp->id); |
54 | - if (isset($_POST['reftolinkto'])) unset($_POST['reftolinkto']); |
|
54 | + if (isset($_POST['reftolinkto'])) { |
|
55 | + unset($_POST['reftolinkto']); |
|
56 | + } |
|
55 | 57 | } elseif ($ret < 0) { |
56 | 58 | setEventMessages($objecttmp->error, $objecttmp->errors, 'errors'); |
57 | 59 | } else { |
@@ -203,7 +203,11 @@ |
||
203 | 203 | |
204 | 204 | |
205 | 205 | $selectedvalue=$conf->global->AGENDA_DISABLE_EXT; |
206 | -if ($selectedvalue==1) $selectedvalue=0; else $selectedvalue=1; |
|
206 | +if ($selectedvalue==1) { |
|
207 | + $selectedvalue=0; |
|
208 | +} else { |
|
209 | + $selectedvalue=1; |
|
210 | +} |
|
207 | 211 | |
208 | 212 | print "<table class=\"noborder\" width=\"100%\">"; |
209 | 213 |
@@ -75,7 +75,9 @@ |
||
75 | 75 | |
76 | 76 | $parameters = array(); |
77 | 77 | $reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks |
78 | -if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); |
|
78 | +if ($reshook < 0) { |
|
79 | + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); |
|
80 | +} |
|
79 | 81 | |
80 | 82 | if (empty($reshook)) { |
81 | 83 | $backurlforlist = DOL_URL_ROOT.'/compta/bank/list.php'; |
@@ -1120,7 +1120,9 @@ |
||
1120 | 1120 | global $langs, $conf, $mysoc; |
1121 | 1121 | |
1122 | 1122 | $ltrdirection = 'L'; |
1123 | - if ($outputlangs->trans("DIRECTION") == 'rtl') $ltrdirection = 'R'; |
|
1123 | + if ($outputlangs->trans("DIRECTION") == 'rtl') { |
|
1124 | + $ltrdirection = 'R'; |
|
1125 | + } |
|
1124 | 1126 | |
1125 | 1127 | // Load translation files required by the page |
1126 | 1128 | $outputlangs->loadLangs(array("main", "orders", "companies", "bills", "sendings")); |
@@ -304,8 +304,11 @@ |
||
304 | 304 | } |
305 | 305 | } |
306 | 306 | |
307 | - if (!$error) $db->commit(); |
|
308 | - else $db->rollback(); |
|
307 | + if (!$error) { |
|
308 | + $db->commit(); |
|
309 | + } else { |
|
310 | + $db->rollback(); |
|
311 | + } |
|
309 | 312 | } |
310 | 313 | } |
311 | 314 |
@@ -152,7 +152,9 @@ |
||
152 | 152 | accessforbidden(); |
153 | 153 | } |
154 | 154 | $result = restrictedArea($user, 'eventorganization'); |
155 | -if (!$permissiontoread) accessforbidden(); |
|
155 | +if (!$permissiontoread) { |
|
156 | + accessforbidden(); |
|
157 | +} |
|
156 | 158 | |
157 | 159 | |
158 | 160 | /* |
@@ -49,7 +49,9 @@ |
||
49 | 49 | $socid = GETPOST('socid', 'int'); |
50 | 50 | |
51 | 51 | // Security check |
52 | -if ($user->socid) $socid = $user->socid; |
|
52 | +if ($user->socid) { |
|
53 | + $socid = $user->socid; |
|
54 | +} |
|
53 | 55 | |
54 | 56 | $search_ref = GETPOST('search_ref', 'alpha'); |
55 | 57 | $search_date_startday = GETPOST('search_date_startday', 'int'); |
@@ -51,7 +51,9 @@ |
||
51 | 51 | $userid = GETPOST('userid', 'int'); |
52 | 52 | |
53 | 53 | // Security check |
54 | -if ($user->socid) $socid = $user->socid; |
|
54 | +if ($user->socid) { |
|
55 | + $socid = $user->socid; |
|
56 | +} |
|
55 | 57 | $result = restrictedArea($user, 'facture', $facid, ''); |
56 | 58 | |
57 | 59 | $search_ref = GETPOST("search_ref", "alpha"); |
@@ -4025,7 +4025,9 @@ discard block |
||
4025 | 4025 | } |
4026 | 4026 | } |
4027 | 4027 | } |
4028 | - if ($nbMandated > 0 ) $text .= '<div><span class="clearboth nowraponall warning">'.$langs->trans("mandatoryPeriodNeedTobeSetMsgValidate").'</span></div>'; |
|
4028 | + if ($nbMandated > 0 ) { |
|
4029 | + $text .= '<div><span class="clearboth nowraponall warning">'.$langs->trans("mandatoryPeriodNeedTobeSetMsgValidate").'</span></div>'; |
|
4030 | + } |
|
4029 | 4031 | |
4030 | 4032 | |
4031 | 4033 | $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?facid='.$object->id, $langs->trans('ValidateBill'), $text, 'confirm_valid', $formquestion, (($object->type != Facture::TYPE_CREDIT_NOTE && $object->total_ttc < 0) ? "no" : "yes"), 2); |
@@ -5276,9 +5278,12 @@ discard block |
||
5276 | 5278 | |
5277 | 5279 | $parameters = array(); |
5278 | 5280 | $reshook = $hookmanager->executeHooks('formAddObjectLine', $parameters, $object, $action); // Note that $action and $object may have been modified by hook |
5279 | - if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); |
|
5280 | - if (empty($reshook)) |
|
5281 | - $object->formAddObjectLine(1, $mysoc, $soc); |
|
5281 | + if ($reshook < 0) { |
|
5282 | + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); |
|
5283 | + } |
|
5284 | + if (empty($reshook)) { |
|
5285 | + $object->formAddObjectLine(1, $mysoc, $soc); |
|
5286 | + } |
|
5282 | 5287 | } |
5283 | 5288 | } |
5284 | 5289 |