Passed
Branch develop (66e4de)
by Laurent
33:03
created
htdocs/compta/bank/various_payment/info.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,7 +35,9 @@
 block discarded – undo
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
 /*
Please login to merge, or discard this patch.
htdocs/compta/sociales/info.php 1 patch
Braces   +7 added lines, -4 removed lines patch added patch discarded remove patch
@@ -39,7 +39,9 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 /*
Please login to merge, or discard this patch.
htdocs/compta/tva/info.php 1 patch
Braces   +7 added lines, -4 removed lines patch added patch discarded remove patch
@@ -34,7 +34,9 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 /*
Please login to merge, or discard this patch.
htdocs/compta/deplacement/info.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,9 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
htdocs/projet/note.php 1 patch
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -39,7 +39,9 @@  discard block
 block discarded – undo
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
 block discarded – undo
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&oacute;dulo_Proyectos";
66 70
 llxHeader("", $title, $help_url);
67 71
 
Please login to merge, or discard this patch.
htdocs/projet/jsgantt_language.js.php 1 patch
Braces   +24 added lines, -8 removed lines patch added patch discarded remove patch
@@ -20,13 +20,27 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
+}
Please login to merge, or discard this patch.
htdocs/variants/ajax/get_attribute_values.php 1 patch
Braces   +15 added lines, -5 removed lines patch added patch discarded remove patch
@@ -16,11 +16,21 @@
 block discarded – undo
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';
Please login to merge, or discard this patch.
htdocs/fourn/js/lib_dispatch.js.php 1 patch
Braces   +26 added lines, -9 removed lines patch added patch discarded remove patch
@@ -21,13 +21,27 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 /**
Please login to merge, or discard this patch.
htdocs/theme/eldy/main_menu_fa_icons.inc.php 1 patch
Braces   +4 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,7 @@
 block discarded – undo
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{
Please login to merge, or discard this patch.