@@ -24,7 +24,9 @@ |
||
24 | 24 | |
25 | 25 | $langs->load("admin"); |
26 | 26 | |
27 | -if (!$user->admin) accessforbidden(); |
|
27 | +if (!$user->admin) { |
|
28 | + accessforbidden(); |
|
29 | +} |
|
28 | 30 | |
29 | 31 | $action = GETPOST('action', 'aZ09'); |
30 | 32 |
@@ -27,8 +27,9 @@ |
||
27 | 27 | // Load translation files required by the page |
28 | 28 | $langs->loadLangs(array("companies", "admin")); |
29 | 29 | |
30 | -if (!$user->admin) |
|
30 | +if (!$user->admin) { |
|
31 | 31 | accessforbidden(); |
32 | +} |
|
32 | 33 | |
33 | 34 | |
34 | 35 | /* |
@@ -29,7 +29,9 @@ discard block |
||
29 | 29 | // Load translation files required by the page |
30 | 30 | $langs->loadLangs(array("other", "users", "admin")); |
31 | 31 | |
32 | -if (!$user->admin) accessforbidden(); |
|
32 | +if (!$user->admin) { |
|
33 | + accessforbidden(); |
|
34 | +} |
|
33 | 35 | |
34 | 36 | $upload_dir = $conf->admin->dir_temp; |
35 | 37 | |
@@ -61,7 +63,9 @@ discard block |
||
61 | 63 | $result += dolibarr_set_const($db, 'MAIN_PROXY_PORT', GETPOST("MAIN_PROXY_PORT"), 'chaine', 0, '', $conf->entity); |
62 | 64 | $result += dolibarr_set_const($db, 'MAIN_PROXY_USER', GETPOST("MAIN_PROXY_USER"), 'chaine', 0, '', $conf->entity); |
63 | 65 | $result += dolibarr_set_const($db, 'MAIN_PROXY_PASS', GETPOST("MAIN_PROXY_PASS"), 'chaine', 0, '', $conf->entity); |
64 | - if ($result < 5) dol_print_error($db); |
|
66 | + if ($result < 5) { |
|
67 | + dol_print_error($db); |
|
68 | + } |
|
65 | 69 | } |
66 | 70 | |
67 | 71 | if (!$error) |
@@ -31,7 +31,9 @@ discard block |
||
31 | 31 | // Load translation files required by the page |
32 | 32 | $langs->loadLangs(array('admin', 'companies', 'other')); |
33 | 33 | |
34 | -if (!$user->admin) accessforbidden(); |
|
34 | +if (!$user->admin) { |
|
35 | + accessforbidden(); |
|
36 | +} |
|
35 | 37 | |
36 | 38 | $error = 0; |
37 | 39 | |
@@ -42,7 +44,9 @@ discard block |
||
42 | 44 | |
43 | 45 | $parameters = array(); |
44 | 46 | $reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks |
45 | -if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); |
|
47 | +if ($reshook < 0) { |
|
48 | + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); |
|
49 | +} |
|
46 | 50 | |
47 | 51 | if (($action == 'update' && !GETPOST("cancel", 'alpha')) |
48 | 52 | || ($action == 'updateedit')) |
@@ -26,14 +26,23 @@ |
||
26 | 26 | // This script is called with a POST method. |
27 | 27 | // Directory to scan (full path) is inside POST['dir']. |
28 | 28 | |
29 | -if (!defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', 1); // Disables token renewal |
|
30 | -if (!defined('NOREQUIREMENU')) define('NOREQUIREMENU', '1'); |
|
31 | -if (!defined('NOREQUIREHTML')) define('NOREQUIREHTML', '1'); |
|
29 | +if (!defined('NOTOKENRENEWAL')) { |
|
30 | + define('NOTOKENRENEWAL', 1); |
|
31 | +} |
|
32 | +// Disables token renewal |
|
33 | +if (!defined('NOREQUIREMENU')) { |
|
34 | + define('NOREQUIREMENU', '1'); |
|
35 | +} |
|
36 | +if (!defined('NOREQUIREHTML')) { |
|
37 | + define('NOREQUIREHTML', '1'); |
|
38 | +} |
|
32 | 39 | |
33 | 40 | |
34 | 41 | require '../../main.inc.php'; |
35 | 42 | |
36 | -if (empty($conf->global->BLOCKEDLOG_AUTHORITY_URL)) exit('BLOCKEDLOG_AUTHORITY_URL not set'); |
|
43 | +if (empty($conf->global->BLOCKEDLOG_AUTHORITY_URL)) { |
|
44 | + exit('BLOCKEDLOG_AUTHORITY_URL not set'); |
|
45 | +} |
|
37 | 46 | |
38 | 47 | require_once DOL_DOCUMENT_ROOT.'/blockedlog/class/blockedlog.class.php'; |
39 | 48 | require_once DOL_DOCUMENT_ROOT.'/blockedlog/class/authority.class.php'; |
@@ -26,9 +26,16 @@ |
||
26 | 26 | // This script is called with a POST method. |
27 | 27 | // Directory to scan (full path) is inside POST['dir']. |
28 | 28 | |
29 | -if (!defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', 1); // Disables token renewal |
|
30 | -if (!defined('NOREQUIREMENU')) define('NOREQUIREMENU', '1'); |
|
31 | -if (!defined('NOREQUIREHTML')) define('NOREQUIREHTML', '1'); |
|
29 | +if (!defined('NOTOKENRENEWAL')) { |
|
30 | + define('NOTOKENRENEWAL', 1); |
|
31 | +} |
|
32 | +// Disables token renewal |
|
33 | +if (!defined('NOREQUIREMENU')) { |
|
34 | + define('NOREQUIREMENU', '1'); |
|
35 | +} |
|
36 | +if (!defined('NOREQUIREHTML')) { |
|
37 | + define('NOREQUIREHTML', '1'); |
|
38 | +} |
|
32 | 39 | |
33 | 40 | $res = require '../../main.inc.php'; |
34 | 41 |
@@ -22,14 +22,27 @@ discard block |
||
22 | 22 | |
23 | 23 | //if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER','1'); // Not disabled because need to load personalized language |
24 | 24 | //if (! defined('NOREQUIREDB')) define('NOREQUIREDB','1'); // Not disabled to increase speed. Language code is found on url. |
25 | -if (!defined('NOREQUIRESOC')) define('NOREQUIRESOC', '1'); |
|
25 | +if (!defined('NOREQUIRESOC')) { |
|
26 | + define('NOREQUIRESOC', '1'); |
|
27 | +} |
|
26 | 28 | //if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN','1'); // Not disabled because need to do translations |
27 | -if (!defined('NOCSRFCHECK')) define('NOCSRFCHECK', 1); |
|
28 | -if (!defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', 1); |
|
29 | -if (!defined('NOLOGIN')) define('NOLOGIN', 1); // File must be accessed by logon page so without login |
|
29 | +if (!defined('NOCSRFCHECK')) { |
|
30 | + define('NOCSRFCHECK', 1); |
|
31 | +} |
|
32 | +if (!defined('NOTOKENRENEWAL')) { |
|
33 | + define('NOTOKENRENEWAL', 1); |
|
34 | +} |
|
35 | +if (!defined('NOLOGIN')) { |
|
36 | + define('NOLOGIN', 1); |
|
37 | +} |
|
38 | +// File must be accessed by logon page so without login |
|
30 | 39 | //if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU',1); // We need top menu content |
31 | -if (!defined('NOREQUIREHTML')) define('NOREQUIREHTML', 1); |
|
32 | -if (!defined('NOREQUIREAJAX')) define('NOREQUIREAJAX', '1'); |
|
40 | +if (!defined('NOREQUIREHTML')) { |
|
41 | + define('NOREQUIREHTML', 1); |
|
42 | +} |
|
43 | +if (!defined('NOREQUIREAJAX')) { |
|
44 | + define('NOREQUIREAJAX', '1'); |
|
45 | +} |
|
33 | 46 | |
34 | 47 | session_cache_limiter('public'); |
35 | 48 | |
@@ -39,8 +52,11 @@ discard block |
||
39 | 52 | // Define css type |
40 | 53 | top_httphead('text/css'); |
41 | 54 | // Important: Following code is to avoid page request by browser and PHP CPU at each Dolibarr page access. |
42 | -if (empty($dolibarr_nocache)) header('Cache-Control: max-age=3600, public, must-revalidate'); |
|
43 | -else header('Cache-Control: no-cache'); |
|
55 | +if (empty($dolibarr_nocache)) { |
|
56 | + header('Cache-Control: max-age=3600, public, must-revalidate'); |
|
57 | +} else { |
|
58 | + header('Cache-Control: no-cache'); |
|
59 | +} |
|
44 | 60 | |
45 | 61 | ?> |
46 | 62 |
@@ -42,7 +42,9 @@ |
||
42 | 42 | |
43 | 43 | // Security check |
44 | 44 | $socid = 0; |
45 | -if ($user->socid) $socid = $user->socid; |
|
45 | +if ($user->socid) { |
|
46 | + $socid = $user->socid; |
|
47 | +} |
|
46 | 48 | $result = restrictedArea($user, 'commande', $id, ''); |
47 | 49 | |
48 | 50 |
@@ -26,7 +26,9 @@ |
||
26 | 26 | { |
27 | 27 | global $conf; |
28 | 28 | |
29 | - if (empty($conf->global->CASHDESK_SHOW_KEYPAD)) return ''; |
|
29 | + if (empty($conf->global->CASHDESK_SHOW_KEYPAD)) { |
|
30 | + return ''; |
|
31 | + } |
|
30 | 32 | |
31 | 33 | // défine the font size of button |
32 | 34 | $btnsize = 32; |