@@ -18,13 +18,27 @@ |
||
18 | 18 | * Library javascript to enable Browser notifications |
19 | 19 | */ |
20 | 20 | |
21 | -if (!defined('NOREQUIREUSER')) define('NOREQUIREUSER', '1'); |
|
22 | -if (!defined('NOREQUIRESOC')) define('NOREQUIRESOC', '1'); |
|
23 | -if (!defined('NOCSRFCHECK')) define('NOCSRFCHECK', 1); |
|
24 | -if (!defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', 1); |
|
25 | -if (!defined('NOLOGIN')) define('NOLOGIN', 1); |
|
26 | -if (!defined('NOREQUIREMENU')) define('NOREQUIREMENU', 1); |
|
27 | -if (!defined('NOREQUIREHTML')) define('NOREQUIREHTML', 1); |
|
21 | +if (!defined('NOREQUIREUSER')) { |
|
22 | + define('NOREQUIREUSER', '1'); |
|
23 | +} |
|
24 | +if (!defined('NOREQUIRESOC')) { |
|
25 | + define('NOREQUIRESOC', '1'); |
|
26 | +} |
|
27 | +if (!defined('NOCSRFCHECK')) { |
|
28 | + define('NOCSRFCHECK', 1); |
|
29 | +} |
|
30 | +if (!defined('NOTOKENRENEWAL')) { |
|
31 | + define('NOTOKENRENEWAL', 1); |
|
32 | +} |
|
33 | +if (!defined('NOLOGIN')) { |
|
34 | + define('NOLOGIN', 1); |
|
35 | +} |
|
36 | +if (!defined('NOREQUIREMENU')) { |
|
37 | + define('NOREQUIREMENU', 1); |
|
38 | +} |
|
39 | +if (!defined('NOREQUIREHTML')) { |
|
40 | + define('NOREQUIREHTML', 1); |
|
41 | +} |
|
28 | 42 | |
29 | 43 | require_once '../../main.inc.php'; |
30 | 44 |
@@ -133,9 +133,15 @@ |
||
133 | 133 | global $langs; |
134 | 134 | $langs->load("admin"); |
135 | 135 | |
136 | - if ($this->version == 'development') return $langs->trans("VersionDevelopment"); |
|
137 | - if ($this->version == 'experimental') return $langs->trans("VersionExperimental"); |
|
138 | - if ($this->version == 'dolibarr') return DOL_VERSION; |
|
136 | + if ($this->version == 'development') { |
|
137 | + return $langs->trans("VersionDevelopment"); |
|
138 | + } |
|
139 | + if ($this->version == 'experimental') { |
|
140 | + return $langs->trans("VersionExperimental"); |
|
141 | + } |
|
142 | + if ($this->version == 'dolibarr') { |
|
143 | + return DOL_VERSION; |
|
144 | + } |
|
139 | 145 | return $langs->trans("NotAvailable"); |
140 | 146 | } |
141 | 147 | } |
@@ -309,7 +309,9 @@ |
||
309 | 309 | $multicurrency->name = $langs->cache_currencies[$conf->currency]['label'].' ('.$langs->getCurrencySymbol($conf->currency).')'; |
310 | 310 | $r = $multicurrency->create($user); |
311 | 311 | |
312 | - if ($r > 0) $multicurrency->addRate(1); |
|
312 | + if ($r > 0) { |
|
313 | + $multicurrency->addRate(1); |
|
314 | + } |
|
313 | 315 | } |
314 | 316 | } |
315 | 317 | } |
@@ -132,8 +132,8 @@ |
||
132 | 132 | |
133 | 133 | if ($action == 'display' || $action == 'delete') { |
134 | 134 | |
135 | - print "<table class='noborder' width='100%'>\n"; |
|
136 | - print '<tr class="liste_titre">'; |
|
135 | + print "<table class='noborder' width='100%'>\n"; |
|
136 | + print '<tr class="liste_titre">'; |
|
137 | 137 | print '<td class="liste_titre">'.$langs->trans("AccountAccounting")."</td>"; |
138 | 138 | print '<td class="liste_titre" colspan="2">'.$langs->trans("Label")."</td>"; |
139 | 139 | print "</tr>\n"; |
@@ -62,8 +62,9 @@ |
||
62 | 62 | if (!empty($selectcpt)) { |
63 | 63 | $cpts = array(); |
64 | 64 | foreach ($selectcpt as $selectedoption) { |
65 | - if (!array_key_exists($selectedoption, $cpts)) |
|
66 | - $cpts[$selectedoption] = "'".$selectedoption."'"; |
|
65 | + if (!array_key_exists($selectedoption, $cpts)) { |
|
66 | + $cpts[$selectedoption] = "'".$selectedoption."'"; |
|
67 | + } |
|
67 | 68 | } |
68 | 69 | |
69 | 70 | $return = $accountingcategory->updateAccAcc($cat_id, $cpts); |
@@ -26,8 +26,9 @@ |
||
26 | 26 | |
27 | 27 | $langs->load("admin"); |
28 | 28 | |
29 | -if (!$user->admin) |
|
29 | +if (!$user->admin) { |
|
30 | 30 | accessforbidden(); |
31 | +} |
|
31 | 32 | |
32 | 33 | /* |
33 | 34 | * View |
@@ -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 | } |
@@ -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 | } |
@@ -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 | } |
@@ -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 | } |