Completed
Branch develop (806e3a)
by
unknown
17:40
created
htdocs/core/lib/asset.lib.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -80,32 +80,32 @@  discard block
 block discarded – undo
80 80
 	$h = 0;
81 81
 	$head = array();
82 82
 
83
-	$head[$h][0] = DOL_URL_ROOT . '/asset/card.php?id=' . $object->id;
83
+	$head[$h][0] = DOL_URL_ROOT.'/asset/card.php?id='.$object->id;
84 84
 	$head[$h][1] = $langs->trans("Card");
85 85
 	$head[$h][2] = 'card';
86 86
 	$h++;
87 87
 
88 88
 	if (empty($object->not_depreciated)) {
89
-		$head[$h][0] = DOL_URL_ROOT . '/asset/depreciation_options.php?id=' . $object->id;
89
+		$head[$h][0] = DOL_URL_ROOT.'/asset/depreciation_options.php?id='.$object->id;
90 90
 		$head[$h][1] = $langs->trans("AssetDepreciationOptions");
91 91
 		$head[$h][2] = 'depreciation_options';
92 92
 		$h++;
93 93
 	}
94 94
 
95
-	$head[$h][0] = DOL_URL_ROOT . '/asset/accountancy_codes.php?id=' . $object->id;
95
+	$head[$h][0] = DOL_URL_ROOT.'/asset/accountancy_codes.php?id='.$object->id;
96 96
 	$head[$h][1] = $langs->trans("AssetAccountancyCodes");
97 97
 	$head[$h][2] = 'accountancy_codes';
98 98
 	$h++;
99 99
 
100 100
 	if (empty($object->not_depreciated)) {
101
-		$head[$h][0] = DOL_URL_ROOT . '/asset/depreciation.php?id=' . $object->id;
101
+		$head[$h][0] = DOL_URL_ROOT.'/asset/depreciation.php?id='.$object->id;
102 102
 		$head[$h][1] = $langs->trans("AssetDepreciation");
103 103
 		$head[$h][2] = 'depreciation';
104 104
 		$h++;
105 105
 	}
106 106
 
107 107
 	if (isset($object->disposal_date) && $object->disposal_date !== "") {
108
-		$head[$h][0] = DOL_URL_ROOT . '/asset/disposal.php?id=' . $object->id;
108
+		$head[$h][0] = DOL_URL_ROOT.'/asset/disposal.php?id='.$object->id;
109 109
 		$head[$h][1] = $langs->trans("AssetDisposal");
110 110
 		$head[$h][2] = 'disposal';
111 111
 		$h++;
@@ -119,29 +119,29 @@  discard block
 block discarded – undo
119 119
 		if (!empty($object->note_public)) {
120 120
 			$nbNote++;
121 121
 		}
122
-		$head[$h][0] = DOL_URL_ROOT . '/asset/note.php?id=' . $object->id;
122
+		$head[$h][0] = DOL_URL_ROOT.'/asset/note.php?id='.$object->id;
123 123
 		$head[$h][1] = $langs->trans('Notes');
124 124
 		if ($nbNote > 0) {
125
-			$head[$h][1] .= (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER) ? '<span class="badge marginleftonlyshort">' . $nbNote . '</span>' : '');
125
+			$head[$h][1] .= (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER) ? '<span class="badge marginleftonlyshort">'.$nbNote.'</span>' : '');
126 126
 		}
127 127
 		$head[$h][2] = 'note';
128 128
 		$h++;
129 129
 	}
130 130
 
131
-	require_once DOL_DOCUMENT_ROOT . '/core/lib/files.lib.php';
132
-	require_once DOL_DOCUMENT_ROOT . '/core/class/link.class.php';
133
-	$upload_dir = $conf->asset->dir_output . "/asset/" . dol_sanitizeFileName($object->ref);
131
+	require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
132
+	require_once DOL_DOCUMENT_ROOT.'/core/class/link.class.php';
133
+	$upload_dir = $conf->asset->dir_output."/asset/".dol_sanitizeFileName($object->ref);
134 134
 	$nbFiles = count(dol_dir_list($upload_dir, 'files', 0, '', '(\.meta|_preview.*\.png)$'));
135 135
 	$nbLinks = Link::count($db, $object->element, $object->id);
