@@ -535,7 +535,9 @@ discard block |
||
| 535 | 535 | // Type |
| 536 | 536 | if (!empty($arrayfields['t.fk_typepayment']['checked'])) { |
| 537 | 537 | print '<td>'; |
| 538 | - if (!empty($obj->payment_code)) print $langs->trans("PaymentTypeShort".$obj->payment_code); |
|
| 538 | + if (!empty($obj->payment_code)) { |
|
| 539 | + print $langs->trans("PaymentTypeShort".$obj->payment_code); |
|
| 540 | + } |
|
| 539 | 541 | print '</td>'; |
| 540 | 542 | if (!$i) { |
| 541 | 543 | $totalarray['nbfield']++; |
@@ -562,7 +564,9 @@ discard block |
||
| 562 | 564 | print $bankstatic->getNomUrl(1); |
| 563 | 565 | } |
| 564 | 566 | print '</td>'; |
| 565 | - if (!$i) $totalarray['nbfield']++; |
|
| 567 | + if (!$i) { |
|
| 568 | + $totalarray['nbfield']++; |
|
| 569 | + } |
|
| 566 | 570 | } |
| 567 | 571 | |
| 568 | 572 | // Amount |
@@ -40,7 +40,9 @@ |
||
| 40 | 40 | $titreform = 'SendMail'; |
| 41 | 41 | |
| 42 | 42 | $object->fetch_projet(); |
| 43 | - if (!isset($file)) $file = null; |
|
| 43 | + if (!isset($file)) { |
|
| 44 | + $file = null; |
|
| 45 | + } |
|
| 44 | 46 | $ref = dol_sanitizeFileName($object->ref); |
| 45 | 47 | if (!in_array($object->element, array('user', 'member'))) { |
| 46 | 48 | //$fileparams['fullname'] can be filled from the card |
@@ -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 | |