Completed
Branch develop (758ccb)
by
unknown
17:59
created
htdocs/webportal/class/webportalpartnership.class.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
  */
24 24
 
25 25
 // Put here all includes required by your class file
26
-require_once DOL_DOCUMENT_ROOT . '/partnership/class/partnership.class.php';
26
+require_once DOL_DOCUMENT_ROOT.'/partnership/class/partnership.class.php';
27 27
 
28 28
 /**
29 29
  * Class for WebPortalPartnership
@@ -204,11 +204,11 @@  discard block
 block discarded – undo
204 204
 		if (getDolGlobalInt('MAIN_OPTIMIZEFORTEXTBROWSER')) {
205 205
 			return ['optimize' => $langs->trans("WebPortalPartnership")];
206 206
 		}
207
-		$datas['picto'] = img_picto('', $this->picto) . ' <u>' . $langs->trans("WebPortalPartnership") . '</u>';
207
+		$datas['picto'] = img_picto('', $this->picto).' <u>'.$langs->trans("WebPortalPartnership").'</u>';
208 208
 		if (isset($this->status)) {
209
-			$datas['picto'] .= ' ' . $this->getLibStatut(5);
209
+			$datas['picto'] .= ' '.$this->getLibStatut(5);
210 210
 		}
211
-		$datas['ref'] .= '<br><b>' . $langs->trans('Ref') . ':</b> ' . $this->ref;
211
+		$datas['ref'] .= '<br><b>'.$langs->trans('Ref').':</b> '.$this->ref;
212 212
 
213 213
 		return $datas;
214 214
 	}
@@ -243,7 +243,7 @@  discard block
 block discarded – undo
243 243
 		$dataparams = '';
244 244
 		if (getDolGlobalInt('MAIN_ENABLE_AJAX_TOOLTIP')) {
245 245
 			$classfortooltip = 'classforajaxtooltip';
246
-			$dataparams = ' data-params="' . dol_escape_htmltag(json_encode($params)) . '"';
246
+			$dataparams = ' data-params="'.dol_escape_htmltag(json_encode($params)).'"';
247 247
 			$label = '';
248 248
 		} else {
249 249
 			$label = implode($this->getTooltipContentArray($params));
@@ -267,20 +267,20 @@  discard block
 block discarded – undo
267 267
 		if (empty($notooltip)) {
268 268
 			if (getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER')) {
269 269
 				$label = $langs->trans("ShowPartnership");
270
-				$linkclose .= ' alt="' . dol_escape_htmltag($label, 1) . '"';
270
+				$linkclose .= ' alt="'.dol_escape_htmltag($label, 1).'"';
271 271
 			}
272
-			$linkclose .= ($label ? ' title="' . dol_escape_htmltag($label, 1) . '"' : ' title="tocomplete"');
273
-			$linkclose .= $dataparams . ' class="' . $classfortooltip . ($morecss ? ' ' . $morecss : '') . '"';
272
+			$linkclose .= ($label ? ' title="'.dol_escape_htmltag($label, 1).'"' : ' title="tocomplete"');
273
+			$linkclose .= $dataparams.' class="'.$classfortooltip.($morecss ? ' '.$morecss : '').'"';
274 274
 		} else {
275
-			$linkclose = ($morecss ? ' class="' . $morecss . '"' : '');
275
+			$linkclose = ($morecss ? ' class="'.$morecss.'"' : '');
276 276
 		}
277 277
 
278 278
 		if ($option == 'nolink') {
279 279
 			$linkstart = '<span';
280 280
 		} else {
281
-			$linkstart = '<a href="' . $url . '"';
281
+			$linkstart = '<a href="'.$url.'"';
282 282
 		}
283
-		$linkstart .= $linkclose . '>';
283
+		$linkstart .= $linkclose.'>';
284 284
 		if ($option == 'nolink') {
285 285
 			$linkend = '</span>';
286 286
 		} else {
@@ -291,29 +291,29 @@  discard block
 block discarded – undo
291 291
 
292 292
 		if (empty($this->showphoto_on_popup)) {
293 293
 			if ($withpicto) {
294
-				$result .= img_object(($notooltip ? '' : $label), ($this->picto ? $this->picto : 'generic'), ($notooltip ? (($withpicto != 2) ? 'class="paddingright"' : '') : $dataparams . ' class="' . (($withpicto != 2) ? 'paddingright ' : '') . $classfortooltip . '"'), 0, 0, $notooltip ? 0 : 1);
294
+				$result .= img_object(($notooltip ? '' : $label), ($this->picto ? $this->picto : 'generic'), ($notooltip ? (($withpicto != 2) ? 'class="paddingright"' : '') : $dataparams.' class="'.(($withpicto != 2) ? 'paddingright ' : '').$classfortooltip.'"'), 0, 0, $notooltip ? 0 : 1);
295 295
 			}
296 296
 		} else {
297 297
 			if ($withpicto) {
298
-				require_once DOL_DOCUMENT_ROOT . '/core/lib/files.lib.php';
298
+				require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
299 299
 
300 300
 				list($class, $module) = explode('@', $this->picto);
301
-				$upload_dir = $conf->$module->multidir_output[$conf->entity] . "/$class/" . dol_sanitizeFileName($this->ref);
301
+				$upload_dir = $conf->$module->multidir_output[$conf->entity]."/$class/".dol_sanitizeFileName($this->ref);
302 302
 				$filearray = dol_dir_list($upload_dir, "files");
303 303
 				$filename = $filearray[0]['name'];
304 304
 				if (!empty($filename)) {
305 305
 					$pospoint = strpos($filearray[0]['name'], '.');
306 306
 
307
-					$pathtophoto = $class . '/' . $this->ref . '/thumbs/' . substr($filename, 0, $pospoint) . '_mini' . substr($filename, $pospoint);
308
-					if (!getDolGlobalString(strtoupper($module . '_' . $class) . '_FORMATLISTPHOTOSASUSERS')) {
309
-						$result .= '<div class="floatleft inline-block valignmiddle divphotoref"><div class="photoref"><img class="photo' . $module . '" alt="No photo" border="0" src="' . DOL_URL_ROOT . '/viewimage.php?modulepart=' . $module . '&entity=' . $conf->entity . '&file=' . urlencode($pathtophoto) . '"></div></div>';
307
+					$pathtophoto = $class.'/'.$this->ref.'/thumbs/'.substr($filename, 0, $pospoint).'_mini'.substr($filename, $pospoint);
308
+					if (!getDolGlobalString(strtoupper($module.'_'.$class).'_FORMATLISTPHOTOSASUSERS')) {
309
+						$result .= '<div class="floatleft inline-block valignmiddle divphotoref"><div class="photoref"><img class="photo'.$module.'" alt="No photo" border="0" src="'.DOL_URL_ROOT.'/viewimage.php?modulepart='.$module.'&entity='.$conf->entity.'&file='.urlencode($pathtophoto).'"></div></div>';
310 310
 					} else {
311
-						$result .= '<div class="floatleft inline-block valignmiddle divphotoref"><img class="photouserphoto userphoto" alt="No photo" border="0" src="' . DOL_URL_ROOT . '/viewimage.php?modulepart=' . $module . '&entity=' . $conf->entity . '&file=' . urlencode($pathtophoto) . '"></div>';
311
+						$result .= '<div class="floatleft inline-block valignmiddle divphotoref"><img class="photouserphoto userphoto" alt="No photo" border="0" src="'.DOL_URL_ROOT.'/viewimage.php?modulepart='.$module.'&entity='.$conf->entity.'&file='.urlencode($pathtophoto).'"></div>';
312 312
 					}
313 313
 
314 314
 					$result .= '</div>';
315 315
 				} else {
316
-					$result .= img_object(($notooltip ? '' : $label), ($this->picto ? $this->picto : 'generic'), ($notooltip ? (($withpicto != 2) ? 'class="paddingright"' : '') : 'class="' . (($withpicto != 2) ? 'paddingright ' : '') . 'classfortooltip"'), 0, 0, $notooltip ? 0 : 1);
316
+					$result .= img_object(($notooltip ? '' : $label), ($this->picto ? $this->picto : 'generic'), ($notooltip ? (($withpicto != 2) ? 'class="paddingright"' : '') : 'class="'.(($withpicto != 2) ? 'paddingright ' : '').'classfortooltip"'), 0, 0, $notooltip ? 0 : 1);
317 317
 				}
318 318
 			}
319 319
 		}
Please login to merge, or discard this patch.
htdocs/webportal/class/html.formwebportal.class.php 1 patch
Spacing   +129 added lines, -129 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
  * \brief      File of class with all html predefined components for WebPortal
25 25
  */
26 26
 
27
-require_once DOL_DOCUMENT_ROOT . '/core/class/html.form.class.php';
27
+require_once DOL_DOCUMENT_ROOT.'/core/class/html.form.class.php';
28 28
 
