@@ -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 | } |
@@ -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 | } |
@@ -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 | } |