136
-	$head[$h][0] = DOL_URL_ROOT . '/asset/document.php?id=' . $object->id;
136
+	$head[$h][0] = DOL_URL_ROOT.'/asset/document.php?id='.$object->id;
137 137
 	$head[$h][1] = $langs->trans('Documents');
138 138
 	if (($nbFiles + $nbLinks) > 0) {
139
-		$head[$h][1] .= '<span class="badge marginleftonlyshort">' . ($nbFiles + $nbLinks) . '</span>';
139
+		$head[$h][1] .= '<span class="badge marginleftonlyshort">'.($nbFiles + $nbLinks).'</span>';
140 140
 	}
141 141
 	$head[$h][2] = 'document';
142 142
 	$h++;
143 143
 
144
-	$head[$h][0] = DOL_URL_ROOT . '/asset/agenda.php?id=' . $object->id;
144
+	$head[$h][0] = DOL_URL_ROOT.'/asset/agenda.php?id='.$object->id;
145 145
 	$head[$h][1] = $langs->trans("Events");
146 146
 	$head[$h][2] = 'agenda';
147 147
 	$h++;
@@ -176,17 +176,17 @@  discard block
 block discarded – undo
176 176
 	$h = 0;
177 177
 	$head = array();
178 178
 
179
-	$head[$h][0] = DOL_URL_ROOT . '/asset/model/card.php?id=' . $object->id;
179
+	$head[$h][0] = DOL_URL_ROOT.'/asset/model/card.php?id='.$object->id;
180 180
 	$head[$h][1] = $langs->trans("Card");
181 181
 	$head[$h][2] = 'card';
182 182
 	$h++;
183 183
 
184
-	$head[$h][0] = DOL_URL_ROOT . '/asset/model/depreciation_options.php?id=' . $object->id;
184
+	$head[$h][0] = DOL_URL_ROOT.'/asset/model/depreciation_options.php?id='.$object->id;
185 185
 	$head[$h][1] = $langs->trans("AssetDepreciationOptions");
186 186
 	$head[$h][2] = 'depreciation_options';
187 187
 	$h++;
188 188
 
189
-	$head[$h][0] = DOL_URL_ROOT . '/asset/model/accountancy_codes.php?id=' . $object->id;
189
+	$head[$h][0] = DOL_URL_ROOT.'/asset/model/accountancy_codes.php?id='.$object->id;
190 190
 	$head[$h][1] = $langs->trans("AssetAccountancyCodes");
191 191
 	$head[$h][2] = 'accountancy_codes';
192 192
 	$h++;
@@ -199,16 +199,16 @@  discard block
 block discarded – undo
199 199
 		if (!empty($object->note_public)) {
200 200
 			$nbNote++;
201 201
 		}
202
-		$head[$h][0] = DOL_URL_ROOT . '/asset/model/note.php?id=' . $object->id;
202
+		$head[$h][0] = DOL_URL_ROOT.'/asset/model/note.php?id='.$object->id;
203 203
 		$head[$h][1] = $langs->trans('Notes');
204 204
 		if ($nbNote > 0) {
205
-			$head[$h][1] .= (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER) ? '<span class="badge marginleftonlyshort">' . $nbNote . '</span>' : '');
205
+			$head[$h][1] .= (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER) ? '<span class="badge marginleftonlyshort">'.$nbNote.'</span>' : '');
206 206
 		}
207 207
 		$head[$h][2] = 'note';
208 208
 		$h++;
209 209
 	}
210 210
 
211
-	$head[$h][0] = DOL_URL_ROOT . '/asset/model/agenda.php?id=' . $object->id;
211
+	$head[$h][0] = DOL_URL_ROOT.'/asset/model/agenda.php?id='.$object->id;
212 212
 	$head[$h][1] = $langs->trans("Events");
213 213
 	$head[$h][2] = 'agenda';
214 214
 	$h++;
Please login to merge, or discard this patch.
htdocs/asset/tpl/depreciation_options_view.tpl.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
 		print '<div class="fichecenter">';
68 68
 		print '<div class="fichehalfleft">';
69 69
 		print '<div class="underbanner clearboth"></div>';
70
-		print '<table class="border centpercent tableforfield">' . "\n";
70
+		print '<table class="border centpercent tableforfield">'."\n";
71 71
 		$mode_info['fields'] = dol_sort_array($mode_info['fields'], 'position');