29 29
 /**
30 30
  * Class to manage generation of HTML components
@@ -70,19 +70,19 @@  discard block
 block discarded – undo
70 70
 	{
71 71
 		$out = '';
72 72
 		if ($label != '') {
73
-			$out .= '<label for="' . $id . '">';
73
+			$out .= '<label for="'.$id.'">';
74 74
 		}
75
-		$out .= '<input type="' . $type . '"';
76
-		$out .= ($morecss ? ' class="' . $morecss . '"' : '');
75
+		$out .= '<input type="'.$type.'"';
76
+		$out .= ($morecss ? ' class="'.$morecss.'"' : '');
77 77
 		if ($id != '') {
78
-			$out .= ' id="' . $id . '"';
78
+			$out .= ' id="'.$id.'"';
79 79
 		}
80
-		$out .= ' name="' . $name . '"';
81
-		$out .= ' value="' . $value . '"';
82
-		$out .= ($moreparam ? ' ' . $moreparam : '');
83
-		$out .= ' />' . $addInputLabel;
80
+		$out .= ' name="'.$name.'"';
81
+		$out .= ' value="'.$value.'"';
82
+		$out .= ($moreparam ? ' '.$moreparam : '');
83
+		$out .= ' />'.$addInputLabel;
84 84
 		if ($label != '') {
85
-			$out .= $label . '</label>';
85
+			$out .= $label.'</label>';
86 86
 		}
87 87
 
88 88
 		return $out;
@@ -106,17 +106,17 @@  discard block
 block discarded – undo
106 106
 		$out .= '<input';
107 107
 		if ($placeholder != '' && $value == '') {
108 108
 			// to show a placeholder on date input
109
-			$out .= ' type="text" placeholder="' . $placeholder . '" onfocus="(this.type=\'date\')"';
109
+			$out .= ' type="text" placeholder="'.$placeholder.'" onfocus="(this.type=\'date\')"';
110 110
 		} else {
111 111
 			$out .= ' type="date"';
112 112
 		}
113
-		$out .= ($morecss ? ' class="' . $morecss . '"' : '');
113
+		$out .= ($morecss ? ' class="'.$morecss.'"' : '');
114 114
 		if ($id != '') {
115
-			$out .= ' id="' . $id . '"';
115
+			$out .= ' id="'.$id.'"';
116 116
 		}
117
-		$out .= ' name="' . $name . '"';
118
-		$out .= ' value="' . $value . '"';
119
-		$out .= ($moreparam ? ' ' . $moreparam : '');
117
+		$out .= ' name="'.$name.'"';
118
+		$out .= ' value="'.$value.'"';
119
+		$out .= ($moreparam ? ' '.$moreparam : '');
120 120
 
121 121
 		$out .= '>';
122 122
 
@@ -156,16 +156,16 @@  discard block
 block discarded – undo
156 156
 		$out = '';
157 157
 
158 158
 		$idname = str_replace(array('[', ']'), array('', ''), $htmlname);
159
-		$out .= '<select id="' . preg_replace('/^\./', '', $idname) . '"' . ($disabled ? ' disabled="disabled"' : '') . ' class="' . ($morecss ? ' ' . $morecss : '') . '"';
160
-		$out .= ' name="' . preg_replace('/^\./', '', $htmlname) . '"' . ($moreparam ? ' ' . $moreparam : '');
161
-		$out .= '>' . "\n";
159
+		$out .= '<select id="'.preg_replace('/^\./', '', $idname).'"'.($disabled ? ' disabled="disabled"' : '').' class="'.($morecss ? ' '.$morecss : '').'"';
160
+		$out .= ' name="'.preg_replace('/^\./', '', $htmlname).'"'.($moreparam ? ' '.$moreparam : '');
161
+		$out .= '>'."\n";
162 162
 
163 163
 		if ($show_empty) {
164 164
 			$textforempty = ' ';
165 165
 			if (!is_numeric($show_empty)) {
166 166
 				$textforempty = $show_empty;
167 167
 			}
168
-			$out .= '<option value="' . ($show_empty < 0 ? $show_empty : -1) . '"' . ($id == $show_empty ? ' selected' : '') . '>' . $textforempty . '</option>' . "\n";
168
+			$out .= '<option value="'.($show_empty < 0 ? $show_empty : -1).'"'.($id == $show_empty ? ' selected' : '').'>'.$textforempty.'</option>'."\n";
169 169
 		}
170 170
 
171 171
 		if (is_array($array)) {
@@ -197,7 +197,7 @@  discard block
 block discarded – undo
197 197
 				}
198 198
 
199 199
 				if ($key_in_label) {
200
-					$selectOptionValue = dol_escape_htmltag($key . ' - ' . ($maxlen ? dol_trunc($value, $maxlen) : $value));
200
+					$selectOptionValue = dol_escape_htmltag($key.' - '.($maxlen ? dol_trunc($value, $maxlen) : $value));
201 201
 				} else {
202 202
 					$selectOptionValue = dol_escape_htmltag($maxlen ? dol_trunc($value, $maxlen) : $value);
203 203
 					if ($value == '' || $value == '-') {
@@ -205,7 +205,7 @@  discard block
 block discarded – undo
205 205
 					}
206 206
 				}
207 207
 
208
-				$out .= '<option value="' . $key . '"';
208
+				$out .= '<option value="'.$key.'"';
209 209
 				$out .= $disabled;
210 210
 				if (is_array($id)) {
211 211
 					if (in_array($key, $id) && !$disabled) {
@@ -220,7 +220,7 @@  discard block
 block discarded – undo
220 220
 				if (is_array($tmpvalue)) {
221 221
 					foreach ($tmpvalue as $keyforvalue => $valueforvalue) {
222 222
 						if (preg_match('/^data-/', $keyforvalue)) {
223
-							$out .= ' ' . $keyforvalue . '="' . dol_escape_htmltag($valueforvalue) . '"';
223
+							$out .= ' '.$keyforvalue.'="'.dol_escape_htmltag($valueforvalue).'"';
224 224
 						}
225 225
 					}
226 226
 				}
@@ -252,7 +252,7 @@  discard block
 block discarded – undo
252 252
 	{
253 253
 		global $conf;
254 254
 
255
-		include_once DOL_DOCUMENT_ROOT . '/core/lib/files.lib.php';
255
+		include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
256 256
 
257 257
 		$out = '';
258 258
 
@@ -268,21 +268,21 @@  discard block
 block discarded – undo
268 268
 		// Get object entity
269 269
 		if (isModEnabled('multicompany')) {
270 270
 			$regs = array();
271
-			preg_match('/\/([0-9]+)\/[^\/]+\/' . preg_quote($modulesubdir, '/') . '$/', $filedir, $regs);
271
+			preg_match('/\/([0-9]+)\/[^\/]+\/'.preg_quote($modulesubdir, '/').'$/', $filedir, $regs);
272 272
 			$entity = ((!empty($regs[1]) && $regs[1] > 1) ? $regs[1] : 1); // If entity id not found in $filedir this is entity 1 by default
273 273
 		}
274 274
 
275 275
 		// Get list of files starting with name of ref (Note: files with '^ref\.extension' are generated files, files with '^ref-...' are uploaded files)
276 276
 		if ($allfiles || getDolGlobalString('MAIN_SHOW_ALL_FILES_ON_DOCUMENT_TOOLTIP')) {
277
-			$filterforfilesearch = '^' . preg_quote(basename($modulesubdir), '/');
277
+			$filterforfilesearch = '^'.preg_quote(basename($modulesubdir), '/');
278 278
 		} else {
279
-			$filterforfilesearch = '^' . preg_quote(basename($modulesubdir), '/') . '\.';
279
+			$filterforfilesearch = '^'.preg_quote(basename($modulesubdir), '/').'\.';
280 280
 		}
281 281
 		$file_list = dol_dir_list($filedir, 'files', 0, $filterforfilesearch, '\.meta$|\.png$'); // We also discard .meta and .png preview
282 282
 
283 283
 		//var_dump($file_list);
284 284
 		// For ajax treatment
285
-		$out .= '<!-- html.formfile::getDocumentsLink -->' . "\n";
285
+		$out .= '<!-- html.formfile::getDocumentsLink -->'."\n";
286 286
 		if (!empty($file_list)) {
287 287
 			$out = '';
288 288
 			$tmpout = '';
@@ -292,7 +292,7 @@  discard block
 block discarded – undo
292 292
 			$i = 0;
293 293
 			foreach ($file_list as $file) {
294 294
 				$i++;
295
-				if ($filter && !preg_match('/' . $filter . '/i', $file["name"])) {
295
+				if ($filter && !preg_match('/'.$filter.'/i', $file["name"])) {
296 296
 					continue; // Discard this. It does not match provided filter.
297 297
 				}
298 298
 
@@ -300,11 +300,11 @@  discard block
 block discarded – undo
300 300
 				// Define relative path for download link (depends on module)
301 301
 				$relativepath = $file["name"]; // Cas general
302 302
 				if ($modulesubdir) {
303
-					$relativepath = $modulesubdir . "/" . $file["name"]; // Cas propal, facture...
303
+					$relativepath = $modulesubdir."/".$file["name"]; // Cas propal, facture...
304 304
 				}
305 305
 				// Autre cas
306 306
 				if ($modulepart == 'donation') {
307
-					$relativepath = get_exdir($modulesubdir, 2, 0, 0, null, 'donation') . $file["name"];
307
+					$relativepath = get_exdir($modulesubdir, 2, 0, 0, null, 'donation').$file["name"];
308 308
 				}
309 309
 				if ($modulepart == 'export') {
310 310
 					$relativepath = $file["name"];
@@ -320,8 +320,8 @@  discard block
 block discarded – undo
320 320
 				}
321 321
 
322 322
 				// Download
323
-				$url = $context->getControllerUrl('document') . '&modulepart=' . $modulepart . '&entity=' . $entity . '&file=' . urlencode($relativepath) . '&soc_id=' . $context->logged_thirdparty->id;
324
-				$tmpout .= '<a href="' . $url . '"' . ($morecss ? ' class="' . $morecss . '"' : '') . ' role="button"';
323
+				$url = $context->getControllerUrl('document').'&modulepart='.$modulepart.'&entity='.$entity.'&file='.urlencode($relativepath).'&soc_id='.$context->logged_thirdparty->id;
324
+				$tmpout .= '<a href="'.$url.'"'.($morecss ? ' class="'.$morecss.'"' : '').' role="button"';
325 325
 				$mime = dol_mimetype($relativepath, '', 0);
326 326
 				if (preg_match('/text/', $mime)) {
327 327
 					$tmpout .= ' target="_blank" rel="noopener noreferrer"';
@@ -374,9 +374,9 @@  discard block
 block discarded – undo
374 374
 		$vartmp = (empty($InfoFieldList[3]) ? '' : $InfoFieldList[3]);
375 375
 		$reg = array();
376 376
 		if (preg_match('/^.*:(\w*)$/', $vartmp, $reg)) {
377
-			$InfoFieldList[4] = $reg[1];    // take the sort field
377
+			$InfoFieldList[4] = $reg[1]; // take the sort field
378 378
 		}
379
-		$InfoFieldList[3] = preg_replace('/:\w*$/', '', $vartmp);    // take the filter field
379
+		$InfoFieldList[3] = preg_replace('/:\w*$/', '', $vartmp); // take the filter field
380 380
 
381 381
 		$classname = $InfoFieldList[0];
382 382
 		$classpath = $InfoFieldList[1];
@@ -399,11 +399,11 @@  discard block
 block discarded – undo
399 399
 			}
400 400
 		}
401 401
 		if (!is_object($objecttmp)) {
402
-			dol_syslog('Error bad setup of type for field ' . join(',', $InfoFieldList), LOG_WARNING);
403
-			return 'Error bad setup of type for field ' . join(',', $InfoFieldList);
402
+			dol_syslog('Error bad setup of type for field '.join(',', $InfoFieldList), LOG_WARNING);
403
+			return 'Error bad setup of type for field '.join(',', $InfoFieldList);
404 404
 		}
405 405
 
406
-		dol_syslog(__METHOD__ . ' filter=' . $filter, LOG_DEBUG);
406
+		dol_syslog(__METHOD__.' filter='.$filter, LOG_DEBUG);
407 407
 		$out = '';
408 408
 		// Immediate load of table record.
409 409
 		$out .= $this->selectForFormsList($objecttmp, $htmlname, $preselectedvalue, $showempty, $searchkey, $placeholder, $morecss, $moreparams, $forcecombo, 0, $disabled, $sortfield, $filter);
@@ -439,7 +439,7 @@  discard block
 block discarded – undo
439 439
 		if ($prefixforautocompletemode == 'societe') {
440 440
 			$prefixforautocompletemode = 'company';
441 441
 		}
442
-		$confkeyforautocompletemode = strtoupper($prefixforautocompletemode) . '_USE_SEARCH_TO_SELECT'; // For example COMPANY_USE_SEARCH_TO_SELECT
442
+		$confkeyforautocompletemode = strtoupper($prefixforautocompletemode).'_USE_SEARCH_TO_SELECT'; // For example COMPANY_USE_SEARCH_TO_SELECT
443 443
 
444 444
 		if (in_array($objecttmp->element, array('adherent_type'))) {
445 445
 			$fieldstoshow = 't.libelle';
@@ -451,7 +451,7 @@  discard block
 block discarded – undo
451 451
 					continue;
452 452
 				}
453 453
 				if (!empty($val['showoncombobox'])) {
454
-					$tmpfieldstoshow .= ($tmpfieldstoshow ? ',' : '') . 't.' . $key;
454
+					$tmpfieldstoshow .= ($tmpfieldstoshow ? ',' : '').'t.'.$key;
455 455
 				}
456 456
 			}
457 457
 			if ($tmpfieldstoshow) {
@@ -479,11 +479,11 @@  discard block
 block discarded – undo
479 479
 		$num = 0;
480 480
 
481 481
 		// Search data
482
-		$sql = "SELECT t.rowid, " . $fieldstoshow . " FROM " . $this->db->prefix() . $objecttmp->table_element . " as t";
482
+		$sql = "SELECT t.rowid, ".$fieldstoshow." FROM ".$this->db->prefix().$objecttmp->table_element." as t";
483 483
 		if (isset($objecttmp->ismultientitymanaged)) {
484 484
 			if (!is_numeric($objecttmp->ismultientitymanaged)) {
485 485
 				$tmparray = explode('@', $objecttmp->ismultientitymanaged);
486
-				$sql .= " INNER JOIN " . $this->db->prefix() . $tmparray[1] . " as parenttable ON parenttable.rowid = t." . $tmparray[0];
486
+				$sql .= " INNER JOIN ".$this->db->prefix().$tmparray[1]." as parenttable ON parenttable.rowid = t.".$tmparray[0];
487 487
 			}
488 488
 		}
489 489
 
@@ -502,10 +502,10 @@  discard block
 block discarded – undo
502 502
 			$sql .= " WHERE 1=1";
503 503
 			if (isset($objecttmp->ismultientitymanaged)) {
504 504
 				if ($objecttmp->ismultientitymanaged == 1) {
505
-					$sql .= " AND t.entity IN (" . getEntity($objecttmp->table_element) . ")";
505
+					$sql .= " AND t.entity IN (".getEntity($objecttmp->table_element).")";
506 506
 				}
507 507
 				if (!is_numeric($objecttmp->ismultientitymanaged)) {
508
-					$sql .= " AND parenttable.entity = t." . $tmparray[0];
508
+					$sql .= " AND parenttable.entity = t.".$tmparray[0];
509 509
 				}
510 510
 			}
511 511
 			if ($searchkey != '') {
@@ -516,7 +516,7 @@  discard block
 block discarded – undo
516 516
 				$errormessage = '';
517 517
 				$sql .= forgeSQLFromUniversalSearchCriteria($filter, $errormessage);
518 518
 				if ($errormessage) {
519
-					return 'Error forging a SQL request from an universal criteria: ' . $errormessage;
519
+					return 'Error forging a SQL request from an universal criteria: '.$errormessage;
520 520
 				}
521 521
 			}
522 522
 		}
@@ -526,7 +526,7 @@  discard block
 block discarded – undo
526 526
 		$resql = $this->db->query($sql);
527 527
 		if ($resql) {
528 528
 			// Construct $out and $outarray
529
-			$out .= '<select id="' . $htmlname . '" class="' . ($morecss ? ' ' . $morecss : '') . '"' . ($disabled ? ' disabled="disabled"' : '') . ($moreparams ? ' ' . $moreparams : '') . ' name="' . $htmlname . '">' . "\n";
529
+			$out .= '<select id="'.$htmlname.'" class="'.($morecss ? ' '.$morecss : '').'"'.($disabled ? ' disabled="disabled"' : '').($moreparams ? ' '.$moreparams : '').' name="'.$htmlname.'">'."\n";
530 530
 
531 531
 			// Warning: Do not use textifempty = ' ' or '&nbsp;' here, or search on key will search on ' key'. Seems it is no more true with selec2 v4
532 532
 			$textifempty = '&nbsp;';
@@ -540,7 +540,7 @@  discard block
 block discarded – undo
540 540
 				}
541 541
 			}
542 542
 			if ($showempty) {
543
-				$out .= '<option value="-1">' . $textifempty . '</option>' . "\n";
543
+				$out .= '<option value="-1">'.$textifempty.'</option>'."\n";
544 544
 			}
545 545
 
546 546
 			$num = $this->db->num_rows($resql);
@@ -563,9 +563,9 @@  discard block
 block discarded – undo
563 563
 					}
564 564
 					if (empty($outputmode)) {
565 565
 						if ($preselectedvalue > 0 && $preselectedvalue == $obj->rowid) {
566
-							$out .= '<option value="' . $obj->rowid . '" selected data-html="' . dol_escape_htmltag($labelhtml, 0, 0, '', 0, 1) . '">' . dol_escape_htmltag($label, 0, 0, '', 0, 1) . '</option>';
566
+							$out .= '<option value="'.$obj->rowid.'" selected data-html="'.dol_escape_htmltag($labelhtml, 0, 0, '', 0, 1).'">'.dol_escape_htmltag($label, 0, 0, '', 0, 1).'</option>';
567 567
 						} else {
568
-							$out .= '<option value="' . $obj->rowid . '" data-html="' . dol_escape_htmltag($labelhtml, 0, 0, '', 0, 1) . '">' . dol_escape_htmltag($label, 0, 0, '', 0, 1) . '</option>';
568
+							$out .= '<option value="'.$obj->rowid.'" data-html="'.dol_escape_htmltag($labelhtml, 0, 0, '', 0, 1).'">'.dol_escape_htmltag($label, 0, 0, '', 0, 1).'</option>';
569 569
 						}
570 570
 					} else {
571 571
 						array_push($outarray, array('key' => $obj->rowid, 'value' => $label, 'label' => $label));
@@ -578,7 +578,7 @@  discard block
 block discarded – undo
578 578
 				}
579 579
 			}
580 580
 
581
-			$out .= '</select>' . "\n";
581
+			$out .= '</select>'."\n";
582 582
 		} else {
583 583
 			dol_print_error($this->db);
584 584
 		}
@@ -615,22 +615,22 @@  discard block
 block discarded – undo
615 615
 		$size = !empty($val['size']) ? $val['size'] : 0;
616 616
 		// see common object class
617 617
 		if (preg_match('/^(integer|link):(.*):(.*):(.*):(.*)/i', $val['type'], $reg)) {
618
-			$param['options'] = array($reg[2] . ':' . $reg[3] . ':' . $reg[4] . ':' . $reg[5] => 'N');
618
+			$param['options'] = array($reg[2].':'.$reg[3].':'.$reg[4].':'.$reg[5] => 'N');
619 619
 			$type = 'link';
620 620
 		} elseif (preg_match('/^(integer|link):(.*):(.*):(.*)/i', $val['type'], $reg)) {
621
-			$param['options'] = array($reg[2] . ':' . $reg[3] . ':' . $reg[4] => 'N');
621
+			$param['options'] = array($reg[2].':'.$reg[3].':'.$reg[4] => 'N');
622 622
 			$type = 'link';
623 623
 		} elseif (preg_match('/^(integer|link):(.*):(.*)/i', $val['type'], $reg)) {
624
-			$param['options'] = array($reg[2] . ':' . $reg[3] => 'N');
624
+			$param['options'] = array($reg[2].':'.$reg[3] => 'N');
625 625
 			$type = 'link';
626 626
 		} elseif (preg_match('/^(sellist):(.*):(.*):(.*):(.*)/i', $val['type'], $reg)) {
627
-			$param['options'] = array($reg[2] . ':' . $reg[3] . ':' . $reg[4] . ':' . $reg[5] => 'N');
627
+			$param['options'] = array($reg[2].':'.$reg[3].':'.$reg[4].':'.$reg[5] => 'N');
628 628
 			$type = 'sellist';
629 629
 		} elseif (preg_match('/^(sellist):(.*):(.*):(.*)/i', $val['type'], $reg)) {
630
-			$param['options'] = array($reg[2] . ':' . $reg[3] . ':' . $reg[4] => 'N');
630
+			$param['options'] = array($reg[2].':'.$reg[3].':'.$reg[4] => 'N');
631 631
 			$type = 'sellist';
632 632
 		} elseif (preg_match('/^(sellist):(.*):(.*)/i', $val['type'], $reg)) {
633
-			$param['options'] = array($reg[2] . ':' . $reg[3] => 'N');
633
+			$param['options'] = array($reg[2].':'.$reg[3] => 'N');
634 634
 			$type = 'sellist';
635 635
 		} elseif (preg_match('/^varchar\((\d+)\)/', $val['type'], $reg)) {
636 636
 			$param['options'] = array();
@@ -668,7 +668,7 @@  discard block
 block discarded – undo
668 668
 
669 669
 		if ($computed) {
670 670
 			if (!preg_match('/^search_/', $keyprefix)) {
671
-				return '<span>' . $langs->trans("AutomaticallyCalculated") . '</span>';
671
+				return '<span>'.$langs->trans("AutomaticallyCalculated").'</span>';
672 672
 			} else {
673 673
 				return '';
674 674
 			}
@@ -679,7 +679,7 @@  discard block
 block discarded – undo
679 679
 			$morecss = $val['css'];
680 680
 		}
681 681
 
682
-		$htmlName = $keyprefix . $key . $keysuffix;
682
+		$htmlName = $keyprefix.$key.$keysuffix;
683 683
 		$htmlId = $htmlName;
684 684
 		//$moreparam .= (!empty($required)  ? ' required' : '');
685 685
 		switch ($type) {
@@ -699,7 +699,7 @@  discard block
 block discarded – undo
699 699
 
700 700
 				if ($type == 'datetime') {
701 701
 					//$moreparam .= ' step="1"'; to show seconds
702
-					$out .= ' ' . $this->inputType('time', $htmlName . '_time', $valueTime, $htmlName . '_time', $morecss, $moreparam);
702
+					$out .= ' '.$this->inputType('time', $htmlName.'_time', $valueTime, $htmlName.'_time', $morecss, $moreparam);
703 703
 				}
704 704
 				break;
705 705
 
@@ -709,7 +709,7 @@  discard block
 block discarded – undo
709 709
 
710 710
 			case 'text' :
711 711
 			case 'html' :
712
-				$moreparam .= ($size > 0 ? ' maxlength="' . $size . '"' : '');
712
+				$moreparam .= ($size > 0 ? ' maxlength="'.$size.'"' : '');
713 713
 				$out = $this->inputType('text', $htmlName, dol_escape_htmltag($value), $htmlId, $morecss, $moreparam);
714 714
 				break;
715 715
 
@@ -729,7 +729,7 @@  discard block
 block discarded – undo
729 729
 				if (!empty($value)) {
730 730
 					$value = price($value); // $value in memory is a php numeric, we format it into user number format.
731 731
 				}
732
-				$addInputLabel = ' ' . $langs->getCurrencySymbol($conf->currency);
732
+				$addInputLabel = ' '.$langs->getCurrencySymbol($conf->currency);
733 733
 				$out = $this->inputType('text', $htmlName, $value, $htmlId, $morecss, $moreparam, $addInputLabel);
734 734
 				break;
735 735
 
@@ -746,14 +746,14 @@  discard block
 block discarded – undo
746 746
 
747 747
 			case 'radio' :
748 748
 				foreach ($param['options'] as $keyopt => $valopt) {
749
-					$htmlId = $htmlName . '_' . $keyopt;
750
-					$htmlMoreParam = $moreparam . ($value == $keyopt ? ' checked' : '');
751
-					$out .= $this->inputType('radio', $htmlName, $keyopt, $htmlId, $morecss, $htmlMoreParam, $valopt) . '<br>';
749
+					$htmlId = $htmlName.'_'.$keyopt;
750
+					$htmlMoreParam = $moreparam.($value == $keyopt ? ' checked' : '');
751
+					$out .= $this->inputType('radio', $htmlName, $keyopt, $htmlId, $morecss, $htmlMoreParam, $valopt).'<br>';
752 752
 				}
753 753
 				break;
754 754
 
755 755
 			case 'select' :
756
-				$out = '<select class="' . $morecss . '" name="' . $htmlName . '" id="' . $htmlId . '"' . ($moreparam ? ' ' . $moreparam : '') . ' >';
756
+				$out = '<select class="'.$morecss.'" name="'.$htmlName.'" id="'.$htmlId.'"'.($moreparam ? ' '.$moreparam : '').' >';
757 757
 				if ($default == '' || $notNull != 1) {
758 758
 					$out .= '<option value="0">&nbsp;</option>';
759 759
 				}
@@ -764,15 +764,15 @@  discard block
 block discarded – undo
764 764
 					if (strpos($valb, "|") !== false) {
765 765
 						list($valb, $parent) = explode('|', $valb);
766 766
 					}
767
-					$out .= '<option value="' . $keyb . '"';
767
+					$out .= '<option value="'.$keyb.'"';
768 768
 					$out .= (((string) $value == $keyb) ? ' selected' : '');
769
-					$out .= (!empty($parent) ? ' parent="' . $parent . '"' : '');
770
-					$out .= '>' . $valb . '</option>';
769
+					$out .= (!empty($parent) ? ' parent="'.$parent.'"' : '');
770
+					$out .= '>'.$valb.'</option>';
771 771
 				}
772 772
 				$out .= '</select>';
773 773
 				break;
774 774
 			case 'sellist' :
775
-				$out = '<select class="' . $morecss . '" name="' . $htmlName . '" id="' . $htmlId . '"' . ($moreparam ? ' ' . $moreparam : '') . '>';
775
+				$out = '<select class="'.$morecss.'" name="'.$htmlName.'" id="'.$htmlId.'"'.($moreparam ? ' '.$moreparam : '').'>';
776 776
 
777 777
 				$param_list = array_keys($param['options']);
778 778
 				$InfoFieldList = explode(":", $param_list[0]);
@@ -785,18 +785,18 @@  discard block
 block discarded – undo
785 785
 				// 4 : where clause filter on column or table extrafield, syntax field='value' or extra.field=value
786 786
 				// 5 : id category type
787 787
 				// 6 : ids categories list separated by comma for category root
788
-				$keyList = (empty($InfoFieldList[2]) ? 'rowid' : $InfoFieldList[2] . ' as rowid');
788
+				$keyList = (empty($InfoFieldList[2]) ? 'rowid' : $InfoFieldList[2].' as rowid');
789 789
 
790 790
 				if (count($InfoFieldList) > 4 && !empty($InfoFieldList[4])) {
791 791
 					if (strpos($InfoFieldList[4], 'extra.') !== false) {
792
-						$keyList = 'main.' . $InfoFieldList[2] . ' as rowid';
792
+						$keyList = 'main.'.$InfoFieldList[2].' as rowid';
793 793
 					} else {
794
-						$keyList = $InfoFieldList[2] . ' as rowid';
794
+						$keyList = $InfoFieldList[2].' as rowid';
795 795
 					}
796 796
 				}
797 797
 				if (count($InfoFieldList) > 3 && !empty($InfoFieldList[3])) {
798 798
 					list($parentName, $parentField) = explode('|', $InfoFieldList[3]);
799
-					$keyList .= ', ' . $parentField;
799
+					$keyList .= ', '.$parentField;
800 800
 				}
801 801
 
802 802
 				$filter_categorie = false;
@@ -814,8 +814,8 @@  discard block
 block discarded – undo
814 814
 					}
815 815
 
816 816
 					$sqlwhere = '';
817
-					$sql = "SELECT " . $keyList;
818
-					$sql .= " FROM " . $this->db->prefix() . $InfoFieldList[0];
817
+					$sql = "SELECT ".$keyList;
818
+					$sql .= " FROM ".$this->db->prefix().$InfoFieldList[0];
819 819
 					if (!empty($InfoFieldList[4])) {
820 820
 						// can use SELECT request
821 821
 						if (strpos($InfoFieldList[4], '$SEL$') !== false) {
@@ -827,24 +827,24 @@  discard block
 block discarded – undo
827 827
 
828 828
 						//We have to join on extrafield table
829 829
 						if (strpos($InfoFieldList[4], 'extra') !== false) {
830
-							$sql .= " as main, " . $this->db->prefix() . $InfoFieldList[0] . "_extrafields as extra";
831
-							$sqlwhere .= " WHERE extra.fk_object=main." . $InfoFieldList[2] . " AND " . $InfoFieldList[4];
830
+							$sql .= " as main, ".$this->db->prefix().$InfoFieldList[0]."_extrafields as extra";
831
+							$sqlwhere .= " WHERE extra.fk_object=main.".$InfoFieldList[2]." AND ".$InfoFieldList[4];
832 832
 						} else {
833
-							$sqlwhere .= " WHERE " . $InfoFieldList[4];
833
+							$sqlwhere .= " WHERE ".$InfoFieldList[4];
834 834
 						}
835 835
 					} else {
836 836
 						$sqlwhere .= ' WHERE 1=1';
837 837
 					}
838 838
 					// Some tables may have field, some other not. For the moment we disable it.
839 839
 					if (in_array($InfoFieldList[0], array('tablewithentity'))) {
840
-						$sqlwhere .= " AND entity = " . ((int) $conf->entity);
840
+						$sqlwhere .= " AND entity = ".((int) $conf->entity);
841 841
 					}
842 842
 					$sql .= $sqlwhere;
843 843
 					//print $sql;
844 844
 
845
-					$sql .= ' ORDER BY ' . implode(', ', $fields_label);
845
+					$sql .= ' ORDER BY '.implode(', ', $fields_label);
846 846
 
847
-					dol_syslog(get_class($this) . '::showInputField type=sellist', LOG_DEBUG);
847
+					dol_syslog(get_class($this).'::showInputField type=sellist', LOG_DEBUG);
848 848
 					$resql = $this->db->query($sql);
849 849
 					if ($resql) {
850 850
 						$out .= '<option value="0">&nbsp;</option>';
@@ -860,7 +860,7 @@  discard block
 block discarded – undo
860 860
 							if (count($fields_label) > 1) {
861 861
 								$notrans = true;
862 862
 								foreach ($fields_label as $field_toshow) {
863
-									$labeltoshow .= $obj->$field_toshow . ' ';
863
+									$labeltoshow .= $obj->$field_toshow.' ';
864 864
 								}
865 865
 							} else {
866 866
 								$labeltoshow = $obj->{$InfoFieldList[1]};
@@ -871,12 +871,12 @@  discard block
 block discarded – undo
871 871
 								foreach ($fields_label as $field_toshow) {
872 872
 									$translabel = $langs->trans($obj->$field_toshow);
873 873
 									if ($translabel != $obj->$field_toshow) {
874
-										$labeltoshow = dol_trunc($translabel) . ' ';
874
+										$labeltoshow = dol_trunc($translabel).' ';
875 875
 									} else {
876
-										$labeltoshow = dol_trunc($obj->$field_toshow) . ' ';
876
+										$labeltoshow = dol_trunc($obj->$field_toshow).' ';
877 877
 									}
878 878
 								}
879
-								$out .= '<option value="' . $obj->rowid . '" selected>' . $labeltoshow . '</option>';
879
+								$out .= '<option value="'.$obj->rowid.'" selected>'.$labeltoshow.'</option>';
880 880
 							} else {
881 881
 								if (!$notrans) {
882 882
 									$translabel = $langs->trans($obj->{$InfoFieldList[1]});
@@ -890,34 +890,34 @@  discard block
 block discarded – undo
890 890
 									$labeltoshow = '(not defined)';
891 891
 								}
892 892
 								if ($value == $obj->rowid) {
893
-									$out .= '<option value="' . $obj->rowid . '" selected>' . $labeltoshow . '</option>';
893
+									$out .= '<option value="'.$obj->rowid.'" selected>'.$labeltoshow.'</option>';
894 894
 								}
895 895
 
896 896
 								if (!empty($InfoFieldList[3]) && $parentField) {
897
-									$parent = $parentName . ':' . $obj->{$parentField};
897
+									$parent = $parentName.':'.$obj->{$parentField};
898 898
 									$isDependList = 1;
899 899
 								}
900 900
 
901
-								$out .= '<option value="' . $obj->rowid . '"';
901
+								$out .= '<option value="'.$obj->rowid.'"';
902 902
 								$out .= ($value == $obj->rowid ? ' selected' : '');
903
-								$out .= (!empty($parent) ? ' parent="' . $parent . '"' : '');
904
-								$out .= '>' . $labeltoshow . '</option>';
903
+								$out .= (!empty($parent) ? ' parent="'.$parent.'"' : '');
904
+								$out .= '>'.$labeltoshow.'</option>';
905 905
 							}
906 906
 
907 907
 							$i++;
908 908
 						}
909 909
 						$this->db->free($resql);
910 910
 					} else {
911
-						$out .= 'Error in request ' . $sql . ' ' . $this->db->lasterror() . '. Check setup of extra parameters.<br>';
911
+						$out .= 'Error in request '.$sql.' '.$this->db->lasterror().'. Check setup of extra parameters.<br>';
912 912
 					}
913 913
 				} else {
914
-					require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php';
914
+					require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
915 915
 					$data = $this->select_all_categories(Categorie::$MAP_ID_TO_CODE[$InfoFieldList[5]], '', 'parent', 64, $InfoFieldList[6], 1, 1);
916 916
 					$out .= '<option value="0">&nbsp;</option>';
917 917
 					foreach ($data as $data_key => $data_value) {
918
-						$out .= '<option value="' . $data_key . '"';
918
+						$out .= '<option value="'.$data_key.'"';
919 919
 						$out .= ($value == $data_key ? ' selected' : '');
920
-						$out .= '>' . $data_value . '</option>';
920
+						$out .= '>'.$data_value.'</option>';
921 921
 					}
922 922
 				}
923 923
 				$out .= '</select>';
@@ -989,19 +989,19 @@  discard block
 block discarded – undo
989 989
 		}
990 990
 		if (preg_match('/^integer:(.*):(.*)/i', $val['type'], $reg)) {
991 991
 			$type = 'link';
992
-			$stringforoptions = $reg[1] . ':' . $reg[2];
992
+			$stringforoptions = $reg[1].':'.$reg[2];
993 993
 			if ($reg[1] == 'User') {
994 994
 				$stringforoptions .= ':-1';
995 995
 			}
996 996
 			$param['options'] = array($stringforoptions => $stringforoptions);
997 997
 		} elseif (preg_match('/^sellist:(.*):(.*):(.*):(.*)/i', $val['type'], $reg)) {
998
-			$param['options'] = array($reg[1] . ':' . $reg[2] . ':' . $reg[3] . ':' . $reg[4] => 'N');
998
+			$param['options'] = array($reg[1].':'.$reg[2].':'.$reg[3].':'.$reg[4] => 'N');
999 999
 			$type = 'sellist';
1000 1000
 		} elseif (preg_match('/^sellist:(.*):(.*):(.*)/i', $val['type'], $reg)) {
1001
-			$param['options'] = array($reg[1] . ':' . $reg[2] . ':' . $reg[3] => 'N');
1001
+			$param['options'] = array($reg[1].':'.$reg[2].':'.$reg[3] => 'N');
1002 1002
 			$type = 'sellist';
1003 1003
 		} elseif (preg_match('/^sellist:(.*):(.*)/i', $val['type'], $reg)) {
1004
-			$param['options'] = array($reg[1] . ':' . $reg[2] => 'N');
1004
+			$param['options'] = array($reg[1].':'.$reg[2] => 'N');
1005 1005
 			$type = 'sellist';
1006 1006
 		} elseif (preg_match('/^chkbxlst:(.*)/i', $val['type'], $reg)) {
1007 1007
 			$param['options'] = array($reg[1] => 'N');
@@ -1037,7 +1037,7 @@  discard block
 block discarded – undo
1037 1037
 			$value = $object->getLibStatut(3);
1038 1038
 		} elseif ($type == 'date') {
1039 1039
 			if (!empty($value)) {
1040
-				$value = dol_print_date($value, 'day');    // We suppose dates without time are always gmt (storage of course + output)
1040
+				$value = dol_print_date($value, 'day'); // We suppose dates without time are always gmt (storage of course + output)
1041 1041
 			} else {
1042 1042
 				$value = '';
1043 1043
 			}
@@ -1048,7 +1048,7 @@  discard block
 block discarded – undo
1048 1048
 				$value = '';
1049 1049
 			}
1050 1050
 		} elseif ($type == 'duration') {
1051
-			include_once DOL_DOCUMENT_ROOT . '/core/lib/date.lib.php';
1051
+			include_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
1052 1052
 			if (!is_null($value) && $value !== '') {
1053 1053
 				$value = convertSecondToTime($value, 'allhourmin');
1054 1054
 			}
@@ -1061,7 +1061,7 @@  discard block
 block discarded – undo
1061 1061
 			if (!empty($value)) {
1062 1062
 				$checked = ' checked ';
1063 1063
 			}
1064
-			$value = '<input type="checkbox" ' . $checked . ' ' . ($moreparam ? $moreparam : '') . ' readonly disabled>';
1064
+			$value = '<input type="checkbox" '.$checked.' '.($moreparam ? $moreparam : '').' readonly disabled>';
1065 1065
 		} elseif ($type == 'mail' || $type == 'email') {
1066 1066
 			$value = dol_print_email($value, 0, 0, 0, 64, 1, 1);
1067 1067
 		} elseif ($type == 'url') {
@@ -1085,7 +1085,7 @@  discard block
 block discarded – undo
1085 1085
 
1086 1086
 			if (count($InfoFieldList) > 4 && !empty($InfoFieldList[4])) {
1087 1087
 				$selectkey = $InfoFieldList[2];
1088
-				$keyList = $InfoFieldList[2] . ' as rowid';
1088
+				$keyList = $InfoFieldList[2].' as rowid';
1089 1089
 			}
1090 1090
 
1091 1091
 			$fields_label = explode('|', $InfoFieldList[1]);
@@ -1101,20 +1101,20 @@  discard block
 block discarded – undo
1101 1101
 				}
1102 1102
 			}
1103 1103
 
1104
-			$sql = "SELECT " . $keyList;
1105
-			$sql .= ' FROM ' . $this->db->prefix() . $InfoFieldList[0];
1104
+			$sql = "SELECT ".$keyList;
1105
+			$sql .= ' FROM '.$this->db->prefix().$InfoFieldList[0];
1106 1106
 			if (strpos($InfoFieldList[4], 'extra') !== false) {
1107 1107
 				$sql .= ' as main';
1108 1108
 			}
1109 1109
 			if ($selectkey == 'rowid' && empty($value)) {
1110
-				$sql .= " WHERE " . $selectkey . " = 0";
1110
+				$sql .= " WHERE ".$selectkey." = 0";
1111 1111
 			} elseif ($selectkey == 'rowid') {
1112
-				$sql .= " WHERE " . $selectkey . " = " . ((int) $value);
1112
+				$sql .= " WHERE ".$selectkey." = ".((int) $value);
1113 1113
 			} else {
1114
-				$sql .= " WHERE " . $selectkey . " = '" . $this->db->escape($value) . "'";
1114
+				$sql .= " WHERE ".$selectkey." = '".$this->db->escape($value)."'";
1115 1115
 			}
1116 1116
 
1117
-			dol_syslog(__METHOD__ . ' type=sellist', LOG_DEBUG);
1117
+			dol_syslog(__METHOD__.' type=sellist', LOG_DEBUG);
1118 1118
 			$resql = $this->db->query($sql);
1119 1119
 			if ($resql) {
1120 1120
 				if ($filter_categorie === false) {
@@ -1133,9 +1133,9 @@  discard block
 block discarded – undo
1133 1133
 									$translabel = $langs->trans($obj->$field_toshow);
1134 1134
 								}
1135 1135
 								if ($translabel != $field_toshow) {
1136
-									$value .= dol_trunc($translabel, 18) . ' ';
1136
+									$value .= dol_trunc($translabel, 18).' ';
1137 1137
 								} else {
1138
-									$value .= $obj->$field_toshow . ' ';
1138
+									$value .= $obj->$field_toshow.' ';
1139 1139
 								}
1140 1140
 							}
1141 1141
 						} else {
@@ -1151,7 +1151,7 @@  discard block
 block discarded – undo
1151 1151
 						}
1152 1152
 					}
1153 1153
 				} else {
1154
-					require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php';
1154
+					require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
1155 1155
 
1156 1156
 					$toprint = array();
1157 1157
 					$obj = $this->db->fetch_object($resql);
@@ -1159,12 +1159,12 @@  discard block
 block discarded – undo
1159 1159
 					$c->fetch($obj->rowid);
1160 1160
 					$ways = $c->print_all_ways(); // $ways[0] = "ccc2 >> ccc2a >> ccc2a1" with html formatted text
1161 1161
 					foreach ($ways as $way) {
1162
-						$toprint[] = '<li>' . img_object('', 'category') . ' ' . $way . '</li>';
1162
+						$toprint[] = '<li>'.img_object('', 'category').' '.$way.'</li>';
1163 1163
 					}
1164
-					$value = '<div><ul>' . implode(' ', $toprint) . '</ul></div>';
1164
+					$value = '<div><ul>'.implode(' ', $toprint).'</ul></div>';
1165 1165
 				}
1166 1166
 			} else {
1167
-				dol_syslog(__METHOD__ . ' error ' . $this->db->lasterror(), LOG_WARNING);
1167
+				dol_syslog(__METHOD__.' error '.$this->db->lasterror(), LOG_WARNING);
1168 1168
 			}
1169 1169
 		} elseif ($type == 'radio') {
1170 1170
 			$value = $param['options'][$value];
@@ -1175,11 +1175,11 @@  discard block
 block discarded – undo
1175 1175
 				$toprint = array();
1176 1176
 				foreach ($value_arr as $valueval) {
1177 1177
 					if (!empty($valueval)) {
1178
-						$toprint[] = '<li>' . $param['options'][$valueval] . '</li>';
1178
+						$toprint[] = '<li>'.$param['options'][$valueval].'</li>';
1179 1179
 					}
1180 1180
 				}
1181 1181
 				if (!empty($toprint)) {
1182
-					$value = '<div><ul>' . implode(' ', $toprint) . '</ul></div>';
1182
+					$value = '<div><ul>'.implode(' ', $toprint).'</ul></div>';
1183 1183
 				}
1184 1184
 			}
1185 1185
 		} elseif ($type == 'chkbxlst') {
@@ -1193,7 +1193,7 @@  discard block
 block discarded – undo
1193 1193
 
1194 1194
 			if (count($InfoFieldList) >= 3) {
1195 1195
 				$selectkey = $InfoFieldList[2];
1196
-				$keyList = $InfoFieldList[2] . ' as rowid';
1196
+				$keyList = $InfoFieldList[2].' as rowid';
1197 1197
 			}
1198 1198
 
1199 1199
 			$fields_label = explode('|', $InfoFieldList[1]);
@@ -1209,15 +1209,15 @@  discard block
 block discarded – undo
1209 1209
 				}
1210 1210
 			}
1211 1211
 
1212
-			$sql = "SELECT " . $keyList;
1213
-			$sql .= ' FROM ' . $this->db->prefix() . $InfoFieldList[0];
1212
+			$sql = "SELECT ".$keyList;
1213
+			$sql .= ' FROM '.$this->db->prefix().$InfoFieldList[0];
1214 1214
 			if (strpos($InfoFieldList[4], 'extra') !== false) {
1215 1215
 				$sql .= ' as main';
1216 1216
 			}
1217 1217
 			// $sql.= " WHERE ".$selectkey."='".$this->db->escape($value)."'";
1218 1218
 			// $sql.= ' AND entity = '.$conf->entity;
1219 1219
 
1220
-			dol_syslog(__METHOD__ . ' type=chkbxlst', LOG_DEBUG);
1220
+			dol_syslog(__METHOD__.' type=chkbxlst', LOG_DEBUG);
1221 1221
 			$resql = $this->db->query($sql);
1222 1222
 			if ($resql) {
1223 1223
 				if ($filter_categorie === false) {
@@ -1234,9 +1234,9 @@  discard block
 block discarded – undo
1234 1234
 										$translabel = $langs->trans($obj->$field_toshow);
1235 1235
 									}
1236 1236
 									if ($translabel != $field_toshow) {
1237
-										$toprint[] = '<li>' . dol_trunc($translabel, 18) . '</li>';
1237
+										$toprint[] = '<li>'.dol_trunc($translabel, 18).'</li>';
1238 1238
 									} else {
1239
-										$toprint[] = '<li>' . $obj->$field_toshow . '</li>';
1239
+										$toprint[] = '<li>'.$obj->$field_toshow.'</li>';
1240 1240
 									}
1241 1241
 								}
1242 1242
 							} else {
@@ -1245,15 +1245,15 @@  discard block
 block discarded – undo
1245 1245
 									$translabel = $langs->trans($obj->{$InfoFieldList[1]});
1246 1246
 								}
1247 1247
 								if ($translabel != $obj->{$InfoFieldList[1]}) {
1248
-									$toprint[] = '<li>' . dol_trunc($translabel, 18) . '</li>';
1248
+									$toprint[] = '<li>'.dol_trunc($translabel, 18).'</li>';
1249 1249
 								} else {
1250
-									$toprint[] = '<li>' . $obj->{$InfoFieldList[1]} . '</li>';
1250
+									$toprint[] = '<li>'.$obj->{$InfoFieldList[1]}.'</li>';
1251 1251
 								}
1252 1252
 							}
1253 1253
 						}
1254 1254
 					}
1255 1255
 				} else {
1256
-					require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php';
1256
+					require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
1257 1257
 
1258 1258
 					$toprint = array();
1259 1259
 					while ($obj = $this->db->fetch_object($resql)) {
@@ -1262,14 +1262,14 @@  discard block
 block discarded – undo
1262 1262
 							$c->fetch($obj->rowid);
1263 1263
 							$ways = $c->print_all_ways(); // $ways[0] = "ccc2 >> ccc2a >> ccc2a1" with html formatted text
1264 1264
 							foreach ($ways as $way) {
1265
-								$toprint[] = '<li>' . img_object('', 'category') . ' ' . $way . '</li>';
1265
+								$toprint[] = '<li>'.img_object('', 'category').' '.$way.'</li>';
1266 1266
 							}
1267 1267
 						}
1268 1268
 					}
1269 1269
 				}
1270
-				$value = '<div><ul>' . implode(' ', $toprint) . '</ul></div>';
1270
+				$value = '<div><ul>'.implode(' ', $toprint).'</ul></div>';
1271 1271
 			} else {
1272
-				dol_syslog(__METHOD__ . ' error ' . $this->db->lasterror(), LOG_WARNING);
1272
+				dol_syslog(__METHOD__.' error '.$this->db->lasterror(), LOG_WARNING);
1273 1273
 			}
1274 1274
 		} elseif ($type == 'link') {
1275 1275
 			// only if something to display (perf)
@@ -1296,7 +1296,7 @@  discard block
 block discarded – undo
1296 1296
 						}
1297 1297
 					}
1298 1298
 				} else {
1299
-					dol_syslog(__METHOD__ . ' Error bad setup of field', LOG_WARNING);
1299
+					dol_syslog(__METHOD__.' Error bad setup of field', LOG_WARNING);
1300 1300
 					return 'Error bad setup of field';
1301 1301
 				}
1302 1302
 			} else {
Please login to merge, or discard this patch.
htdocs/webportal/class/webPortalTheme.class.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
  * \brief      File of class with theme definition for WebPortal
25 25
  */
