Completed
Branch develop (404fac)
by
unknown
20:18
created
htdocs/core/class/commoninvoice.class.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1086,7 +1086,9 @@
 block discarded – undo
1086 1086
 								// So it inits or erases the $stripearrayofkeysbyenv
1087 1087
 								$stripe = new Stripe($this->db);
1088 1088
 
1089
-								if (empty($savstripearrayofkeysbyenv)) $savstripearrayofkeysbyenv = $stripearrayofkeysbyenv;
1089
+								if (empty($savstripearrayofkeysbyenv)) {
1090
+									$savstripearrayofkeysbyenv = $stripearrayofkeysbyenv;
1091
+								}
1090 1092
 								dol_syslog("makeStripeSepaRequest Current Stripe environment is " . $stripearrayofkeysbyenv[$servicestatus]['publishable_key']);
1091 1093
 								dol_syslog("makeStripeSepaRequest Current Saved Stripe environment is ".$savstripearrayofkeysbyenv[$servicestatus]['publishable_key']);
1092 1094
 
Please login to merge, or discard this patch.
htdocs/core/class/commondocgenerator.class.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1316,7 +1316,9 @@
 block discarded – undo
1316 1316
 		$extrafields = $this->extrafieldsCache;
1317 1317
 
1318 1318
 		$extrafieldOutputContent = '';
1319
-		if (isset($object->array_options[$extrafieldOptionsKey])) $extrafieldOutputContent = $extrafields->showOutputField($extrafieldKey, $object->array_options[$extrafieldOptionsKey], '', $object->table_element);
1319
+		if (isset($object->array_options[$extrafieldOptionsKey])) {
1320
+			$extrafieldOutputContent = $extrafields->showOutputField($extrafieldKey, $object->array_options[$extrafieldOptionsKey], '', $object->table_element);
1321
+		}
1320 1322
 
1321 1323
 		// TODO : allow showOutputField to be pdf public friendly, ex: in a link to object, clean getNomUrl to remove link and images... like a getName methode ...
1322 1324
 		if ($extrafields->attributes[$object->table_element]['type'][$extrafieldKey] == 'link') {
Please login to merge, or discard this patch.
htdocs/core/class/conf.class.php 1 patch
Braces   +15 added lines, -5 removed lines patch added patch discarded remove patch
@@ -260,7 +260,9 @@  discard block
 block discarded – undo
260 260
 		// Unset all old modules values
261 261
 		if (!empty($this->modules)) {
262 262
 			foreach ($this->modules as $m) {
263
-				if (isset($this->$m)) unset($this->$m);
263
+				if (isset($this->$m)) {
264
+					unset($this->$m);
265
+				}
264 266
 			}
265 267
 		}
266 268
 
@@ -685,15 +687,23 @@  discard block
 block discarded – undo
685 687
 				// If module lot/serial enabled, we force the inc/dec mode to STOCK_CALCULATE_ON_SHIPMENT_CLOSE and STOCK_CALCULATE_ON_RECEPTION_CLOSE
686 688
 				$this->global->STOCK_CALCULATE_ON_BILL = 0;
687 689
 				$this->global->STOCK_CALCULATE_ON_VALIDATE_ORDER = 0;
688
-				if (empty($this->global->STOCK_CALCULATE_ON_SHIPMENT)) $this->global->STOCK_CALCULATE_ON_SHIPMENT_CLOSE = 1;
689
-				if (empty($this->global->STOCK_CALCULATE_ON_SHIPMENT_CLOSE)) $this->global->STOCK_CALCULATE_ON_SHIPMENT = 1;
690
+				if (empty($this->global->STOCK_CALCULATE_ON_SHIPMENT)) {
691
+					$this->global->STOCK_CALCULATE_ON_SHIPMENT_CLOSE = 1;
692
+				}
693
+				if (empty($this->global->STOCK_CALCULATE_ON_SHIPMENT_CLOSE)) {
694
+					$this->global->STOCK_CALCULATE_ON_SHIPMENT = 1;
695
+				}
690 696
 				$this->global->STOCK_CALCULATE_ON_SUPPLIER_BILL = 0;
691 697
 				$this->global->STOCK_CALCULATE_ON_SUPPLIER_VALIDATE_ORDER = 0;
692 698
 				if (!isModEnabled('reception')) {
693 699
 					$this->global->STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER = 1;
694 700
 				} else {
695
-					if (empty($this->global->STOCK_CALCULATE_ON_RECEPTION)) $this->global->STOCK_CALCULATE_ON_RECEPTION_CLOSE = 1;
696
-					if (empty($this->global->STOCK_CALCULATE_ON_RECEPTION_CLOSE)) $this->global->STOCK_CALCULATE_ON_RECEPTION = 1;
701
+					if (empty($this->global->STOCK_CALCULATE_ON_RECEPTION)) {
702
+						$this->global->STOCK_CALCULATE_ON_RECEPTION_CLOSE = 1;
703
+					}
704
+					if (empty($this->global->STOCK_CALCULATE_ON_RECEPTION_CLOSE)) {
705
+						$this->global->STOCK_CALCULATE_ON_RECEPTION = 1;
706
+					}
697 707
 				}
698 708
 			}