72 72
 		foreach ($mode_info['fields'] as $field_key => $field_info) {
73 73
 			if (!empty($field_info['enabled_field'])) {
@@ -94,11 +94,11 @@  discard block
 block discarded – undo
94 94
 				print '<table class="border centpercent tableforfield">';
95 95
 			}
96 96
 
97
-			$key = $mode_key . '_' . $field_key;
97
+			$key = $mode_key.'_'.$field_key;
98 98
 			$value = $assetdepreciationoptions->deprecation_options[$mode_key][$field_key];
99 99
 
100
-			print '<tr class="field_' . $key . '"><td';
101
-			print ' class="' . (empty($field_info['tdcss']) ? 'titlefield' : $field_info['tdcss']) . ' fieldname_' . $key;
100
+			print '<tr class="field_'.$key.'"><td';
101
+			print ' class="'.(empty($field_info['tdcss']) ? 'titlefield' : $field_info['tdcss']).' fieldname_'.$key;
102 102
 			if ($field_info['type'] == 'text' || $field_info['type'] == 'html') {
103 103
 				print ' tdtop';
104 104
 			}
@@ -113,12 +113,12 @@  discard block
 block discarded – undo
113 113
 				}
114 114
 			}
115 115
 			print '</td>';
116
-			print '<td class="valuefield fieldname_' . $key;
116
+			print '<td class="valuefield fieldname_'.$key;
117 117
 			if ($field_info['type'] == 'text') {
118 118
 				print ' wordbreak';
119 119
 			}
120 120
 			if (!empty($field_info['cssview'])) {
121
-				print ' ' . $field_info['cssview'];
121
+				print ' '.$field_info['cssview'];
122 122
 			}
123 123
 			print '">';
124 124
 			if (in_array($field_info['type'], array('text', 'html'))) {
@@ -126,15 +126,15 @@  discard block
 block discarded – undo
126 126
 			}
127 127
 			if ($field_key == 'lang') {
128 128
 				$langs->load("languages");
129
-				$labellang = ($value ? $langs->trans('Language_' . $value) : '');
129
+				$labellang = ($value ? $langs->trans('Language_'.$value) : '');
130 130
 				print picto_from_langcode($value, 'class="paddingrightonly saturatemedium opacitylow"');
131 131
 				print $labellang;
132 132
 			} else {
133 133
 				if (isset($field_info['copytoclipboard']) && $field_info['copytoclipboard'] == 2) {
134
-					$out = $assetdepreciationoptions->showOutputField($field_info, $field_key, $value, '', '', $mode_key . '_', 0);
134
+					$out = $assetdepreciationoptions->showOutputField($field_info, $field_key, $value, '', '', $mode_key.'_', 0);
135 135
 					print showValueWithClipboardCPButton($out, 0, $out);
136 136
 				} else {
137
-					print $assetdepreciationoptions->showOutputField($field_info, $field_key, $value, '', '', $mode_key . '_', 0);
137
+					print $assetdepreciationoptions->showOutputField($field_info, $field_key, $value, '', '', $mode_key.'_', 0);
138 138
 				}
139 139
 			}
140 140
 			if (in_array($field_info['type'], array('text', 'html'))) {
Please login to merge, or discard this patch.
htdocs/accountancy/class/accountancyimport.class.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
 				$amount = $credit;
107 107
 			}
108 108
 
109
-			return "'" . $this->db->escape(abs($amount)) . "'";
109
+			return "'".$this->db->escape(abs($amount))."'";
110 110
 		}
111 111
 
112 112
 		return "''";
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
 				$sens = 'C';
135 135
 			}
136 136
 
137
-			return "'" . $this->db->escape($sens) . "'";
137
+			return "'".$this->db->escape($sens)."'";
138 138
 		}
139 139
 
140 140
 		return "''";
Please login to merge, or discard this patch.
htdocs/core/extrafieldsinimport.inc.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@
 block discarded – undo
48 48
 			case 'sellist':
49 49
 				$tmp = '';
50 50
 				$tmpparam = jsonOrUnserialize($obj->param); // $tmp may be array 'options' => array 'c_currencies:code_iso:code_iso' => null