26 26
 
27
-require_once DOL_DOCUMENT_ROOT . '/core/lib/functions2.lib.php'; // used for color functions
27
+require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; // used for color functions
28 28
 
29 29
 /**
30 30
  * Class WebPortalTheme
@@ -34,8 +34,8 @@  discard block
 block discarded – undo
34 34
 	public $primaryColorHex = '#263c5c';
35 35
 	public $primaryColorHsl = array(
36 36
 		'h' => 216, // Hue
37
-		'l' => 42,  // lightness
38
-		's' => 25,  // Saturation
37
+		'l' => 42, // lightness
38
+		's' => 25, // Saturation
39 39
 		'a' =>  1   // Alfa
40 40
 	);
41 41
 
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
 		if (getDolGlobalString('WEBPORTAL_PRIMARY_COLOR')) {
84 84
 			$outColor = getDolGlobalString('WEBPORTAL_PRIMARY_COLOR');
85 85
 		} elseif (getDolGlobalString('THEME_ELDY_TOPMENU_BACK1')) {
86
-			$outColor = '#' . colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_TOPMENU_BACK1));
86
+			$outColor = '#'.colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_TOPMENU_BACK1));
87 87
 		}
88 88
 
89 89
 		if (empty($outColor) || !colorValidateHex($outColor)) {
Please login to merge, or discard this patch.
htdocs/webportal/class/webportalmember.class.php 1 patch
Spacing   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
  */