699 709
 
Please login to merge, or discard this patch.
htdocs/core/ajax/ajaxstatusprospect.php 1 patch
Braces   +16 added lines, -5 removed lines patch added patch discarded remove patch
@@ -23,11 +23,22 @@
 block discarded – undo
23 23
  *       \brief      File to return Ajax response on third parties request
24 24
  */
25 25
 
26
-if (!defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', 1); // Disables token renewal
27
-if (!defined('NOREQUIREMENU'))  define('NOREQUIREMENU', '1');
28
-if (!defined('NOREQUIREHTML'))  define('NOREQUIREHTML', '1');
29
-if (!defined('NOREQUIREAJAX'))  define('NOREQUIREAJAX', '1');
30
-if (!defined('NOREQUIRESOC'))   define('NOREQUIRESOC', '1');
26
+if (!defined('NOTOKENRENEWAL')) {
27
+	define('NOTOKENRENEWAL', 1);
28
+}
29
+// Disables token renewal
30
+if (!defined('NOREQUIREMENU')) {
31
+	define('NOREQUIREMENU', '1');
32
+}
33
+if (!defined('NOREQUIREHTML')) {
34
+	define('NOREQUIREHTML', '1');
35
+}
36
+if (!defined('NOREQUIREAJAX')) {
37
+	define('NOREQUIREAJAX', '1');
38
+}
39
+if (!defined('NOREQUIRESOC')) {
40
+	define('NOREQUIRESOC', '1');
41
+}
31 42
 
32 43
 // Load Dolibarr environment
33 44
 require '../../main.inc.php';
Please login to merge, or discard this patch.
htdocs/core/ajax/flowjs-server.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -103,10 +103,12 @@
 block discarded – undo
103 103
 		echo json_encode('File '.$flowIdentifier.' was already uploaded');
104 104
 		header("HTTP/1.0 200 Ok");
105 105
 		die();
106
-	} elseif (!empty($_FILES)) foreach ($_FILES as $file) {
106
+	} elseif (!empty($_FILES)) {
107
+		foreach ($_FILES as $file) {
107 108
 		// check the error status
108 109
 		if ($file['error'] != 0) {
109 110
 			dol_syslog('error '.$file['error'].' in file '.$flowFilename);
111
+	}
110 112
 			continue;
111 113
 		}
112 114
 
Please login to merge, or discard this patch.
htdocs/core/tpl/filemanager.tpl.php 1 patch
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -206,8 +206,12 @@
 block discarded – undo
206 206
 		$formquestion['website']=array('type'=>'hidden', 'value'=>$website->ref, 'name'=>'website');
207 207
 	}
208 208
 	$param = '';
209
-	if (!empty($sortfield)) $param .= '&sortfield='.urlencode($sortfield);
210
-	if (!empty($sortorder)) $param .= '&sortorder='.urlencode($sortorder);
209
+	if (!empty($sortfield)) {
210
+		$param .= '&sortfield='.urlencode($sortfield);
211
+	}
212
+	if (!empty($sortorder)) {
213
+		$param .= '&sortorder='.urlencode($sortorder);
214
+	}
211 215
 	print $form->formconfirm($_SERVER["PHP_SELF"].($param ? '?'.$param : ''), empty($file) ? $langs->trans('ConfirmImgWebpCreation') : $langs->trans('ConfirmChosenImgWebpCreation'), empty($file) ? $langs->trans('ConfirmGenerateImgWebp') : $langs->trans('ConfirmGenerateChosenImgWebp', basename($file)), 'convertimgwebp', $formquestion, "yes", 1);
212 216
 	$action = 'file_manager';
213 217
 }
Please login to merge, or discard this patch.
htdocs/core/boxes/box_graph_invoices_peryear.php 1 patch
Braces   +13 added lines, -4 removed lines patch added patch discarded remove patch
@@ -75,7 +75,9 @@  discard block
 block discarded – undo