51
-				if (is_array($tmpparam) && array_key_exists('options', $tmpparam) &&  $tmpparam['options'] && is_array($tmpparam['options'])) {
51
+				if (is_array($tmpparam) && array_key_exists('options', $tmpparam) && $tmpparam['options'] && is_array($tmpparam['options'])) {
52 52
 					$tmpkeys = array_keys($tmpparam['options']);
53 53
 					$tmp = array_shift($tmpkeys);
54 54
 				}
Please login to merge, or discard this patch.
htdocs/core/modules/modAccounting.class.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -353,7 +353,7 @@
 block discarded – undo
353 353
 			'b.montant'=>'rule-computeAmount',
354 354
 			'b.sens'=>'rule-computeDirection'
355 355
 		); // aliastable.field => ('user->id' or 'lastrowid-'.tableparent)
356
-		$this->import_convertvalue_array[$r]=array(
356
+		$this->import_convertvalue_array[$r] = array(
357 357
 			'b.piece_num' => array('rule' => 'compute', 'classfile' => '/accountancy/class/accountancyimport.class.php', 'class' => 'AccountancyImport', 'method' => 'cleanValue', 'element' => 'Accountancy'),
358 358
 			'b.numero_compte'=>array('rule'=>'accountingaccount'),
359 359
 			'b.subledger_account'=>array('rule'=>'accountingaccount'),
Please login to merge, or discard this patch.
htdocs/variants/tpl/productattributevalueline_create.tpl.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -66,7 +66,7 @@
 block discarded – undo
66 66
 	$coldisplay++;
67 67
 	?>
68 68
 	<td class="nobottom linecolref">
69
-		<?php $coldisplay++; if ($nolinesbefore) { echo $langs->trans('Ref') . ': '; } ?>
69
+		<?php $coldisplay++; if ($nolinesbefore) { echo $langs->trans('Ref').': '; } ?>
70 70
 		<input type="text" name="line_ref" id="line_ref" class="flat" value="<?php echo (GETPOSTISSET("line_ref") ? GETPOST("line_ref", 'alpha', 2) : ''); ?>" autofocus>
71 71
 		<?php
72 72
 		if (is_object($hookmanager)) {
Please login to merge, or discard this patch.
htdocs/variants/class/ProductAttributeValue.class.php 1 patch
Spacing   +35 added lines, -35 removed lines patch added patch discarded remove patch
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
 	/**
79 79
 	 * @var array  Array with all fields and their property. Do not use it as a static var. It may be modified by constructor.
80 80
 	 */
81
-	public $fields=array(
81
+	public $fields = array(
82 82
 		'rowid' => array('type'=>'integer', 'label'=>'TechnicalID', 'enabled'=>'1', 'position'=>1, 'notnull'=>1, 'visible'=>0, 'noteditable'=>'1', 'index'=>1, 'css'=>'left', 'comment'=>"Id"),
83 83
 		'fk_product_attribute' => array('type'=>'integer:ProductAttribute:variants/class/ProductAttribute.class.php', 'label'=>'ProductAttribute', 'enabled'=>1, 'visible'=>0, 'position'=>10, 'notnull'=>1, 'index'=>1,),
84 84
 		'ref' => array('type'=>'varchar(255)', 'label'=>'Ref', 'visible'=>1, 'enabled'=>1, 'position'=>20, 'notnull'=>1, 'index'=>1, 'searchall'=>1, 'comment'=>"Reference of object", 'css'=>''),
@@ -160,32 +160,32 @@  discard block
 block discarded – undo
160 160
 			$error++;
161 161
 		}
162 162
 		if ($error) {
163
-			dol_syslog(__METHOD__ . ' ' . $this->errorsToString(), LOG_ERR);
163
+			dol_syslog(__METHOD__.' '.$this->errorsToString(), LOG_ERR);
164 164
 			return -1;
165 165
 		}
166 166
 
167 167
 		$this->db->begin();
168 168
 
169
-		$sql = "INSERT INTO " . MAIN_DB_PREFIX . $this->table_element . " (";
169
+		$sql = "INSERT INTO ".MAIN_DB_PREFIX.$this->table_element." (";
170 170
 		$sql .= " fk_product_attribute, ref, value, entity, position";
171 171
 		$sql .= ")";
172 172
 		$sql .= " VALUES (";
173
-		$sql .= "  " . ((int) $this->fk_product_attribute);
174
-		$sql .= ", '" . $this->db->escape($this->ref) . "'";
175
-		$sql .= ", '" . $this->db->escape($this->value) . "'";
176
-		$sql .= ", " . ((int) $this->entity);
177
-		$sql .= ", " . ((int) $this->position);
173
+		$sql .= "  ".((int) $this->fk_product_attribute);
174
+		$sql .= ", '".$this->db->escape($this->ref)."'";
175
+		$sql .= ", '".$this->db->escape($this->value)."'";
176
+		$sql .= ", ".((int) $this->entity);
177
+		$sql .= ", ".((int) $this->position);
178 178
 		$sql .= ")";
179 179
 
180 180
 		dol_syslog(__METHOD__, LOG_DEBUG);
181 181
 		$resql = $this->db->query($sql);
182 182
 		if (!$resql) {
183
-			$this->errors[] = "Error " . $this->db->lasterror();
183
+			$this->errors[] = "Error ".$this->db->lasterror();
184 184
 			$error++;
185 185
 		}
186 186
 
187 187
 		if (!$error) {
188
-			$this->id = $this->db->last_insert_id(MAIN_DB_PREFIX . $this->table_element);
188
+			$this->id = $this->db->last_insert_id(MAIN_DB_PREFIX.$this->table_element);
189 189
 		}
190 190
 
191 191
 		if (!$error && !$notrigger) {
@@ -226,20 +226,20 @@  discard block
 block discarded – undo
226 226
 			$error++;
227 227
 		}
228 228
 		if ($error) {
229
-			dol_syslog(__METHOD__ . ' ' . $this->errorsToString(), LOG_ERR);
229
+			dol_syslog(__METHOD__.' '.$this->errorsToString(), LOG_ERR);
230 230
 			return -1;
231 231
 		}
232 232
 
233 233
 		$sql = "SELECT rowid, fk_product_attribute, ref, value";
234
-		$sql .= " FROM " . MAIN_DB_PREFIX . $this->table_element;
235
-		$sql .= " WHERE rowid = " . ((int) $id);
236
-		$sql .= " AND entity IN (" . getEntity('product') . ")";
234
+		$sql .= " FROM ".MAIN_DB_PREFIX.$this->table_element;
235
+		$sql .= " WHERE rowid = ".((int) $id);
236
+		$sql .= " AND entity IN (".getEntity('product').")";
237 237
 
238 238
 		dol_syslog(__METHOD__, LOG_DEBUG);
239 239
 		$resql = $this->db->query($sql);
240 240
 		if (!$resql) {
241
-			$this->errors[] = "Error " . $this->db->lasterror();
242
-			dol_syslog(__METHOD__ . ' ' . $this->errorsToString(), LOG_ERR);
241
+			$this->errors[] = "Error ".$this->db->lasterror();
242
+			dol_syslog(__METHOD__.' '.$this->errorsToString(), LOG_ERR);
243 243
 			return -1;
244 244
 		}
245 245
 
@@ -274,15 +274,15 @@  discard block
 block discarded – undo
274 274
 			$sql .= "DISTINCT ";
275 275
 		}
276 276
 
277
-		$sql .= "v.fk_product_attribute, v.rowid, v.ref, v.value FROM " . MAIN_DB_PREFIX . "product_attribute_value v ";
277
+		$sql .= "v.fk_product_attribute, v.rowid, v.ref, v.value FROM ".MAIN_DB_PREFIX."product_attribute_value v ";
278 278
 
279 279
 		if ($only_used) {
280
-			$sql .= "LEFT JOIN " . MAIN_DB_PREFIX . "product_attribute_combination2val c2v ON c2v.fk_prod_attr_val = v.rowid ";
281
-			$sql .= "LEFT JOIN " . MAIN_DB_PREFIX . "product_attribute_combination c ON c.rowid = c2v.fk_prod_combination ";
282
-			$sql .= "LEFT JOIN " . MAIN_DB_PREFIX . "product p ON p.rowid = c.fk_product_child ";
280
+			$sql .= "LEFT JOIN ".MAIN_DB_PREFIX."product_attribute_combination2val c2v ON c2v.fk_prod_attr_val = v.rowid ";
281
+			$sql .= "LEFT JOIN ".MAIN_DB_PREFIX."product_attribute_combination c ON c.rowid = c2v.fk_prod_combination ";
282
+			$sql .= "LEFT JOIN ".MAIN_DB_PREFIX."product p ON p.rowid = c.fk_product_child ";
283 283
 		}
284 284
 
285
-		$sql .= "WHERE v.fk_product_attribute = " . ((int) $prodattr_id);
285
+		$sql .= "WHERE v.fk_product_attribute = ".((int) $prodattr_id);
286 286
 
287 287
 		if ($only_used) {
288 288
 			$sql .= " AND c2v.rowid IS NOT NULL AND p.tosell = 1";
@@ -334,25 +334,25 @@  discard block
 block discarded – undo
334 334
 			$error++;
335 335
 		}
336 336
 		if ($error) {
337
-			dol_syslog(__METHOD__ . ' ' . $this->errorsToString(), LOG_ERR);
337
+			dol_syslog(__METHOD__.' '.$this->errorsToString(), LOG_ERR);
338 338
 			return -1;
339 339
 		}
340 340
 
341 341
 		$this->db->begin();
342 342
 
343
-		$sql = "UPDATE " . MAIN_DB_PREFIX . $this->table_element . " SET";
343
+		$sql = "UPDATE ".MAIN_DB_PREFIX.$this->table_element." SET";
344 344
 
345
-		$sql .= "  fk_product_attribute = " . ((int) $this->fk_product_attribute);
346
-		$sql .= ", ref = '" . $this->db->escape($this->ref) . "'";
347
-		$sql .= ", value = '" . $this->db->escape($this->value) . "'";
348
-		$sql .= ", position = " . ((int) $this->position);
345
+		$sql .= "  fk_product_attribute = ".((int) $this->fk_product_attribute);
346
+		$sql .= ", ref = '".$this->db->escape($this->ref)."'";
347
+		$sql .= ", value = '".$this->db->escape($this->value)."'";
348
+		$sql .= ", position = ".((int) $this->position);
349 349
 
350
-		$sql .= " WHERE rowid = " . ((int) $this->id);
350
+		$sql .= " WHERE rowid = ".((int) $this->id);
351 351
 
352 352
 		dol_syslog(__METHOD__, LOG_DEBUG);
353 353
 		$resql = $this->db->query($sql);
354 354
 		if (!$resql) {
355
-			$this->errors[] = "Error " . $this->db->lasterror();
355
+			$this->errors[] = "Error ".$this->db->lasterror();
356 356
 			$error++;
357 357
 		}
358 358
 
@@ -395,7 +395,7 @@  discard block
 block discarded – undo
395 395
 			$error++;
396 396
 		}
397 397
 		if ($error) {
398
-			dol_syslog(__METHOD__ . ' ' . $this->errorsToString(), LOG_ERR);
398
+			dol_syslog(__METHOD__.' '.$this->errorsToString(), LOG_ERR);
399 399
 			return -1;
400 400
 		}
401 401
 
@@ -419,12 +419,12 @@  discard block
 block discarded – undo
419 419
 		}
420 420
 
421 421
 		if (!$error) {
422
-			$sql = "DELETE FROM " . MAIN_DB_PREFIX . $this->table_element . " WHERE rowid = " . ((int) $this->id);
422
+			$sql = "DELETE FROM ".MAIN_DB_PREFIX.$this->table_element." WHERE rowid = ".((int) $this->id);
423 423
 
424 424
 			dol_syslog(__METHOD__, LOG_DEBUG);
425 425
 			$resql = $this->db->query($sql);
426 426
 			if (!$resql) {
427
-				$this->errors[] = "Error " . $this->db->lasterror();
427
+				$this->errors[] = "Error ".$this->db->lasterror();
428 428
 				$error++;
429 429
 			}
430 430
 		}
@@ -457,16 +457,16 @@  discard block
 block discarded – undo
457 457
 			$error++;
458 458
 		}
