Passed
Branch develop (66e4de)
by Laurent
33:03
created
htdocs/admin/system/xcache.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,9 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
htdocs/admin/tools/index.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,8 +27,9 @@
 block discarded – undo
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
 /*
Please login to merge, or discard this patch.
htdocs/admin/proxy.php 1 patch
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -29,7 +29,9 @@  discard block
 block discarded – undo
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
 block discarded – undo
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)
Please login to merge, or discard this patch.
htdocs/admin/openinghours.php 1 patch
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -31,7 +31,9 @@  discard block
 block discarded – undo
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
 block discarded – undo
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'))
Please login to merge, or discard this patch.
htdocs/blockedlog/ajax/check_signature.php 1 patch
Braces   +13 added lines, -4 removed lines patch added patch discarded remove patch
@@ -26,14 +26,23 @@
 block discarded – undo
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';
Please login to merge, or discard this patch.
htdocs/blockedlog/ajax/block-add.php 1 patch
Braces   +10 added lines, -3 removed lines patch added patch discarded remove patch
@@ -26,9 +26,16 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
htdocs/ticket/css/styles.css.php 1 patch
Braces   +24 added lines, -8 removed lines patch added patch discarded remove patch
@@ -22,14 +22,27 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 
Please login to merge, or discard this patch.
htdocs/commande/note.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,9 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
htdocs/cashdesk/include/keypad.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,9 @@
 block discarded – undo
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;
Please login to merge, or discard this patch.