@@ -663,7 +663,9 @@ |
||
663 | 663 | print $object->getLibStatut(5); |
664 | 664 | } elseif ($key == 'fk_parent_line') { |
665 | 665 | $moparent = $object->getMoParent(); |
666 | - if (is_object($moparent)) print $moparent->getNomUrl(1); |
|
666 | + if (is_object($moparent)) { |
|
667 | + print $moparent->getNomUrl(1); |
|
668 | + } |
|
667 | 669 | } elseif ($key == 'rowid') { |
668 | 670 | print $object->showOutputField($val, $key, $object->id, ''); |
669 | 671 | } else { |
@@ -132,7 +132,9 @@ |
||
132 | 132 | // Ref |
133 | 133 | if (!empty($stripeacc)) { |
134 | 134 | $connect = $stripeacc.'/'; |
135 | - } else $connect = null; |
|
135 | + } else { |
|
136 | + $connect = null; |
|
137 | + } |
|
136 | 138 | |
137 | 139 | $url = 'https://dashboard.stripe.com/'.$connect.'test/payouts/'.$payout->id; |
138 | 140 | if ($servicestatus) { |
@@ -95,8 +95,12 @@ discard block |
||
95 | 95 | //if ($user->socid > 0) $socid = $user->socid; |
96 | 96 | //$isdraft = (isset($object->status) && ($object->status == $object::STATUS_DRAFT) ? 1 : 0); |
97 | 97 | //restrictedArea($user, $object->element, $object->id, $object->table_element, '', 'fk_soc', 'rowid', $isdraft); |
98 | -if (empty($conf->webhook->enabled)) accessforbidden(); |
|
99 | -if (!$permissiontoread) accessforbidden(); |
|
98 | +if (empty($conf->webhook->enabled)) { |
|
99 | + accessforbidden(); |
|
100 | +} |
|
101 | +if (!$permissiontoread) { |
|
102 | + accessforbidden(); |
|
103 | +} |
|
100 | 104 | |
101 | 105 | |
102 | 106 | /* |
@@ -433,8 +437,9 @@ discard block |
||
433 | 437 | if ($reshook < 0) { |
434 | 438 | setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); |
435 | 439 | } |
436 | - if (empty($reshook)) |
|
437 | - $object->formAddObjectLine(1, $mysoc, $soc); |
|
440 | + if (empty($reshook)) { |
|
441 | + $object->formAddObjectLine(1, $mysoc, $soc); |
|
442 | + } |
|
438 | 443 | } |
439 | 444 | } |
440 | 445 |
@@ -1444,7 +1444,9 @@ discard block |
||
1444 | 1444 | if (GETPOST('contactid', 'int')) { |
1445 | 1445 | $preselectedids[GETPOST('contactid', 'int')] = GETPOST('contactid', 'int'); |
1446 | 1446 | } |
1447 | - if ($origin=='contact') $preselectedids[GETPOST('originid', 'int')] = GETPOST('originid', 'int'); |
|
1447 | + if ($origin=='contact') { |
|
1448 | + $preselectedids[GETPOST('originid', 'int')] = GETPOST('originid', 'int'); |
|
1449 | + } |
|
1448 | 1450 | print img_picto('', 'contact', 'class="paddingrightonly"'); |
1449 | 1451 | print $form->selectcontacts(empty($conf->global->MAIN_ACTIONCOM_CAN_ADD_ANY_CONTACT) ? GETPOST('socid', 'int') : 0, $preselectedids, 'socpeopleassigned[]', 1, '', '', 0, 'minwidth300 quatrevingtpercent', false, 0, array(), false, 'multiple', 'contactid'); |
1450 | 1452 | print '</td></tr>'; |
@@ -2131,8 +2133,11 @@ discard block |
||
2131 | 2133 | // Call Hook formConfirm |
2132 | 2134 | $parameters = array(); |
2133 | 2135 | $reshook = $hookmanager->executeHooks('formConfirm', $parameters, $object, $action); // Note that $action and $object may have been modified by hook |
2134 | - if (empty($reshook)) $formconfirm.=$hookmanager->resPrint; |
|
2135 | - elseif ($reshook > 0) $formconfirm=$hookmanager->resPrint; |
|
2136 | + if (empty($reshook)) { |
|
2137 | + $formconfirm.=$hookmanager->resPrint; |
|
2138 | + } elseif ($reshook > 0) { |
|
2139 | + $formconfirm=$hookmanager->resPrint; |
|
2140 | + } |
|
2136 | 2141 | |
2137 | 2142 | // Print form confirm |
2138 | 2143 | print $formconfirm; |
@@ -139,7 +139,9 @@ discard block |
||
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 |
||
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 |
@@ -714,7 +714,9 @@ |
||
714 | 714 | global $conf, $langs, $hookmanager; |
715 | 715 | |
716 | 716 | $ltrdirection = 'L'; |
717 | - if ($outputlangs->trans("DIRECTION") == 'rtl') $ltrdirection = 'R'; |
|
717 | + if ($outputlangs->trans("DIRECTION") == 'rtl') { |
|
718 | + $ltrdirection = 'R'; |
|
719 | + } |
|
718 | 720 | |
719 | 721 | // Load traductions files required by page |
720 | 722 | $outputlangs->loadLangs(array("main", "propal", "companies", "bills", "orders")); |
@@ -47,9 +47,10 @@ discard block |
||
47 | 47 | // if we set another view list mode, we keep it (till we change one more time) |
48 | 48 | if (GETPOSTISSET('mode')) { |
49 | 49 | $mode = GETPOST('mode', 'alpha'); |
50 | - if ($mode =='common' || $mode =='commonkanban') |
|
51 | - dolibarr_set_const($db, "MAIN_MODULE_SETUP_ON_LIST_BY_DEFAULT", $mode, 'chaine', 0, '', $conf->entity); |
|
52 | -} else { |
|
50 | + if ($mode =='common' || $mode =='commonkanban') { |
|
51 | + dolibarr_set_const($db, "MAIN_MODULE_SETUP_ON_LIST_BY_DEFAULT", $mode, 'chaine', 0, '', $conf->entity); |
|
52 | + } |
|
53 | + } else { |
|
53 | 54 | $mode = (empty($conf->global->MAIN_MODULE_SETUP_ON_LIST_BY_DEFAULT) ? 'commonkanban' : $conf->global->MAIN_MODULE_SETUP_ON_LIST_BY_DEFAULT); |
54 | 55 | } |
55 | 56 | |
@@ -520,9 +521,15 @@ discard block |
||
520 | 521 | $nbofactivatedmodules = count($conf->modules); |
521 | 522 | |
522 | 523 | $nbmodulesnotautoenabled = count($conf->modules); |
523 | -if (in_array('fckeditor', $conf->modules)) $nbmodulesnotautoenabled--; |
|
524 | -if (in_array('export', $conf->modules)) $nbmodulesnotautoenabled--; |
|
525 | -if (in_array('import', $conf->modules)) $nbmodulesnotautoenabled--; |
|
524 | +if (in_array('fckeditor', $conf->modules)) { |
|
525 | + $nbmodulesnotautoenabled--; |
|
526 | +} |
|
527 | +if (in_array('export', $conf->modules)) { |
|
528 | + $nbmodulesnotautoenabled--; |
|
529 | +} |
|
530 | +if (in_array('import', $conf->modules)) { |
|
531 | + $nbmodulesnotautoenabled--; |
|
532 | +} |
|
526 | 533 | |
527 | 534 | print load_fiche_titre($langs->trans("ModulesSetup"), '', 'title_setup'); |
528 | 535 |
@@ -106,9 +106,15 @@ |
||
106 | 106 | print '<section class="setupsection">'; |
107 | 107 | |
108 | 108 | $nbmodulesnotautoenabled = count($conf->modules); |
109 | -if (in_array('fckeditor', $conf->modules)) $nbmodulesnotautoenabled--; |
|
110 | -if (in_array('export', $conf->modules)) $nbmodulesnotautoenabled--; |
|
111 | -if (in_array('import', $conf->modules)) $nbmodulesnotautoenabled--; |
|
109 | +if (in_array('fckeditor', $conf->modules)) { |
|
110 | + $nbmodulesnotautoenabled--; |
|
111 | +} |
|
112 | +if (in_array('export', $conf->modules)) { |
|
113 | + $nbmodulesnotautoenabled--; |
|
114 | +} |
|
115 | +if (in_array('import', $conf->modules)) { |
|
116 | + $nbmodulesnotautoenabled--; |
|
117 | +} |
|
112 | 118 | |
113 | 119 | // Show info setup module |
114 | 120 | print img_picto('', 'cog', 'class="paddingright valignmiddle double"').' '.$langs->trans("SetupDescriptionLink", DOL_URL_ROOT.'/admin/modules.php?mainmenu=home', $langs->transnoentities("Setup"), $langs->transnoentities("Modules")); |
@@ -1088,9 +1088,15 @@ |
||
1088 | 1088 | |
1089 | 1089 | if ($usemenuhider || empty($leftmenu) || $leftmenu == "setup") { |
1090 | 1090 | $nbmodulesnotautoenabled = count($conf->modules); |
1091 | - if (in_array('fckeditor', $conf->modules)) $nbmodulesnotautoenabled--; |
|
1092 | - if (in_array('export', $conf->modules)) $nbmodulesnotautoenabled--; |
|
1093 | - if (in_array('import', $conf->modules)) $nbmodulesnotautoenabled--; |
|
1091 | + if (in_array('fckeditor', $conf->modules)) { |
|
1092 | + $nbmodulesnotautoenabled--; |
|
1093 | + } |
|
1094 | + if (in_array('export', $conf->modules)) { |
|
1095 | + $nbmodulesnotautoenabled--; |
|
1096 | + } |
|
1097 | + if (in_array('import', $conf->modules)) { |
|
1098 | + $nbmodulesnotautoenabled--; |
|
1099 | + } |
|
1094 | 1100 | |
1095 | 1101 | // Load translation files required by the page |
1096 | 1102 | $langs->loadLangs(array("admin", "help")); |