459 459
 		if ($error) {
460
-			dol_syslog(__METHOD__ . ' ' . $this->errorsToString(), LOG_ERR);
460
+			dol_syslog(__METHOD__.' '.$this->errorsToString(), LOG_ERR);
461 461
 			return -1;
462 462
 		}
463 463
 
464
-		$sql = "SELECT COUNT(*) AS nb FROM " . MAIN_DB_PREFIX . "product_attribute_combination2val WHERE fk_prod_attr_val = " . ((int) $this->id);
464
+		$sql = "SELECT COUNT(*) AS nb FROM ".MAIN_DB_PREFIX."product_attribute_combination2val WHERE fk_prod_attr_val = ".((int) $this->id);
465 465
 
466 466
 		dol_syslog(__METHOD__, LOG_DEBUG);
467 467
 		$resql = $this->db->query($sql);
468 468
 		if (!$resql) {
469
-			$this->errors[] = "Error " . $this->db->lasterror();
469
+			$this->errors[] = "Error ".$this->db->lasterror();
470 470
 			return -1;
471 471
 		}
472 472
 
Please login to merge, or discard this patch.
htdocs/core/class/commonstickergenerator.class.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -289,7 +289,7 @@
 block discarded – undo
289 289
 		// phpcs:enable
290 290
 		$this->_Metric = $format['metric'];