75 75
 		//$facturestatic=new Facture($this->db);
76 76
 
77 77
 		$startmonth = $conf->global->SOCIETE_FISCAL_MONTH_START ? ($conf->global->SOCIETE_FISCAL_MONTH_START) : 1;
78
-		if (empty($conf->global->GRAPH_USE_FISCAL_YEAR)) $startmonth = 1;
78
+		if (empty($conf->global->GRAPH_USE_FISCAL_YEAR)) {
79
+			$startmonth = 1;
80
+		}
79 81
 
80 82
 		$text = $langs->trans("Turnover", $max);
81 83
 		$this->info_box_head = array(
@@ -92,8 +94,13 @@  discard block
 block discarded – undo
92 94
 		$dir = ''; // We don't need a path because image file will not be saved into disk
93 95
 		$prefix = '';
94 96
 		$socid = 0;
95
-		if ($user->socid) $socid = $user->socid;
96
-		if (empty($user->rights->societe->client->voir) || $socid) $prefix .= 'private-'.$user->id.'-'; // If user has no permission to see all, output dir is specific to user
97
+		if ($user->socid) {
98
+			$socid = $user->socid;
99
+		}
100
+		if (empty($user->rights->societe->client->voir) || $socid) {
101
+			$prefix .= 'private-'.$user->id.'-';
102
+		}
103
+		// If user has no permission to see all, output dir is specific to user
97 104
 
98 105
 		if ($user->hasRight('facture', 'lire')) {
99 106
 			$mesg = '';
@@ -114,7 +121,9 @@  discard block
 block discarded – undo
114 121
 			}
115 122
 			if (empty($showtot)) { $showtot = 1; }
116 123
 			$nowarray = dol_getdate(dol_now(), true);
117
-			if (empty($endyear)) $endyear = $nowarray['year'];
124
+			if (empty($endyear)) {
125
+				$endyear = $nowarray['year'];
126
+			}
118 127
 			$numberyears = (empty($conf->global->MAIN_NB_OF_YEAR_IN_WIDGET_GRAPH) ? 5 : $conf->global->MAIN_NB_OF_YEAR_IN_WIDGET_GRAPH);
119 128
 			$startyear = $endyear - $numberyears;
120 129
 
Please login to merge, or discard this patch.
htdocs/asset/note.php 1 patch
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -55,10 +55,14 @@
 block discarded – undo
55 55
 $permissiontoadd = $user->hasRight('asset', 'write'); // Used by the include of actions_addupdatedelete.inc.php
56 56
 
57 57
 // Security check (enable the most restrictive one)
58
-if ($user->socid > 0) accessforbidden();
58
+if ($user->socid > 0) {
59
+	accessforbidden();
60
+}
59 61
 $isdraft = (($object->status == $object::STATUS_DRAFT) ? 1 : 0);
60 62
 restrictedArea($user, $object->element, $object->id, $object->table_element, '', 'fk_soc', 'rowid', $isdraft);
61
-if (!isModEnabled('asset')) accessforbidden();
63
+if (!isModEnabled('asset')) {
64
+	accessforbidden();
65
+}
62 66
 
63 67
 
64 68
 /*
Please login to merge, or discard this patch.
htdocs/asset/model/accountancy_codes.php 1 patch
Braces   +9 added lines, -3 removed lines patch added patch discarded remove patch
@@ -57,11 +57,17 @@
 block discarded – undo
57 57
 $permissiontoadd = ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $user->hasRight('asset', 'write')) || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $user->hasRight('asset', 'model_advance', 'write'))); // Used by the include of actions_addupdatedelete.inc.php
58 58
 
59 59
 // Security check (enable the most restrictive one)
60
-if ($user->socid > 0) accessforbidden();
60
+if ($user->socid > 0) {
61
+	accessforbidden();
62
+}
61 63
 $isdraft = (($object->status == $object::STATUS_DRAFT) ? 1 : 0);
62 64
 restrictedArea($user, 'asset', $object->id, $object->table_element, '', 'fk_soc', 'rowid', $isdraft);
63
-if (!isModEnabled('asset')) accessforbidden();
64
-if (!$permissiontoread) accessforbidden();
65
+if (!isModEnabled('asset')) {
66
+	accessforbidden();
67
+}
68
+if (!$permissiontoread) {
69
+	accessforbidden();
70
+}
65 71
 
66 72
 $result = $assetaccountancycodes->fetchAccountancyCodes(0, $object->id);
67 73
 if ($result < 0) {
Please login to merge, or discard this patch.