@@ -110,7 +110,9 @@ |
||
| 110 | 110 | accessforbidden(); |
| 111 | 111 | } |
| 112 | 112 | //$result = restrictedArea($user, 'productbatch'); |
| 113 | -if (!$permissiontoread) accessforbidden(); |
|
| 113 | +if (!$permissiontoread) { |
|
| 114 | + accessforbidden(); |
|
| 115 | +} |
|
| 114 | 116 | |
| 115 | 117 | |
| 116 | 118 | /* |
@@ -110,7 +110,9 @@ |
||
| 110 | 110 | accessforbidden(); |
| 111 | 111 | } |
| 112 | 112 | //$result = restrictedArea($user, 'productbatch'); |
| 113 | -if (!$permissiontoread) accessforbidden(); |
|
| 113 | +if (!$permissiontoread) { |
|
| 114 | + accessforbidden(); |
|
| 115 | +} |
|
| 114 | 116 | |
| 115 | 117 | |
| 116 | 118 | /* |
@@ -46,8 +46,12 @@ |
||
| 46 | 46 | // 'ZAPIERFORDOLIBARR_MYPARAM2'=>array('css'=>'minwidth500', 'enabled'=>1) |
| 47 | 47 | ); |
| 48 | 48 | |
| 49 | -if (empty($conf->zapier->enabled)) accessforbidden(); |
|
| 50 | -if (empty($user->admin)) accessforbidden(); |
|
| 49 | +if (empty($conf->zapier->enabled)) { |
|
| 50 | + accessforbidden(); |
|
| 51 | +} |
|
| 52 | +if (empty($user->admin)) { |
|
| 53 | + accessforbidden(); |
|
| 54 | +} |
|
| 51 | 55 | |
| 52 | 56 | |
| 53 | 57 | /* |
@@ -489,8 +489,11 @@ discard block |
||
| 489 | 489 | print '<td class="left">' . dol_print_date($fields['datef'], 'day') . '</td>'; |
| 490 | 490 | |
| 491 | 491 | // Payment date |
| 492 | - if ($conf->global->TAX_MODE_SELL_PRODUCT == 'payment' || $conf->global->TAX_MODE_SELL_SERVICE == 'payment') print '<td class="left">' . dol_print_date($fields['datep'], 'day') . '</td>'; |
|
| 493 | - else print '<td></td>'; |
|
| 492 | + if ($conf->global->TAX_MODE_SELL_PRODUCT == 'payment' || $conf->global->TAX_MODE_SELL_SERVICE == 'payment') { |
|
| 493 | + print '<td class="left">' . dol_print_date($fields['datep'], 'day') . '</td>'; |
|
| 494 | + } else { |
|
| 495 | + print '<td></td>'; |
|
| 496 | + } |
|
| 494 | 497 | |
| 495 | 498 | // Company name |
| 496 | 499 | print '<td class="tdmaxoverflow150">'; |
@@ -620,8 +623,11 @@ discard block |
||
| 620 | 623 | print '<tr class="liste_titre liste_titre_topborder">'; |
| 621 | 624 | print '<td class="left">'.$elementsup.'</td>'; |
| 622 | 625 | print '<td class="left">'.$langs->trans("DateInvoice").'</td>'; |
| 623 | - if ($conf->global->TAX_MODE_BUY_PRODUCT == 'payment' || $conf->global->TAX_MODE_BUY_SERVICE == 'payment') print '<td class="left">'.$langs->trans("DatePayment").'</td>'; |
|
| 624 | - else print '<td></td>'; |
|
| 626 | + if ($conf->global->TAX_MODE_BUY_PRODUCT == 'payment' || $conf->global->TAX_MODE_BUY_SERVICE == 'payment') { |
|
| 627 | + print '<td class="left">'.$langs->trans("DatePayment").'</td>'; |
|
| 628 | + } else { |
|
| 629 | + print '<td></td>'; |
|
| 630 | + } |
|
| 625 | 631 | print '<td class="left">'.$namesup.'</td>'; |
| 626 | 632 | print '<td class="left">'.$productsup.'</td>'; |
| 627 | 633 | if ($modetax != 1) { |
@@ -92,10 +92,18 @@ |
||
| 92 | 92 | global $langs; |
| 93 | 93 | $langs->load("admin"); |
| 94 | 94 | |
| 95 | - if ($this->version == 'development') return $langs->trans("VersionDevelopment"); |
|
| 96 | - if ($this->version == 'experimental') return $langs->trans("VersionExperimental"); |
|
| 97 | - if ($this->version == 'dolibarr') return DOL_VERSION; |
|
| 98 | - if ($this->version) return $this->version; |
|
| 95 | + if ($this->version == 'development') { |
|
| 96 | + return $langs->trans("VersionDevelopment"); |
|
| 97 | + } |
|
| 98 | + if ($this->version == 'experimental') { |
|
| 99 | + return $langs->trans("VersionExperimental"); |
|
| 100 | + } |
|
| 101 | + if ($this->version == 'dolibarr') { |
|
| 102 | + return DOL_VERSION; |
|
| 103 | + } |
|
| 104 | + if ($this->version) { |
|
| 105 | + return $this->version; |
|
| 106 | + } |
|
| 99 | 107 | return $langs->trans("NotAvailable"); |
| 100 | 108 | } |
| 101 | 109 | } |
@@ -560,7 +560,9 @@ |
||
| 560 | 560 | $formmail = new FormMail($this->db); |
| 561 | 561 | $arraydefaultmessage = null; |
| 562 | 562 | |
| 563 | - if (!empty($labeltouse)) $arraydefaultmessage = $formmail->getEMailTemplate($this->db, $object_type.'_send', $user, $outputlangs, 0, 1, $labeltouse); |
|
| 563 | + if (!empty($labeltouse)) { |
|
| 564 | + $arraydefaultmessage = $formmail->getEMailTemplate($this->db, $object_type.'_send', $user, $outputlangs, 0, 1, $labeltouse); |
|
| 565 | + } |
|
| 564 | 566 | if (!empty($labeltouse) && is_object($arraydefaultmessage) && $arraydefaultmessage->id > 0) { |
| 565 | 567 | $substitutionarray = getCommonSubstitutionArray($outputlangs, 0, null, $object); |
| 566 | 568 | complete_substitutions_array($substitutionarray, $outputlangs, $object); |
@@ -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 | /* |
@@ -21,7 +21,10 @@ |
||
| 21 | 21 | * \brief Popup screen to validate VAT |
| 22 | 22 | */ |
| 23 | 23 | |
| 24 | -if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', '1'); // Do not roll the Anti CSRF token (used if MAIN_SECURITY_CSRF_WITH_TOKEN is on) |
|
| 24 | +if (! defined('NOTOKENRENEWAL')) { |
|
| 25 | + define('NOTOKENRENEWAL', '1'); |
|
| 26 | +} |
|
| 27 | +// Do not roll the Anti CSRF token (used if MAIN_SECURITY_CSRF_WITH_TOKEN is on) |
|
| 25 | 28 | |
| 26 | 29 | require "../../main.inc.php"; |
| 27 | 30 | require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; |
@@ -820,7 +820,9 @@ |
||
| 820 | 820 | } |
| 821 | 821 | |
| 822 | 822 | $statusType = 'status'.$status; |
| 823 | - if ($status == self::STATUS_VALIDATED) $statusType = 'status4'; |
|
| 823 | + if ($status == self::STATUS_VALIDATED) { |
|
| 824 | + $statusType = 'status4'; |
|
| 825 | + } |
|
| 824 | 826 | if ($status == self::STATUS_CANCELED) { |
| 825 | 827 | $statusType = 'status6'; |
| 826 | 828 | } |