24 24
 
25 25
 // Put here all includes required by your class file
26
-require_once DOL_DOCUMENT_ROOT . '/adherents/class/adherent.class.php';
26
+require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php';
27 27
 
28 28
 /**
29 29
  * Class for WebPortalMember
@@ -226,11 +226,11 @@  discard block
 block discarded – undo
226 226
 		if (getDolGlobalInt('MAIN_OPTIMIZEFORTEXTBROWSER')) {
227 227
 			return ['optimize' => $langs->trans("WebPortalMember")];
228 228
 		}
229
-		$datas['picto'] = img_picto('', $this->picto) . ' <u>' . $langs->trans("WebPortalMember") . '</u>';
229
+		$datas['picto'] = img_picto('', $this->picto).' <u>'.$langs->trans("WebPortalMember").'</u>';
230 230
 		if (isset($this->status)) {
231
-			$datas['picto'] .= ' ' . $this->getLibStatut(5);
231
+			$datas['picto'] .= ' '.$this->getLibStatut(5);
232 232
 		}
233
-		$datas['ref'] .= '<br><b>' . $langs->trans('Ref') . ':</b> ' . $this->ref;
233
+		$datas['ref'] .= '<br><b>'.$langs->trans('Ref').':</b> '.$this->ref;
234 234
 
235 235
 		return $datas;
236 236
 	}
@@ -271,7 +271,7 @@  discard block
 block discarded – undo
271 271
 		];
272 272
 		if (getDolGlobalInt('MAIN_ENABLE_AJAX_TOOLTIP')) {
273 273
 			$classfortooltip = 'classforajaxtooltip';
274
-			$dataparams = ' data-params="' . dol_escape_htmltag(json_encode($params)) . '"';
274
+			$dataparams = ' data-params="'.dol_escape_htmltag(json_encode($params)).'"';
275 275
 			$label = '';
276 276
 		} else {
277 277
 			$label = implode($this->getTooltipContentArray($params));
@@ -294,19 +294,19 @@  discard block
 block discarded – undo
294 294
 		//    }
295 295
 		//}
296 296
 
297
-		$linkstart .= '<a href="' . $url . '"';
297
+		$linkstart .= '<a href="'.$url.'"';
298 298
 		$linkclose = "";
299 299
 		if (empty($notooltip)) {
300 300
 			if (getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER')) {
301 301
 				$langs->load("users");
302 302
 				$label = $langs->trans("ShowUser");
303
-				$linkclose .= ' alt="' . dol_escape_htmltag($label, 1) . '"';
303
+				$linkclose .= ' alt="'.dol_escape_htmltag($label, 1).'"';
304 304
 			}
305
-			$linkclose .= ($label ? ' title="' . dol_escape_htmltag($label, 1) . '"' : ' title="tocomplete"');
306
-			$linkclose .= $dataparams . ' class="' . $classfortooltip . ($morecss ? ' ' . $morecss : '') . '"';
305
+			$linkclose .= ($label ? ' title="'.dol_escape_htmltag($label, 1).'"' : ' title="tocomplete"');
306
+			$linkclose .= $dataparams.' class="'.$classfortooltip.($morecss ? ' '.$morecss : '').'"';
307 307
 		}
308 308
 
309
-		$linkstart .= $linkclose . '>';
309
+		$linkstart .= $linkclose.'>';
310 310
 		$linkend = '</a>';
311 311
 
312 312
 		if ($option === 'nolink') {
@@ -325,19 +325,19 @@  discard block
 block discarded – undo
325 325
 			}
326 326
 			// Only picto
327 327
 			if ($withpictoimg > 0) {
328
-				$picto = '<span class="nopadding' . ($morecss ? ' userimg' . $morecss : '') . '">' . img_object('', 'user', $paddafterimage . ' ' . ($notooltip ? '' : $dataparams), 0, 0, $notooltip ? 0 : 1) . '</span>';
328
+				$picto = '<span class="nopadding'.($morecss ? ' userimg'.$morecss : '').'">'.img_object('', 'user', $paddafterimage.' '.($notooltip ? '' : $dataparams), 0, 0, $notooltip ? 0 : 1).'</span>';
329 329
 			} else {
330 330
 				// Picto must be a photo
331
-				$picto = '<span class="nopadding' . ($morecss ? ' userimg' . $morecss : '') . '"' . ($paddafterimage ? ' ' . $paddafterimage : '') . '>';
332
-				$picto .= Form::showphoto('memberphoto', $this, 0, 0, 0, 'userphoto' . (($withpictoimg == -3 || $withpictoimg == -4) ? 'small' : ''), 'mini', 0, 1);
331
+				$picto = '<span class="nopadding'.($morecss ? ' userimg'.$morecss : '').'"'.($paddafterimage ? ' '.$paddafterimage : '').'>';
332
+				$picto .= Form::showphoto('memberphoto', $this, 0, 0, 0, 'userphoto'.(($withpictoimg == -3 || $withpictoimg == -4) ? 'small' : ''), 'mini', 0, 1);
333 333
 				$picto .= '</span>';
334 334
 			}
335 335
 			$result .= $picto;
336 336
 		}
337 337
 		if (($withpictoimg > -2 && $withpictoimg != 2) || $withpictoimg == -4) {
338 338
 			if (!getDolGlobalString('MAIN_OPTIMIZEFORTEXTBROWSER')) {
339
-				$result .= '<span class="nopadding valignmiddle' . ((!isset($this->statut) || $this->statut) ? '' : ' strikefordisabled') .
340
-					($morecss ? ' usertext' . $morecss : '') . '">';
339
+				$result .= '<span class="nopadding valignmiddle'.((!isset($this->statut) || $this->statut) ? '' : ' strikefordisabled').
340
+					($morecss ? ' usertext'.$morecss : '').'">';
341 341
 			}
342 342
 			if ($mode == 'login') {
343 343
 				$result .= dol_trunc($this->login, $maxlen);
@@ -366,7 +366,7 @@  discard block
 block discarded – undo
366 366
 		//    }
367 367
 		//}
368 368
 		global $action;
369
-		$hookmanager->initHooks(array($this->element . 'dao'));
369
+		$hookmanager->initHooks(array($this->element.'dao'));
370 370
 		$parameters = array('id' => $this->id, 'getnomurl' => &$result);
371 371
 		$reshook = $hookmanager->executeHooks('getNomUrl', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
372 372
 		if ($reshook > 0) {
@@ -426,7 +426,7 @@  discard block
 block discarded – undo
426 426
 		$outdone = 0;
427 427
 		$coords = $this->getFullAddress(1, ', ', getDolGlobalInt('MAIN_SHOW_REGION_IN_STATE_SELECT'));
428 428
 		if ($coords) {
429
-			$address = dol_print_address($coords, 'address_' . $htmlkey . '_' . $this->id, $this->element, $this->id, 1, ', ');
429
+			$address = dol_print_address($coords, 'address_'.$htmlkey.'_'.$this->id, $this->element, $this->id, 1, ', ');
430 430
 			if ($address) {
431 431
 				$out .= $address;
432 432
 				$outdone++;
@@ -441,13 +441,13 @@  discard block
 block discarded – undo
441 441
 
442 442
 			if (is_array($arrayoflangcode) && count($arrayoflangcode)) {
443 443
 				if (!is_object($extralanguages)) {
444
-					include_once DOL_DOCUMENT_ROOT . '/core/class/extralanguages.class.php';
444
+					include_once DOL_DOCUMENT_ROOT.'/core/class/extralanguages.class.php';
445 445
 					$extralanguages = new ExtraLanguages($this->db);
446 446
 				}
447 447
 				$extralanguages->fetch_name_extralanguages($elementforaltlanguage);
448 448
 
449 449
 				if (!empty($extralanguages->attributes[$elementforaltlanguage]['address']) || !empty($extralanguages->attributes[$elementforaltlanguage]['town'])) {
450
-					$out .= "<!-- alternatelanguage for '" . $elementforaltlanguage . "' set to fields '" . join(',', $extralanguages->attributes[$elementforaltlanguage]) . "' -->\n";
450
+					$out .= "<!-- alternatelanguage for '".$elementforaltlanguage."' set to fields '".join(',', $extralanguages->attributes[$elementforaltlanguage])."' -->\n";
451 451
 					$this->fetchValuesForExtraLanguages();
452 452
 					if (!is_object($form)) {
453 453
 						$form = new Form($this->db);
@@ -458,7 +458,7 @@  discard block
 block discarded – undo
458 458
 						$s = picto_from_langcode($extralangcode, 'class="pictoforlang paddingright"');
459 459
 						// This also call dol_format_address()
460 460
 						$coords = $this->getFullAddress(1, ', ', $conf->global->MAIN_SHOW_REGION_IN_STATE_SELECT, $extralangcode);
461
-						$htmltext .= $s . dol_print_address($coords, 'address_' . $htmlkey . '_' . $this->id, $this->element, $this->id, 1, ', ');
461
+						$htmltext .= $s.dol_print_address($coords, 'address_'.$htmlkey.'_'.$this->id, $this->element, $this->id, 1, ', ');
462 462
 					}
463 463
 					$out .= $form->textwithpicto('', $htmltext, -1, 'language', 'opacitymedium paddingleft');
464 464
 				}
@@ -469,15 +469,15 @@  discard block
 block discarded – undo
469 469
 		if (!in_array($this->country_code, $countriesusingstate) && !getDolGlobalString('MAIN_FORCE_STATE_INTO_ADDRESS')
470 470
 			&& !getDolGlobalString('SOCIETE_DISABLE_STATE') && $this->state) {
471 471
 			if (getDolGlobalInt('MAIN_SHOW_REGION_IN_STATE_SELECT') == 1 && $this->region) {
472
-				$out .= ($outdone ? ' - ' : '') . $this->region . ' - ' . $this->state;
472
+				$out .= ($outdone ? ' - ' : '').$this->region.' - '.$this->state;
473 473
 			} else {
474
-				$out .= ($outdone ? ' - ' : '') . $this->state;
474
+				$out .= ($outdone ? ' - ' : '').$this->state;
475 475
 			}
476 476
 			$outdone++;
477 477
 		}
478 478
 
479 479
 		if ($outdone) {
480
-			$out = '<div class="address inline-block">' . $out . '</div>';
480
+			$out = '<div class="address inline-block">'.$out.'</div>';
481 481
 		}
482 482
 
483 483
 		if (!empty($this->phone) || !empty($this->phone_pro) || !empty($this->phone_mobile) || !empty($this->phone_perso) || !empty($this->fax) || !empty($this->office_phone) || !empty($this->user_mobile) || !empty($this->office_fax)) {
Please login to merge, or discard this patch.
htdocs/comm/mailing/card.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -293,15 +293,15 @@  discard block
 block discarded – undo
293 293
 								$substitutionarray['__SECUREKEYPAYMENT_INVOICE__'] = dol_hash(getDolGlobalString('PAYMENT_SECURITY_TOKEN'), 2);
294 294
 								$substitutionarray['__SECUREKEYPAYMENT_CONTRACTLINE__'] = dol_hash(getDolGlobalString('PAYMENT_SECURITY_TOKEN'), 2);
295 295
 							} else {
296
-								$substitutionarray['__SECUREKEYPAYMENT_MEMBER__'] = dol_hash(getDolGlobalString('PAYMENT_SECURITY_TOKEN') . 'member'.$obj->source_id, 2);
297
-								$substitutionarray['__SECUREKEYPAYMENT_DONATION__'] = dol_hash(getDolGlobalString('PAYMENT_SECURITY_TOKEN') . 'donation'.$obj->source_id, 2);
298
-								$substitutionarray['__SECUREKEYPAYMENT_ORDER__'] = dol_hash(getDolGlobalString('PAYMENT_SECURITY_TOKEN') . 'order'.$obj->source_id, 2);
299
-								$substitutionarray['__SECUREKEYPAYMENT_INVOICE__'] = dol_hash(getDolGlobalString('PAYMENT_SECURITY_TOKEN') . 'invoice'.$obj->source_id, 2);
300
-								$substitutionarray['__SECUREKEYPAYMENT_CONTRACTLINE__'] = dol_hash(getDolGlobalString('PAYMENT_SECURITY_TOKEN') . 'contractline'.$obj->source_id, 2);
296
+								$substitutionarray['__SECUREKEYPAYMENT_MEMBER__'] = dol_hash(getDolGlobalString('PAYMENT_SECURITY_TOKEN').'member'.$obj->source_id, 2);
297
+								$substitutionarray['__SECUREKEYPAYMENT_DONATION__'] = dol_hash(getDolGlobalString('PAYMENT_SECURITY_TOKEN').'donation'.$obj->source_id, 2);
298
+								$substitutionarray['__SECUREKEYPAYMENT_ORDER__'] = dol_hash(getDolGlobalString('PAYMENT_SECURITY_TOKEN').'order'.$obj->source_id, 2);
299
+								$substitutionarray['__SECUREKEYPAYMENT_INVOICE__'] = dol_hash(getDolGlobalString('PAYMENT_SECURITY_TOKEN').'invoice'.$obj->source_id, 2);
300
+								$substitutionarray['__SECUREKEYPAYMENT_CONTRACTLINE__'] = dol_hash(getDolGlobalString('PAYMENT_SECURITY_TOKEN').'contractline'.$obj->source_id, 2);
301 301
 							}
302 302
 						}
303 303
 						if (getDolGlobalString('MEMBER_ENABLE_PUBLIC')) {
304
-							$substitutionarray['__PUBLICLINK_NEWMEMBERFORM__'] = '<a target="_blank" rel="noopener noreferrer" href="'.DOL_MAIN_URL_ROOT.'/public/members/new.php'.((isModEnabled('multicompany')) ? '?entity='.$conf->entity : '').'">'.$langs->trans('BlankSubscriptionForm'). '</a>';
304
+							$substitutionarray['__PUBLICLINK_NEWMEMBERFORM__'] = '<a target="_blank" rel="noopener noreferrer" href="'.DOL_MAIN_URL_ROOT.'/public/members/new.php'.((isModEnabled('multicompany')) ? '?entity='.$conf->entity : '').'">'.$langs->trans('BlankSubscriptionForm').'</a>';
305 305
 						}
306 306
 						/* For backward compatibility, deprecated */