291 291
 		$this->_Avery_Name = $format['name'];
292
-		$this->_Avery_Code = empty($format['code'])?'':$format['code'];
292
+		$this->_Avery_Code = empty($format['code']) ? '' : $format['code'];
293 293
 		$this->_Margin_Left = $this->convertMetric($format['marginLeft'], $this->_Metric, $this->_Metric_Doc);
294 294
 		$this->_Margin_Top = $this->convertMetric($format['marginTop'], $this->_Metric, $this->_Metric_Doc);
295 295
 		$this->_X_Space = $this->convertMetric($format['SpaceX'], $this->_Metric, $this->_Metric_Doc);
Please login to merge, or discard this patch.
htdocs/expensereport/payment/list.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -53,20 +53,20 @@  discard block
 block discarded – undo
53 53
 // Security check
54 54
 if ($user->socid) $socid = $user->socid;
55 55
 
56
-$search_ref				= GETPOST('search_ref', 'alpha');
57
-$search_date_startday	= GETPOST('search_date_startday', 'int');
58
-$search_date_startmonth	= GETPOST('search_date_startmonth', 'int');
59
-$search_date_startyear	= GETPOST('search_date_startyear', 'int');
56
+$search_ref = GETPOST('search_ref', 'alpha');
57
+$search_date_startday = GETPOST('search_date_startday', 'int');
58
+$search_date_startmonth = GETPOST('search_date_startmonth', 'int');
59
+$search_date_startyear = GETPOST('search_date_startyear', 'int');
60 60
 $search_date_endday		= GETPOST('search_date_endday', 'int');
