@@ -35,7 +35,9 @@ |
||
35 | 35 | |
36 | 36 | // Security check |
37 | 37 | $socid = GETPOST("socid", "int"); |
38 | -if ($user->socid) $socid = $user->socid; |
|
38 | +if ($user->socid) { |
|
39 | + $socid = $user->socid; |
|
40 | +} |
|
39 | 41 | $result = restrictedArea($user, 'banque', '', '', ''); |
40 | 42 | |
41 | 43 | /* |
@@ -39,7 +39,9 @@ discard block |
||
39 | 39 | |
40 | 40 | // Security check |
41 | 41 | $socid = GETPOST('socid', 'int'); |
42 | -if ($user->socid) $socid = $user->socid; |
|
42 | +if ($user->socid) { |
|
43 | + $socid = $user->socid; |
|
44 | +} |
|
43 | 45 | $result = restrictedArea($user, 'tax', $id, 'chargesociales', 'charges'); |
44 | 46 | |
45 | 47 | $object = new ChargeSociales($db); |
@@ -53,9 +55,10 @@ discard block |
||
53 | 55 | { |
54 | 56 | $object->fetch($id); |
55 | 57 | $result = $object->setValueFrom('libelle', GETPOST('lib'), '', '', 'text', '', $user, 'TAX_MODIFY'); |
56 | - if ($result < 0) |
|
57 | - setEventMessages($object->error, $object->errors, 'errors'); |
|
58 | -} |
|
58 | + if ($result < 0) { |
|
59 | + setEventMessages($object->error, $object->errors, 'errors'); |
|
60 | + } |
|
61 | + } |
|
59 | 62 | |
60 | 63 | |
61 | 64 | /* |
@@ -34,7 +34,9 @@ discard block |
||
34 | 34 | |
35 | 35 | // Security check |
36 | 36 | $socid = GETPOST('socid', 'int'); |
37 | -if ($user->socid) $socid = $user->socid; |
|
37 | +if ($user->socid) { |
|
38 | + $socid = $user->socid; |
|
39 | +} |
|
38 | 40 | $result = restrictedArea($user, 'tax', '', '', 'charges'); |
39 | 41 | |
40 | 42 | $object = new Tva($db); |
@@ -49,9 +51,10 @@ discard block |
||
49 | 51 | { |
50 | 52 | $object->fetch($id); |
51 | 53 | $result = $object->setValueFrom('label', GETPOST('lib', 'alpha'), '', '', 'text', '', $user, 'TAX_MODIFY'); |
52 | - if ($result < 0) |
|
53 | - setEventMessages($object->error, $object->errors, 'errors'); |
|
54 | -} |
|
54 | + if ($result < 0) { |
|
55 | + setEventMessages($object->error, $object->errors, 'errors'); |
|
56 | + } |
|
57 | + } |
|
55 | 58 | |
56 | 59 | |
57 | 60 | /* |
@@ -32,7 +32,9 @@ |
||
32 | 32 | |
33 | 33 | // Security check |
34 | 34 | $id = GETPOST('id', 'int'); |
35 | -if ($user->socid) $socid = $user->socid; |
|
35 | +if ($user->socid) { |
|
36 | + $socid = $user->socid; |
|
37 | +} |
|
36 | 38 | $result = restrictedArea($user, 'deplacement', $id, ''); |
37 | 39 | |
38 | 40 |
@@ -39,7 +39,9 @@ discard block |
||
39 | 39 | $object = new Project($db); |
40 | 40 | |
41 | 41 | include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once |
42 | -if (!empty($conf->global->PROJECT_ALLOW_COMMENT_ON_PROJECT) && method_exists($object, 'fetchComments') && empty($object->comments)) $object->fetchComments(); |
|
42 | +if (!empty($conf->global->PROJECT_ALLOW_COMMENT_ON_PROJECT) && method_exists($object, 'fetchComments') && empty($object->comments)) { |
|
43 | + $object->fetchComments(); |
|
44 | +} |
|
43 | 45 | |
44 | 46 | // Security check |
45 | 47 | $socid = 0; |
@@ -61,7 +63,9 @@ discard block |
||
61 | 63 | */ |
62 | 64 | |
63 | 65 | $title = $langs->trans("Project").' - '.$langs->trans("Note").' - '.$object->ref.' '.$object->name; |
64 | -if (!empty($conf->global->MAIN_HTML_TITLE) && preg_match('/projectnameonly/', $conf->global->MAIN_HTML_TITLE) && $object->name) $title = $object->ref.' '.$object->name.' - '.$langs->trans("Note"); |
|
66 | +if (!empty($conf->global->MAIN_HTML_TITLE) && preg_match('/projectnameonly/', $conf->global->MAIN_HTML_TITLE) && $object->name) { |
|
67 | + $title = $object->ref.' '.$object->name.' - '.$langs->trans("Note"); |
|
68 | +} |
|
65 | 69 | $help_url = "EN:Module_Projects|FR:Module_Projets|ES:Módulo_Proyectos"; |
66 | 70 | llxHeader("", $title, $help_url); |
67 | 71 |
@@ -20,13 +20,27 @@ discard block |
||
20 | 20 | * \brief Fichier de javascript de traduction pour JSGantt |
21 | 21 | */ |
22 | 22 | |
23 | -if (!defined('NOREQUIRESOC')) define('NOREQUIRESOC', '1'); |
|
24 | -if (!defined('NOCSRFCHECK')) define('NOCSRFCHECK', 1); |
|
25 | -if (!defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', 1); |
|
26 | -if (!defined('NOLOGIN')) define('NOLOGIN', 1); |
|
27 | -if (!defined('NOREQUIREMENU')) define('NOREQUIREMENU', 1); |
|
28 | -if (!defined('NOREQUIREHTML')) define('NOREQUIREHTML', 1); |
|
29 | -if (!defined('NOREQUIREAJAX')) define('NOREQUIREAJAX', '1'); |
|
23 | +if (!defined('NOREQUIRESOC')) { |
|
24 | + define('NOREQUIRESOC', '1'); |
|
25 | +} |
|
26 | +if (!defined('NOCSRFCHECK')) { |
|
27 | + define('NOCSRFCHECK', 1); |
|
28 | +} |
|
29 | +if (!defined('NOTOKENRENEWAL')) { |
|
30 | + define('NOTOKENRENEWAL', 1); |
|
31 | +} |
|
32 | +if (!defined('NOLOGIN')) { |
|
33 | + define('NOLOGIN', 1); |
|
34 | +} |
|
35 | +if (!defined('NOREQUIREMENU')) { |
|
36 | + define('NOREQUIREMENU', 1); |
|
37 | +} |
|
38 | +if (!defined('NOREQUIREHTML')) { |
|
39 | + define('NOREQUIREHTML', 1); |
|
40 | +} |
|
41 | +if (!defined('NOREQUIREAJAX')) { |
|
42 | + define('NOREQUIREAJAX', '1'); |
|
43 | +} |
|
30 | 44 | |
31 | 45 | require_once __DIR__.'/../main.inc.php'; |
32 | 46 | |
@@ -56,4 +70,6 @@ discard block |
||
56 | 70 | }; |
57 | 71 | var vLang='<?php print $langs->getDefaultLang(1); ?>'; |
58 | 72 | <?php |
59 | -if (is_object($db)) $db->close(); |
|
73 | +if (is_object($db)) { |
|
74 | + $db->close(); |
|
75 | +} |
@@ -16,11 +16,21 @@ |
||
16 | 16 | * along with this program. If not, see <https://www.gnu.org/licenses/>. |
17 | 17 | */ |
18 | 18 | |
19 | -if (!defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', '1'); |
|
20 | -if (!defined('NOREQUIREMENU')) define('NOREQUIREMENU', '1'); |
|
21 | -if (!defined('NOREQUIREHTML')) define('NOREQUIREHTML', '1'); |
|
22 | -if (!defined('NOREQUIREAJAX')) define('NOREQUIREAJAX', '1'); |
|
23 | -if (!defined('NOREQUIRESOC')) define('NOREQUIRESOC', '1'); |
|
19 | +if (!defined('NOTOKENRENEWAL')) { |
|
20 | + define('NOTOKENRENEWAL', '1'); |
|
21 | +} |
|
22 | +if (!defined('NOREQUIREMENU')) { |
|
23 | + define('NOREQUIREMENU', '1'); |
|
24 | +} |
|
25 | +if (!defined('NOREQUIREHTML')) { |
|
26 | + define('NOREQUIREHTML', '1'); |
|
27 | +} |
|
28 | +if (!defined('NOREQUIREAJAX')) { |
|
29 | + define('NOREQUIREAJAX', '1'); |
|
30 | +} |
|
31 | +if (!defined('NOREQUIRESOC')) { |
|
32 | + define('NOREQUIRESOC', '1'); |
|
33 | +} |
|
24 | 34 | |
25 | 35 | require '../../main.inc.php'; |
26 | 36 | require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; |
@@ -21,13 +21,27 @@ discard block |
||
21 | 21 | * \brief File that include javascript functions used for dispatching qty/stock/lot |
22 | 22 | */ |
23 | 23 | |
24 | -if (!defined('NOREQUIRESOC')) define('NOREQUIRESOC', '1'); |
|
25 | -if (!defined('NOCSRFCHECK')) define('NOCSRFCHECK', 1); |
|
26 | -if (!defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', 1); |
|
27 | -if (!defined('NOLOGIN')) define('NOLOGIN', 1); |
|
28 | -if (!defined('NOREQUIREMENU')) define('NOREQUIREMENU', 1); |
|
29 | -if (!defined('NOREQUIREHTML')) define('NOREQUIREHTML', 1); |
|
30 | -if (!defined('NOREQUIREAJAX')) define('NOREQUIREAJAX', '1'); |
|
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 | +} |
|
42 | +if (!defined('NOREQUIREAJAX')) { |
|
43 | + define('NOREQUIREAJAX', '1'); |
|
44 | +} |
|
31 | 45 | |
32 | 46 | session_cache_limiter('public'); |
33 | 47 | |
@@ -36,8 +50,11 @@ discard block |
||
36 | 50 | // Define javascript type |
37 | 51 | top_httphead('text/javascript; charset=UTF-8'); |
38 | 52 | // Important: Following code is to avoid page request by browser and PHP CPU at each Dolibarr page access. |
39 | -if (empty($dolibarr_nocache)) header('Cache-Control: max-age=10800, public, must-revalidate'); |
|
40 | -else header('Cache-Control: no-cache'); |
|
53 | +if (empty($dolibarr_nocache)) { |
|
54 | + header('Cache-Control: max-age=10800, public, must-revalidate'); |
|
55 | +} else { |
|
56 | + header('Cache-Control: no-cache'); |
|
57 | +} |
|
41 | 58 | |
42 | 59 | ?> |
43 | 60 | /** |
@@ -1,4 +1,7 @@ |
||
1 | -<?php if (!defined('ISLOADEDBYSTEELSHEET')) die('Must be call by steelsheet'); ?> |
|
1 | +<?php if (!defined('ISLOADEDBYSTEELSHEET')) { |
|
2 | + die('Must be call by steelsheet'); |
|
3 | +} |
|
4 | +?> |
|
2 | 5 | /* <style type="text/css" > */ |
3 | 6 | |
4 | 7 | .mainmenu::before{ |