307 307
 						if (isModEnabled('paypal') && getDolGlobalString('PAYPAL_SECURITY_TOKEN')) {
@@ -310,25 +310,25 @@  discard block
 block discarded – undo
310 310
 							if (!getDolGlobalString('PAYPAL_SECURITY_TOKEN_UNIQUE')) {
311 311
 								$substitutionarray['__SECUREKEYPAYPAL_MEMBER__'] = dol_hash(getDolGlobalString('PAYPAL_SECURITY_TOKEN'), 2);
312 312
 							} else {
313
-								$substitutionarray['__SECUREKEYPAYPAL_MEMBER__'] = dol_hash(getDolGlobalString('PAYPAL_SECURITY_TOKEN') . 'membersubscription'.$obj->source_id, 2);
313
+								$substitutionarray['__SECUREKEYPAYPAL_MEMBER__'] = dol_hash(getDolGlobalString('PAYPAL_SECURITY_TOKEN').'membersubscription'.$obj->source_id, 2);
314 314
 							}
315 315
 
316 316
 							if (!getDolGlobalString('PAYPAL_SECURITY_TOKEN_UNIQUE')) {
317 317
 								$substitutionarray['__SECUREKEYPAYPAL_ORDER__'] = dol_hash(getDolGlobalString('PAYPAL_SECURITY_TOKEN'), 2);
318 318
 							} else {
319
-								$substitutionarray['__SECUREKEYPAYPAL_ORDER__'] = dol_hash(getDolGlobalString('PAYPAL_SECURITY_TOKEN') . 'order'.$obj->source_id, 2);
319
+								$substitutionarray['__SECUREKEYPAYPAL_ORDER__'] = dol_hash(getDolGlobalString('PAYPAL_SECURITY_TOKEN').'order'.$obj->source_id, 2);
320 320
 							}
321 321
 
322 322
 							if (!getDolGlobalString('PAYPAL_SECURITY_TOKEN_UNIQUE')) {
323 323
 								$substitutionarray['__SECUREKEYPAYPAL_INVOICE__'] = dol_hash(getDolGlobalString('PAYPAL_SECURITY_TOKEN'), 2);
324 324
 							} else {
325
-								$substitutionarray['__SECUREKEYPAYPAL_INVOICE__'] = dol_hash(getDolGlobalString('PAYPAL_SECURITY_TOKEN') . 'invoice'.$obj->source_id, 2);
325
+								$substitutionarray['__SECUREKEYPAYPAL_INVOICE__'] = dol_hash(getDolGlobalString('PAYPAL_SECURITY_TOKEN').'invoice'.$obj->source_id, 2);
326 326
 							}
327 327
 
328 328
 							if (!getDolGlobalString('PAYPAL_SECURITY_TOKEN_UNIQUE')) {
329 329
 								$substitutionarray['__SECUREKEYPAYPAL_CONTRACTLINE__'] = dol_hash(getDolGlobalString('PAYPAL_SECURITY_TOKEN'), 2);
330 330
 							} else {
331
-								$substitutionarray['__SECUREKEYPAYPAL_CONTRACTLINE__'] = dol_hash(getDolGlobalString('PAYPAL_SECURITY_TOKEN') . 'contractline'.$obj->source_id, 2);
331
+								$substitutionarray['__SECUREKEYPAYPAL_CONTRACTLINE__'] = dol_hash(getDolGlobalString('PAYPAL_SECURITY_TOKEN').'contractline'.$obj->source_id, 2);
332 332
 							}
333 333
 						}