61
-$search_date_endmonth	= GETPOST('search_date_endmonth', 'int');
61
+$search_date_endmonth = GETPOST('search_date_endmonth', 'int');
62 62
 $search_date_endyear	= GETPOST('search_date_endyear', 'int');
63
-$search_date_start		= dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear);	// Use tzserver
64
-$search_date_end		= dol_mktime(23, 59, 59, $search_date_endmonth, $search_date_endday, $search_date_endyear);
65
-$search_user			= GETPOST('search_user', 'alpha');
63
+$search_date_start = dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear); // Use tzserver
64
+$search_date_end = dol_mktime(23, 59, 59, $search_date_endmonth, $search_date_endday, $search_date_endyear);
65
+$search_user = GETPOST('search_user', 'alpha');
66 66
 $search_payment_type	= GETPOST('search_payment_type');
67
-$search_cheque_num		= GETPOST('search_cheque_num', 'alpha');
67
+$search_cheque_num = GETPOST('search_cheque_num', 'alpha');
68 68
 $search_bank_account	= GETPOST('search_bank_account', 'int');
69
-$search_amount			= GETPOST('search_amount', 'alpha'); // alpha because we must be able to search on '< x'
69
+$search_amount = GETPOST('search_amount', 'alpha'); // alpha because we must be able to search on '< x'
70 70
 
71 71
 $limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit;
72 72
 $sortfield				= GETPOST('sortfield', 'aZ09comma');
@@ -198,10 +198,10 @@  discard block
 block discarded – undo
198 198
 	$sql .= natural_search('pndf.rowid', $search_ref);
199 199
 }
200 200
 if ($search_date_start) {
201
-	$sql .= " AND pndf.datep >= '" . $db->idate($search_date_start) . "'";
201
+	$sql .= " AND pndf.datep >= '".$db->idate($search_date_start)."'";
202 202
 }
203 203
 if ($search_date_end) {
204
-	$sql .=" AND pndf.datep <= '" . $db->idate($search_date_end) . "'";
204
+	$sql .= " AND pndf.datep <= '".$db->idate($search_date_end)."'";
205 205
 }
206 206
 
207 207
 if ($search_user) {
Please login to merge, or discard this patch.