Passed
Branch develop (66e4de)
by Laurent
33:03
created
htdocs/opensurvey/wizard/index.php 1 patch
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -19,7 +19,9 @@  discard block
 block discarded – undo
19 19
  */
20 20
 
21 21
 
22
-if (!defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', '1');
22
+if (!defined('NOTOKENRENEWAL')) {
23
+	define('NOTOKENRENEWAL', '1');
24
+}
23 25
 
24 26
 require '../../main.inc.php';
25 27
 require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
@@ -27,7 +29,9 @@  discard block
 block discarded – undo
27 29
 require_once DOL_DOCUMENT_ROOT.'/opensurvey/fonctions.php';
28 30
 
29 31
 // Security check
30
-if (!$user->rights->opensurvey->write) accessforbidden();
32
+if (!$user->rights->opensurvey->write) {
33
+	accessforbidden();
34
+}
31 35
 
32 36
 $langs->load("opensurvey");
33 37
 
Please login to merge, or discard this patch.
htdocs/contact/info.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -34,7 +34,9 @@
 block discarded – undo
34 34
 
35 35
 // Security check
36 36
 $id = GETPOST("id", 'int');
37
-if ($user->socid) $socid = $user->socid;
37
+if ($user->socid) {
38
+	$socid = $user->socid;
39
+}
38 40
 $result = restrictedArea($user, 'contact', $id, 'socpeople&societe');
39 41
 
40 42
 $object = new Contact($db);
Please login to merge, or discard this patch.
htdocs/contact/canvas/default/tpl/contactcard_view.tpl.php 1 patch
Braces   +7 added lines, -2 removed lines patch added patch discarded remove patch
@@ -30,8 +30,13 @@
 block discarded – undo
30 30
 
31 31
 dol_htmloutput_errors($this->control->tpl['error'], $this->control->tpl['errors']);
32 32
 
33
-if (!empty($this->control->tpl['action_create_user'])) echo $this->control->tpl['action_create_user'];
34
-if (!empty($this->control->tpl['action_delete'])) echo $this->control->tpl['action_delete']; ?>
33
+if (!empty($this->control->tpl['action_create_user'])) {
34
+	echo $this->control->tpl['action_create_user'];
35
+}
36
+if (!empty($this->control->tpl['action_delete'])) {
37
+	echo $this->control->tpl['action_delete'];
38
+}
39
+?>
35 40
 
36 41
 <table class="border allwidth">
37 42
 
Please login to merge, or discard this patch.
htdocs/salaries/info.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,7 +36,9 @@
 block discarded – undo
36 36
 
37 37
 // Security check
38 38
 $socid = GETPOST('socid', 'int');
39
-if ($user->socid) $socid = $user->socid;
39
+if ($user->socid) {
40
+	$socid = $user->socid;
41
+}
40 42
 $result = restrictedArea($user, 'salaries', '', '', '');
41 43
 
42 44
 
Please login to merge, or discard this patch.
htdocs/fourn/facture/info.php 1 patch
Braces   +9 added lines, -4 removed lines patch added patch discarded remove patch
@@ -40,7 +40,9 @@  discard block
 block discarded – undo
40 40
 $ref = GETPOST("ref", 'alpha');
41 41
 
42 42
 // Security check
43
-if ($user->socid) $socid = $user->socid;
43
+if ($user->socid) {
44
+	$socid = $user->socid;
45
+}
44 46
 $result = restrictedArea($user, 'fournisseur', $id, 'facture_fourn', 'facture');
45 47
 
46 48
 $object = new FactureFournisseur($db);
@@ -75,7 +77,9 @@  discard block
 block discarded – undo
75 77
 $morehtmlref .= $form->editfieldval("RefSupplier", 'ref_supplier', $object->ref_supplier, $object, 0, 'string', '', null, null, '', 1);
76 78
 // Thirdparty
77 79
 $morehtmlref .= '<br>'.$langs->trans('ThirdParty').' : '.$object->thirdparty->getNomUrl(1);
78
-if (empty($conf->global->MAIN_DISABLE_OTHER_LINK) && $object->thirdparty->id > 0) $morehtmlref .= ' (<a href="'.DOL_URL_ROOT.'/fourn/facture/list.php?socid='.$object->thirdparty->id.'&search_company='.urlencode($object->thirdparty->name).'">'.$langs->trans("OtherBills").'</a>)';
80
+if (empty($conf->global->MAIN_DISABLE_OTHER_LINK) && $object->thirdparty->id > 0) {
81
+	$morehtmlref .= ' (<a href="'.DOL_URL_ROOT.'/fourn/facture/list.php?socid='.$object->thirdparty->id.'&search_company='.urlencode($object->thirdparty->name).'">'.$langs->trans("OtherBills").'</a>)';
82
+}
79 83
 // Project
80 84
 if (!empty($conf->projet->enabled))
81 85
 {
@@ -83,9 +87,10 @@  discard block
 block discarded – undo
83 87
    	$morehtmlref .= '<br>'.$langs->trans('Project').' ';
84 88
    	if ($user->rights->facture->creer)
85 89
    	{
86
-   		if ($action != 'classify')
87
-   			//$morehtmlref.='<a class="editfielda" href="' . $_SERVER['PHP_SELF'] . '?action=classify&amp;id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> : ';
90
+   		if ($action != 'classify') {
91
+   		   			//$morehtmlref.='<a class="editfielda" href="' . $_SERVER['PHP_SELF'] . '?action=classify&amp;id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> : ';
88 92
    			$morehtmlref .= ' : ';
93
+   		}
89 94
    		if ($action == 'classify') {
90 95
    			//$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1);
91 96
    			$morehtmlref .= '<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">';
Please login to merge, or discard this patch.
htdocs/expedition/note.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,7 +41,9 @@
 block discarded – undo
41 41
 
42 42
 // Security check
43 43
 $socid = '';
44
-if ($user->socid) $socid = $user->socid;
44
+if ($user->socid) {
45
+	$socid = $user->socid;
46
+}
45 47
 $result = restrictedArea($user, $origin, $origin_id);
46 48
 
47 49
 $object = new Expedition($db);
Please login to merge, or discard this patch.
htdocs/supplier_proposal/info.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -39,7 +39,9 @@
 block discarded – undo
39 39
 $socid = GETPOST('socid', 'int');
40 40
 
41 41
 // Security check
42
-if (!empty($user->socid)) $socid = $user->socid;
42
+if (!empty($user->socid)) {
43
+	$socid = $user->socid;
44
+}
43 45
 $result = restrictedArea($user, 'supplier_proposal', $id);
44 46
 
45 47
 
Please login to merge, or discard this patch.
htdocs/public/test/test_sessionlock.php 1 patch
Braces   +43 added lines, -12 removed lines patch added patch discarded remove patch
@@ -1,22 +1,53 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-if (!defined('NOREQUIREUSER'))  define('NOREQUIREUSER', '1');
4
-if (!defined('NOREQUIREDB'))    define('NOREQUIREDB', '1');
5
-if (!defined('NOREQUIRESOC'))   define('NOREQUIRESOC', '1');
6
-if (!defined('NOREQUIRETRAN'))  define('NOREQUIRETRAN', '1');
7
-if (!defined('NOSTYLECHECK'))   define('NOSTYLECHECK', '1'); // Do not check style html tag into posted data
8
-if (!defined('NOCSRFCHECK'))    define('NOCSRFCHECK', '1'); // Do not check anti CSRF attack test
9
-if (!defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', '1'); // Do not check anti POST attack test
10
-if (!defined('NOREQUIREMENU'))  define('NOREQUIREMENU', '1'); // If there is no need to load and show top and left menu
11
-if (!defined('NOREQUIREHTML'))  define('NOREQUIREHTML', '1'); // If we don't need to load the html.form.class.php
12
-if (!defined('NOREQUIREAJAX'))  define('NOREQUIREAJAX', '1'); // Do not load ajax.lib.php library
13
-if (!defined("NOLOGIN"))        define("NOLOGIN", '1'); // If this page is public (can be called outside logged session)
3
+if (!defined('NOREQUIREUSER')) {
4
+	define('NOREQUIREUSER', '1');
5
+}
6
+if (!defined('NOREQUIREDB')) {
7
+	define('NOREQUIREDB', '1');
8
+}
9
+if (!defined('NOREQUIRESOC')) {
10
+	define('NOREQUIRESOC', '1');
11
+}
12
+if (!defined('NOREQUIRETRAN')) {
13
+	define('NOREQUIRETRAN', '1');
14
+}
15
+if (!defined('NOSTYLECHECK')) {
16
+	define('NOSTYLECHECK', '1');
17
+}
18
+// Do not check style html tag into posted data
19
+if (!defined('NOCSRFCHECK')) {
20
+	define('NOCSRFCHECK', '1');
21
+}
22
+// Do not check anti CSRF attack test
23
+if (!defined('NOTOKENRENEWAL')) {
24
+	define('NOTOKENRENEWAL', '1');
25
+}
26
+// Do not check anti POST attack test
27
+if (!defined('NOREQUIREMENU')) {
28
+	define('NOREQUIREMENU', '1');
29
+}
30
+// If there is no need to load and show top and left menu
31
+if (!defined('NOREQUIREHTML')) {
32
+	define('NOREQUIREHTML', '1');
33
+}
34
+// If we don't need to load the html.form.class.php
35
+if (!defined('NOREQUIREAJAX')) {
36
+	define('NOREQUIREAJAX', '1');
37
+}
38
+// Do not load ajax.lib.php library
39
+if (!defined("NOLOGIN")) {
40
+	define("NOLOGIN", '1');
41
+}
42
+// If this page is public (can be called outside logged session)
14 43
 // If you don't need session management (can't be logged if no session used). You must also set
15 44
 // NOCSRFCHECK, NOTOKENRENEWAL, NOLOGIN
16 45
 // Disable module with GETPOST('disablemodules') won't work. Variable 'dol_...' will not be set.
17 46
 // $_SESSION are then simple vars if sessions are not active.
18 47
 // TODO We can close session with session_write_close() as soon as we just need read access.
19
-if (!defined("NOSESSION"))      define("NOSESSION", '1');
48
+if (!defined("NOSESSION")) {
49
+	define("NOSESSION", '1');
50
+}
20 51
 
21 52
 define('REQUIRE_JQUERY_MULTISELECT', 'select2');
22 53
 
Please login to merge, or discard this patch.
htdocs/takepos/admin/other.php 1 patch
Braces   +9 added lines, -3 removed lines patch added patch discarded remove patch
@@ -36,7 +36,9 @@  discard block
 block discarded – undo
36 36
 }
37 37
 
38 38
 // Security check
39
-if (!$user->admin) accessforbidden();
39
+if (!$user->admin) {
40
+	accessforbidden();
41
+}
40 42
 
41 43
 $langs->loadLangs(array("admin", "cashdesk"));
42 44
 
@@ -61,7 +63,9 @@  discard block
 block discarded – undo
61 63
 
62 64
 if (GETPOST('action', 'alpha') == 'set') {
63 65
 	$db->begin();
64
-	if (GETPOST('socid', 'int') < 0) $_POST["socid"] = '';
66
+	if (GETPOST('socid', 'int') < 0) {
67
+		$_POST["socid"] = '';
68
+	}
65 69
 
66 70
 	$res = dolibarr_set_const($db, "CASHDESK_SERVICES", GETPOST('CASHDESK_SERVICES', 'alpha'), 'chaine', 0, '', $conf->entity);
67 71
 	$res = dolibarr_set_const($db, "TAKEPOS_ROOT_CATEGORY_ID", GETPOST('TAKEPOS_ROOT_CATEGORY_ID', 'alpha'), 'chaine', 0, '', $conf->entity);
@@ -90,7 +94,9 @@  discard block
 block discarded – undo
90 94
 
91 95
 	dol_syslog("admin/cashdesk: level ".GETPOST('level', 'alpha'));
92 96
 
93
-	if (!$res > 0) $error++;
97
+	if (!$res > 0) {
98
+		$error++;
99
+	}
94 100
 
95 101
 	if (!$error) {
96 102
 		$db->commit();
Please login to merge, or discard this patch.