334 334
 						//$substitutionisok=true;
@@ -469,7 +469,7 @@  discard block
 block discarded – undo
469 469
 	}
470 470
 
471 471
 	// Action send test emailing
472
-	if ($action == 'send' && ! $cancel) {
472
+	if ($action == 'send' && !$cancel) {
473 473
 		$error = 0;
474 474
 
475 475
 		$upload_dir = $conf->mailing->dir_output."/".get_exdir($object->id, 2, 0, 1, $object, 'mailing');
@@ -879,7 +879,7 @@  discard block
 block discarded – undo
879 879
 			print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id.(!empty($urlfrom) ? '&urlfrom='.urlencode($urlfrom) : ''), $langs->trans("DeleteAMailing"), $langs->trans("ConfirmDeleteMailing"), "confirm_delete", '', '', 1);
880 880
 		}
881 881
 
882
-		if ($action != 'edit' && $action != 'edittxt' &&$action != 'edithtml') {
882
+		if ($action != 'edit' && $action != 'edittxt' && $action != 'edithtml') {
883 883
 			print dol_get_fiche_head($head, 'card', $langs->trans("Mailing"), -1, 'email');
884 884
 
885 885
 			/*
@@ -1452,7 +1452,7 @@  discard block
 block discarded – undo
1452 1452
 				$maxfilesizearray = getMaxFileSizeArray();
1453 1453
 				$maxmin = $maxfilesizearray['maxmin'];
1454 1454
 				if ($maxmin > 0) {
1455
-					$out .= '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">';	// MAX_FILE_SIZE must precede the field type=file
1455
+					$out .= '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file
1456 1456
 				}
1457 1457
 				$out .= '<input type="file" class="flat" id="addedfile" name="addedfile" value="'.$langs->trans("Upload").'" />';
1458 1458
 				$out .= ' ';
Please login to merge, or discard this patch.
htdocs/comm/mailing/cibles.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -356,7 +356,7 @@  discard block
 block discarded – undo
356 356
 			}
357 357
 		}
358 358
 		if (empty($nbemail)) {
359
-			$nbemail .= ' '.img_warning($langs->trans('ToAddRecipientsChooseHere'));//.' <span class="warning">'.$langs->trans("NoTargetYet").'</span>';
359
+			$nbemail .= ' '.img_warning($langs->trans('ToAddRecipientsChooseHere')); //.' <span class="warning">'.$langs->trans("NoTargetYet").'</span>';
360 360
 		}
361 361
 		if ($text) {
362 362
 			print $form->textwithpicto($nbemail, $text, 1, 'warning');
@@ -427,7 +427,7 @@  discard block
 block discarded – undo
427 427
 		}
428 428
 		print '</div>';
429 429
 		print '<div class="tagtd">&nbsp;</div>';
430
-		print '</div>';	// End tr
430
+		print '</div>'; // End tr
431 431
 
432 432
 		clearstatcache();
433 433
 
@@ -498,12 +498,12 @@  discard block
 block discarded – undo
498 498
 					}
499 499
 					print img_object($langs->trans("EmailingTargetSelector").': '.get_class($obj), $obj->picto, 'class="valignmiddle width25 size15x"');
500 500
 					print '</div>';
501
-					print '<div class="tagtd valignmiddle">';	//  style="height: 4em"
501
+					print '<div class="tagtd valignmiddle">'; //  style="height: 4em"
502 502
 					print $obj->getDesc();
503 503
 					print '</div>';
504 504
 
505 505
 					try {
506
-						$obj->evenunsubscribe = $object->evenunsubscribe;	// Set flag to include/exclude email that has opt-out.
506
+						$obj->evenunsubscribe = $object->evenunsubscribe; // Set flag to include/exclude email that has opt-out.
507 507
 
508 508
 						$nbofrecipient = $obj->getNbOfRecipients('');
509 509
 					} catch (Exception $e) {
@@ -556,7 +556,7 @@  discard block
 block discarded – undo
556 556
 		$reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
557 557
 		print $hookmanager->resPrint;
558 558
 
559
-		print '</div>';	// End table
559
+		print '</div>'; // End table
560 560
 		print '</div>';
561 561
 
562 562
 		print '<br>';
Please login to merge, or discard this patch.
htdocs/comm/mailing/class/mailing.class.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -268,7 +268,7 @@  discard block
 block discarded – undo
268 268
 				return $this->id;
269 269
 			} else {
270 270
 				$this->db->rollback();
271
-				dol_syslog(__METHOD__ . ' ' . $this->error, LOG_ERR);
271
+				dol_syslog(__METHOD__.' '.$this->error, LOG_ERR);
272 272
 				return -2;
273 273
 			}
274 274
 		} else {
@@ -322,12 +322,12 @@  discard block
 block discarded – undo
322 322
 			}
323 323
 
324 324
 			if (!$error) {
325
-				dol_syslog(__METHOD__ . ' success');
325
+				dol_syslog(__METHOD__.' success');
326 326
 				$this->db->commit();
327 327
 				return 1;
328 328
 			} else {
329 329
 				$this->db->rollback();
330
-				dol_syslog(__METHOD__ . ' ' . $this->error, LOG_ERR);
330
+				dol_syslog(__METHOD__.' '.$this->error, LOG_ERR);
331 331
 				return -2;
332 332
 			}
333 333
 		} else {
@@ -373,7 +373,7 @@  discard block
 block discarded – undo
373 373
 				$this->title = $obj->title;
374 374
 				$this->messtype = $obj->messtype;
375 375
 
376
-				$this->statut = $obj->status;	// deprecated
376
+				$this->statut = $obj->status; // deprecated
377 377
 				$this->status = $obj->status;
378 378
 
379 379
 				$this->nbemail = $obj->nbemail;
@@ -579,8 +579,8 @@  discard block
 block discarded – undo
579 579
 		}
580 580
 
581 581
 		if (!$error) {
582
-			$sql = "DELETE FROM " . MAIN_DB_PREFIX . "mailing";
583
-			$sql .= " WHERE rowid = " . ((int) $this->id);
582
+			$sql = "DELETE FROM ".MAIN_DB_PREFIX."mailing";
583
+			$sql .= " WHERE rowid = ".((int) $this->id);
584 584
 
585 585
 			dol_syslog(__METHOD__, LOG_DEBUG);
586 586
 			$resql = $this->db->query($sql);
@@ -591,12 +591,12 @@  discard block
 block discarded – undo
591 591
 				}
592 592
 
593 593
 				if (!$error) {
594
-					dol_syslog(__METHOD__ . ' success');
594
+					dol_syslog(__METHOD__.' success');
595 595
 					$this->db->commit();
596 596
 					return 1;
597 597
 				} else {
598 598
 					$this->db->rollback();
599
-					dol_syslog(__METHOD__ . ' ' . $this->error, LOG_ERR);
599
+					dol_syslog(__METHOD__.' '.$this->error, LOG_ERR);
600 600
 					return -2;
601 601
 				}
602 602
 			} else {
@@ -716,7 +716,7 @@  discard block
 block discarded – undo
716 716
 				$sql .= ' WHERE rowid = '.((int) $this->id);
717 717
 
718 718
 				$resqlupdate = $this->db->query($sql);
719
-				if (! $resqlupdate) {
719
+				if (!$resqlupdate) {
720 720
 					$this->error = $this->db->lasterror();
721 721
 					return -1;
722 722
 				} else {
Please login to merge, or discard this patch.
htdocs/eventorganization/conferenceorbooth_contact.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
 	accessforbidden();
75 75
 }
76 76
 
77
-$isdraft = (($object->status== $object::STATUS_DRAFT) ? 1 : 0);
77
+$isdraft = (($object->status == $object::STATUS_DRAFT) ? 1 : 0);
78 78
 $result = restrictedArea($user, 'eventorganization', $object->id, '', '', 'fk_soc', 'rowid', $isdraft);
79 79
 
80 80
 $permissiontoread = $user->hasRight('eventorganization', 'read');
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
 if ($user->socid > 0) {
89 89
 	accessforbidden();
90 90
 }
91
-$isdraft = (($object->status== $object::STATUS_DRAFT) ? 1 : 0);
91
+$isdraft = (($object->status == $object::STATUS_DRAFT) ? 1 : 0);
92 92
 $result = restrictedArea($user, 'eventorganization', $object->id, '', '', 'fk_soc', 'rowid', $isdraft);
93 93
 
94 94
 if (!$permissiontoread) {
@@ -166,7 +166,7 @@  discard block
 block discarded – undo
166 166
 if (!empty($projectstatic->socid)) {
167 167
 	$projectstatic->fetch_thirdparty();
168 168
 }
169
-$withProjectUrl='';
169
+$withProjectUrl = '';
170 170
 $object->project = clone $projectstatic;
171 171
 
172 172
 if (!empty($withproject)) {
Please login to merge, or discard this patch.
htdocs/ticket/document.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -91,7 +91,7 @@
 block discarded – undo
91 91
 	accessforbidden();
92 92
 }
93 93
 
94
-$permissiontoadd = $user->hasRight('ticket', 'write');	// Used by the include of actions_addupdatedelete.inc.php and actions_linkedfiles
94
+$permissiontoadd = $user->hasRight('ticket', 'write'); // Used by the include of actions_addupdatedelete.inc.php and actions_linkedfiles
95 95
 
96 96
 
97 97
 /*
Please login to merge, or discard this patch.