Completed
Branch develop (ab5575)
by
unknown
18:12
created
htdocs/eventorganization/conferenceorboothattendee_card.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@
 block discarded – undo
47 47
 $contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'conferenceorboothattendeecard'; // To manage different context of search
48 48
 $backtopage = GETPOST('backtopage', 'alpha');
49 49
 $backtopageforcancel = GETPOST('backtopageforcancel', 'alpha');
50
-$lineid   = GETPOSTINT('lineid');
50
+$lineid = GETPOSTINT('lineid');
51 51
 $mode = GETPOST('mode', 'alpha');
52 52
 
53 53
 $conf_or_booth_id = GETPOSTINT('conforboothid');
Please login to merge, or discard this patch.
htdocs/eventorganization/conferenceorbooth_card.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -648,7 +648,7 @@
 block discarded – undo
648 648
 				if (empty($fac->paye)) {
649 649
 					$key = 'paymentlink_'.$fac->id;
650 650
 
651
-					print img_picto('', 'globe').' <span class="opacitymedium">'.$langs->trans("ToOfferALinkForOnlinePayment", $langs->transnoentitiesnoconv('Online')) . ' '. $fac->ref.'</span><br>';
651
+					print img_picto('', 'globe').' <span class="opacitymedium">'.$langs->trans("ToOfferALinkForOnlinePayment", $langs->transnoentitiesnoconv('Online')).' '.$fac->ref.'</span><br>';
652 652
 
653 653
 					$sourcetouse = 'boothlocation';
654 654
 					$reftouse = $fac->id;
Please login to merge, or discard this patch.
htdocs/ticket/class/ticket.class.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -261,14 +261,14 @@  discard block
 block discarded – undo
261 261
 	/**
262 262
 	 * Status
263 263
 	 */
264
-	const STATUS_NOT_READ = 0;			// Draft. Not take into account yet.
265
-	const STATUS_READ = 1;				// Ticket was read.
266
-	const STATUS_ASSIGNED = 2;			// Ticket was just assigned to someone. Not in progress yet.
267
-	const STATUS_IN_PROGRESS = 3;		// In progress
268
-	const STATUS_NEED_MORE_INFO = 5;	// Waiting requester feedback
269
-	const STATUS_WAITING = 7;			// On hold
270
-	const STATUS_CLOSED = 8;			// Closed - Solved
271
-	const STATUS_CANCELED = 9;			// Closed - Not solved
264
+	const STATUS_NOT_READ = 0; // Draft. Not take into account yet.
265
+	const STATUS_READ = 1; // Ticket was read.
266
+	const STATUS_ASSIGNED = 2; // Ticket was just assigned to someone. Not in progress yet.
267
+	const STATUS_IN_PROGRESS = 3; // In progress
268
+	const STATUS_NEED_MORE_INFO = 5; // Waiting requester feedback
269
+	const STATUS_WAITING = 7; // On hold
270
+	const STATUS_CLOSED = 8; // Closed - Solved
271
+	const STATUS_CANCELED = 9; // Closed - Not solved
272 272
 
273 273
 
274 274
 	/**
@@ -1597,9 +1597,9 @@  discard block
 block discarded – undo
1597 1597
 		}
1598 1598
 		// show categories for this record only in ajax to not overload lists
1599 1599
 		if (isModEnabled('category') && !$nofetch) {
1600
-			require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php';
1600
+			require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
1601 1601
 			$form = new Form($this->db);
1602
-			$datas['categories'] = '<br>' . $form->showCategories($this->id, Categorie::TYPE_TICKET, 1);
1602
+			$datas['categories'] = '<br>'.$form->showCategories($this->id, Categorie::TYPE_TICKET, 1);
1603 1603
 		}
1604 1604
 
1605 1605
 		return $datas;
@@ -1838,7 +1838,7 @@  discard block
 block discarded – undo
1838 1838
 		// Insert entry into agenda with code 'TICKET_MSG'
1839 1839
 		include_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php';
1840 1840
 		$actioncomm = new ActionComm($this->db);
1841
-		$actioncomm->type_code = 'AC_OTH_AUTO';	// This is not an entry that must appears into manual calendar but only into CRM calendar
1841
+		$actioncomm->type_code = 'AC_OTH_AUTO'; // This is not an entry that must appears into manual calendar but only into CRM calendar
1842 1842
 		$actioncomm->code = 'TICKET_MSG';
1843 1843
 		if ($this->private) {
1844 1844
 			$actioncomm->code = 'TICKET_MSG_PRIVATE';
@@ -1852,7 +1852,7 @@  discard block
 block discarded – undo
1852 1852
 		$actioncomm->socid = $this->socid;
1853 1853
 		$actioncomm->label = $this->subject;
1854 1854
 		$actioncomm->note_private = $this->message;
1855
-		$actioncomm->userassigned = array($user->id => array('id' => $user->id,'transparency' => 0));
1855
+		$actioncomm->userassigned = array($user->id => array('id' => $user->id, 'transparency' => 0));
1856 1856
 		$actioncomm->userownerid = $user->id;
1857 1857
 		$actioncomm->datep = $now;
1858 1858
 		$actioncomm->percentage = -1; // percentage is not relevant for punctual events
@@ -2427,7 +2427,7 @@  discard block
 block discarded – undo
2427 2427
 						'email' => $obj->email,
2428 2428
 						'rowid' => $obj->rowid,
2429 2429
 						'code' => $obj->code,
2430
-						'libelle' => $labelType,		// deprecated, replaced with labeltype
2430
+						'libelle' => $labelType, // deprecated, replaced with labeltype
2431 2431
 						'labeltype' => $labelType,
2432 2432
 						'status' => $obj->statuslink,
2433 2433
 						'statuscontact' => $obj->statuscontact,
@@ -2512,7 +2512,7 @@  discard block
 block discarded – undo
2512 2512
 			if (is_resource($handle)) {
2513 2513
 				while (($file = readdir($handle)) !== false) {
2514 2514
 					if (!utf8_check($file)) {
2515
-						$file = mb_convert_encoding($file, 'UTF-8', 'ISO-8859-1');	// To be sure data is stored in UTF8 in memory
2515
+						$file = mb_convert_encoding($file, 'UTF-8', 'ISO-8859-1'); // To be sure data is stored in UTF8 in memory
2516 2516
 					}
2517 2517
 					if (dol_is_file($dir.$file)) {
2518 2518
 						return true;
@@ -2550,7 +2550,7 @@  discard block
 block discarded – undo
2550 2550
 		$formmail->trackid = (is_null($forcetrackid) ? 'tic'.$this->id : '');
2551 2551
 		$attachedfiles = $formmail->get_attached_files();
2552 2552
 
2553
-		$filepath = $attachedfiles['paths'];	// path is for example user->dir_temp.'/'.$user->id.'/'...
2553
+		$filepath = $attachedfiles['paths']; // path is for example user->dir_temp.'/'.$user->id.'/'...
2554 2554
 		$filename = $attachedfiles['names'];
2555 2555
 		$mimetype = $attachedfiles['mimes'];
2556 2556
 
@@ -2940,7 +2940,7 @@  discard block
 block discarded – undo
2940 2940
 
2941 2941
 								// If public interface is not enable, use link to internal page into mail
2942 2942
 								$url_public_ticket = (getDolGlobalInt('TICKET_ENABLE_PUBLIC_INTERFACE') ?
2943
-										(getDolGlobalString('TICKET_URL_PUBLIC_INTERFACE') !== '' ? getDolGlobalString('TICKET_URL_PUBLIC_INTERFACE') . '/view.php' : dol_buildpath('/public/ticket/view.php', 2)) : dol_buildpath('/ticket/card.php', 2)).'?track_id='.urlencode($object->track_id);
2943
+										(getDolGlobalString('TICKET_URL_PUBLIC_INTERFACE') !== '' ? getDolGlobalString('TICKET_URL_PUBLIC_INTERFACE').'/view.php' : dol_buildpath('/public/ticket/view.php', 2)) : dol_buildpath('/ticket/card.php', 2)).'?track_id='.urlencode($object->track_id);
2944 2944
 
2945 2945
 								$message .= '<br>'.$langs->trans('TicketNewEmailBodyInfosTrackUrlCustomer').' : <a href="'.$url_public_ticket.'">'.$object->track_id.'</a><br>';
2946 2946
 
@@ -2977,7 +2977,7 @@  discard block
 block discarded – undo
2977 2977
 									if ($result) {
2978 2978
 										// update last_msg_sent date (for last message sent to external users)
2979 2979
 										$this->date_last_msg_sent = dol_now();
2980
-										$this->update($user, 1);	// disable trigger when updating date_last_msg_sent. sendTicketMessageByEmail already create an event in actioncomm table.
2980
+										$this->update($user, 1); // disable trigger when updating date_last_msg_sent. sendTicketMessageByEmail already create an event in actioncomm table.
2981 2981
 									}
2982 2982
 								}
2983 2983
 							}
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
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
  * \brief      File of class with all html predefined components for WebPortal
27 27
  */
28 28
 
29
-require_once DOL_DOCUMENT_ROOT . '/core/class/html.form.class.php';
29
+require_once DOL_DOCUMENT_ROOT.'/core/class/html.form.class.php';
30 30
 
31 31
 /**
32 32
  * Class to manage generation of HTML components
@@ -72,19 +72,19 @@  discard block
 block discarded – undo
72 72
 	{
73 73
 		$out = '';
74 74
 		if ($label != '') {
75
-			$out .= '<label for="' . $id . '">';
75
+			$out .= '<label for="'.$id.'">';
76 76
 		}
77
-		$out .= '<input type="' . $type . '"';
78
-		$out .= ($morecss ? ' class="' . $morecss . '"' : '');
77
+		$out .= '<input type="'.$type.'"';
78
+		$out .= ($morecss ? ' class="'.$morecss.'"' : '');
79 79
 		if ($id != '') {
80
-			$out .= ' id="' . $id . '"';
80
+			$out .= ' id="'.$id.'"';
81 81
 		}
82
-		$out .= ' name="' . $name . '"';
83
-		$out .= ' value="' . $value . '"';
84
-		$out .= ($moreparam ? ' ' . $moreparam : '');
85
-		$out .= ' />' . $addInputLabel;
82
+		$out .= ' name="'.$name.'"';
83
+		$out .= ' value="'.$value.'"';
84
+		$out .= ($moreparam ? ' '.$moreparam : '');
85
+		$out .= ' />'.$addInputLabel;
86 86
 		if ($label != '') {
87
-			$out .= $label . '</label>';
87
+			$out .= $label.'</label>';
88 88
 		}
89 89
 
90 90
 		return $out;
@@ -164,16 +164,16 @@  discard block
 block discarded – undo
164 164
 		$out = '';
165 165
 
166 166
 		$idname = str_replace(array('[', ']'), array('', ''), $htmlname);
167
-		$out .= '<select id="' . preg_replace('/^\./', '', $idname) . '"' . ($disabled ? ' disabled="disabled"' : '') . ' class="' . ($morecss ? ' ' . $morecss : '') . '"';
168
-		$out .= ' name="' . preg_replace('/^\./', '', $htmlname) . '"' . ($moreparam ? ' ' . $moreparam : '');
169
-		$out .= '>' . "\n";
167
+		$out .= '<select id="'.preg_replace('/^\./', '', $idname).'"'.($disabled ? ' disabled="disabled"' : '').' class="'.($morecss ? ' '.$morecss : '').'"';
168
+		$out .= ' name="'.preg_replace('/^\./', '', $htmlname).'"'.($moreparam ? ' '.$moreparam : '');
169
+		$out .= '>'."\n";
170 170
 
171 171
 		if ($show_empty) {
172 172
 			$textforempty = ' ';
173 173
 			if (!is_numeric($show_empty)) {
174 174
 				$textforempty = $show_empty;
175 175
 			}
176
-			$out .= '<option value="' . ($show_empty < 0 ? $show_empty : -1) . '"' . ($id == $show_empty ? ' selected' : '') . '>' . $textforempty . '</option>' . "\n";
176
+			$out .= '<option value="'.($show_empty < 0 ? $show_empty : -1).'"'.($id == $show_empty ? ' selected' : '').'>'.$textforempty.'</option>'."\n";
177 177
 		}
178 178
 
179 179
 		if (is_array($array)) {
@@ -205,7 +205,7 @@  discard block
 block discarded – undo
205 205
 				}
206 206
 
207 207
 				if ($key_in_label) {
208
-					$selectOptionValue = dol_escape_htmltag($key . ' - ' . ($maxlen ? dol_trunc($value, $maxlen) : $value));
208
+					$selectOptionValue = dol_escape_htmltag($key.' - '.($maxlen ? dol_trunc($value, $maxlen) : $value));
209 209
 				} else {
210 210
 					$selectOptionValue = dol_escape_htmltag($maxlen ? dol_trunc($value, $maxlen) : $value);
211 211
 					if ($value == '' || $value == '-') {
@@ -213,7 +213,7 @@  discard block
 block discarded – undo
213 213
 					}
214 214
 				}
215 215
 
216
-				$out .= '<option value="' . $key . '"';
216
+				$out .= '<option value="'.$key.'"';
217 217
 				$out .= $disabled;
218 218
 				if (is_array($id)) {
219 219
 					if (in_array($key, $id) && !$disabled) {
@@ -228,7 +228,7 @@  discard block
 block discarded – undo
228 228
 				if (is_array($tmpvalue)) {
229 229
 					foreach ($tmpvalue as $keyforvalue => $valueforvalue) {
230 230
 						if (preg_match('/^data-/', $keyforvalue)) {
231
-							$out .= ' ' . $keyforvalue . '="' . dol_escape_htmltag($valueforvalue) . '"';
231
+							$out .= ' '.$keyforvalue.'="'.dol_escape_htmltag($valueforvalue).'"';
232 232
 						}
233 233
 					}
234 234
 				}
@@ -258,7 +258,7 @@  discard block
 block discarded – undo
258 258
 	 */
259 259
 	public function getDocumentsLink($modulepart, $modulesubdir, $filedir, $filter = '', $morecss = '', $allfiles = 0)
260 260
 	{
261
-		include_once DOL_DOCUMENT_ROOT . '/core/lib/files.lib.php';
261
+		include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
262 262
 
263 263
 		$out = '';
264 264
 
@@ -274,21 +274,21 @@  discard block
 block discarded – undo
274 274
 		// Get object entity
275 275
 		if (isModEnabled('multicompany')) {
276 276
 			$regs = array();
277
-			preg_match('/\/([0-9]+)\/[^\/]+\/' . preg_quote($modulesubdir, '/') . '$/', $filedir, $regs);
277
+			preg_match('/\/([0-9]+)\/[^\/]+\/'.preg_quote($modulesubdir, '/').'$/', $filedir, $regs);
278 278
 			$entity = ((!empty($regs[1]) && $regs[1] > 1) ? $regs[1] : 1); // If entity id not found in $filedir this is entity 1 by default
279 279
 		}
280 280
 
281 281
 		// Get list of files starting with name of ref (Note: files with '^ref\.extension' are generated files, files with '^ref-...' are uploaded files)
282 282
 		if ($allfiles || getDolGlobalString('MAIN_SHOW_ALL_FILES_ON_DOCUMENT_TOOLTIP')) {
283
-			$filterforfilesearch = '^' . preg_quote(basename($modulesubdir), '/');
283
+			$filterforfilesearch = '^'.preg_quote(basename($modulesubdir), '/');
284 284
 		} else {
285
-			$filterforfilesearch = '^' . preg_quote(basename($modulesubdir), '/') . '\.';
285
+			$filterforfilesearch = '^'.preg_quote(basename($modulesubdir), '/').'\.';
286 286
 		}
287 287
 		$file_list = dol_dir_list($filedir, 'files', 0, $filterforfilesearch, '\.meta$|\.png$'); // We also discard .meta and .png preview
288 288
 
289 289
 		//var_dump($file_list);
290 290
 		// For ajax treatment
291
-		$out .= '<!-- html.formwebportal::getDocumentsLink -->' . "\n";
291
+		$out .= '<!-- html.formwebportal::getDocumentsLink -->'."\n";
292 292
 		if (!empty($file_list)) {
293 293
 			$tmpout = '';
294 294
 
@@ -297,7 +297,7 @@  discard block
 block discarded – undo
297 297
 			$i = 0;
298 298
 			foreach ($file_list as $file) {
299 299
 				$i++;
300
-				if ($filter && !preg_match('/' . $filter . '/i', $file["name"])) {
300
+				if ($filter && !preg_match('/'.$filter.'/i', $file["name"])) {
301 301
 					continue; // Discard this. It does not match provided filter.
302 302
 				}
303 303
 
@@ -305,11 +305,11 @@  discard block
 block discarded – undo
305 305
 				// Define relative path for download link (depends on module)
306 306
 				$relativepath = $file["name"]; // Cas general
307 307
 				if ($modulesubdir) {
308
-					$relativepath = $modulesubdir . "/" . $file["name"]; // Cas propal, facture...
308
+					$relativepath = $modulesubdir."/".$file["name"]; // Cas propal, facture...
309 309
 				}
310 310
 				// Autre cas
311 311
 				if ($modulepart == 'donation') {
312
-					$relativepath = get_exdir($modulesubdir, 2, 0, 0, null, 'donation') . $file["name"];
312
+					$relativepath = get_exdir($modulesubdir, 2, 0, 0, null, 'donation').$file["name"];
313 313
 				}
314 314
 				if ($modulepart == 'export') {
315 315
 					$relativepath = $file["name"];
@@ -325,8 +325,8 @@  discard block
 block discarded – undo
325 325
 				}
326 326
 
327 327
 				// Download
328
-				$url = $context->getControllerUrl('document') . '&modulepart=' . $modulepart . '&entity=' . $entity . '&file=' . urlencode($relativepath) . '&soc_id=' . $context->logged_thirdparty->id;
329
-				$tmpout .= '<a href="' . $url . '"' . ($morecss ? ' class="' . $morecss . '"' : '') . ' role="downloadlink"';
328
+				$url = $context->getControllerUrl('document').'&modulepart='.$modulepart.'&entity='.$entity.'&file='.urlencode($relativepath).'&soc_id='.$context->logged_thirdparty->id;
329
+				$tmpout .= '<a href="'.$url.'"'.($morecss ? ' class="'.$morecss.'"' : '').' role="downloadlink"';
330 330
 				$mime = dol_mimetype($relativepath, '', 0);
331 331
 				if (preg_match('/text/', $mime)) {
332 332
 					$tmpout .= ' target="_blank" rel="noopener noreferrer"';
@@ -359,10 +359,10 @@  discard block
 block discarded – undo
359 359
 	{
360 360
 		global $langs;
361 361
 		require_once DOL_DOCUMENT_ROOT.'/core/lib/signature.lib.php';
362
-		$out = '<!-- html.formwebportal::getSignatureLink -->' . "\n";
362
+		$out = '<!-- html.formwebportal::getSignatureLink -->'."\n";
363 363
 		$url = getOnlineSignatureUrl(0, $modulepart, $object->ref, 1, $object);
364 364
 		if (!empty($url)) {
365
-			$out .= '<a target="_blank" rel="noopener noreferrer" href="' . $url . '"' . ($morecss ? ' class="' . $morecss . '"' : '') . ' role="signaturelink">';
365
+			$out .= '<a target="_blank" rel="noopener noreferrer" href="'.$url.'"'.($morecss ? ' class="'.$morecss.'"' : '').' role="signaturelink">';
366 366
 			$out .= '<i class="fa fa-file-signature"></i>';
367 367
 			$out .= $langs->trans("Sign");
368 368
 			$out .= '</a>';
@@ -404,9 +404,9 @@  discard block
 block discarded – undo
404 404
 		$vartmp = (empty($InfoFieldList[3]) ? '' : $InfoFieldList[3]);
405 405
 		$reg = array();
406 406
 		if (preg_match('/^.*:(\w*)$/', $vartmp, $reg)) {
407
-			$InfoFieldList[4] = $reg[1];    // take the sort field
407
+			$InfoFieldList[4] = $reg[1]; // take the sort field
408 408
 		}
409
-		$InfoFieldList[3] = preg_replace('/:\w*$/', '', $vartmp);    // take the filter field
409
+		$InfoFieldList[3] = preg_replace('/:\w*$/', '', $vartmp); // take the filter field
410 410
 
411 411
 		$classname = $InfoFieldList[0];
412 412
 		$classpath = $InfoFieldList[1];
@@ -429,11 +429,11 @@  discard block
 block discarded – undo
429 429
 			}
430 430
 		}
431 431
 		if (!is_object($objecttmp)) {
432
-			dol_syslog('Error bad setup of type for field ' . implode(',', $InfoFieldList), LOG_WARNING);
433
-			return 'Error bad setup of type for field ' . implode(',', $InfoFieldList);
432
+			dol_syslog('Error bad setup of type for field '.implode(',', $InfoFieldList), LOG_WARNING);
433
+			return 'Error bad setup of type for field '.implode(',', $InfoFieldList);
434 434
 		}
435 435
 
436
-		dol_syslog(__METHOD__ . ' filter=' . $filter, LOG_DEBUG);
436
+		dol_syslog(__METHOD__.' filter='.$filter, LOG_DEBUG);
437 437
 		$out = '';
438 438
 		// Immediate load of table record.
439 439
 		$out .= $this->selectForFormsList($objecttmp, $htmlname, $preselectedvalue, $showempty, $searchkey, $placeholder, $morecss, $moreparams, $forcecombo, 0, $disabled, $sortfield, $filter);
@@ -469,7 +469,7 @@  discard block
 block discarded – undo
469 469
 		if ($prefixforautocompletemode == 'societe') {
470 470
 			$prefixforautocompletemode = 'company';
471 471
 		}
472
-		$confkeyforautocompletemode = strtoupper($prefixforautocompletemode) . '_USE_SEARCH_TO_SELECT'; // For example COMPANY_USE_SEARCH_TO_SELECT
472
+		$confkeyforautocompletemode = strtoupper($prefixforautocompletemode).'_USE_SEARCH_TO_SELECT'; // For example COMPANY_USE_SEARCH_TO_SELECT
473 473
 
474 474
 		if (in_array($objecttmp->element, array('adherent_type'))) {
475 475
 			$fieldstoshow = 't.libelle';
@@ -477,11 +477,11 @@  discard block
 block discarded – undo
477 477
 		if (!empty($objecttmp->fields)) {    // For object that declare it, it is better to use declared fields (like societe, contact, ...)
478 478
 			$tmpfieldstoshow = '';
479 479
 			foreach ($objecttmp->fields as $key => $val) {
480
-				if (! (int) dol_eval($val['enabled'], 1, 1, '1')) {
480
+				if (!(int) dol_eval($val['enabled'], 1, 1, '1')) {
481 481
 					continue;
482 482
 				}
483 483
 				if (!empty($val['showoncombobox'])) {
484
-					$tmpfieldstoshow .= ($tmpfieldstoshow ? ',' : '') . 't.' . $key;
484
+					$tmpfieldstoshow .= ($tmpfieldstoshow ? ',' : '').'t.'.$key;
485 485
 				}
486 486
 			}
487 487
 			if ($tmpfieldstoshow) {
@@ -509,11 +509,11 @@  discard block
 block discarded – undo
509 509
 		$num = 0;
510 510
 
511 511
 		// Search data
512
-		$sql = "SELECT t.rowid, " . $fieldstoshow . " FROM " . $this->db->prefix() . $objecttmp->table_element . " as t";
512
+		$sql = "SELECT t.rowid, ".$fieldstoshow." FROM ".$this->db->prefix().$objecttmp->table_element." as t";
513 513
 		if (isset($objecttmp->ismultientitymanaged)) {
514 514
 			if (!is_numeric($objecttmp->ismultientitymanaged)) {
515 515
 				$tmparray = explode('@', $objecttmp->ismultientitymanaged);
516
-				$sql .= " INNER JOIN " . $this->db->prefix() . $tmparray[1] . " as parenttable ON parenttable.rowid = t." . $tmparray[0];
516
+				$sql .= " INNER JOIN ".$this->db->prefix().$tmparray[1]." as parenttable ON parenttable.rowid = t.".$tmparray[0];
517 517
 			}
518 518
 		}
519 519
 
@@ -532,10 +532,10 @@  discard block
 block discarded – undo
532 532
 			$sql .= " WHERE 1=1";
533 533
 			if (isset($objecttmp->ismultientitymanaged)) {
534 534
 				if ($objecttmp->ismultientitymanaged == 1) {
535
-					$sql .= " AND t.entity IN (" . getEntity($objecttmp->table_element) . ")";
535
+					$sql .= " AND t.entity IN (".getEntity($objecttmp->table_element).")";
536 536
 				}
537 537
 				if (!is_numeric($objecttmp->ismultientitymanaged)) {
538
-					$sql .= " AND parenttable.entity = t." . $tmparray[0];
538
+					$sql .= " AND parenttable.entity = t.".$tmparray[0];
539 539
 				}
540 540
 			}
541 541
 			if ($searchkey != '') {
@@ -546,7 +546,7 @@  discard block
 block discarded – undo
546 546
 				$errormessage = '';
547 547
 				$sql .= forgeSQLFromUniversalSearchCriteria($filter, $errormessage);
548 548
 				if ($errormessage) {
549
-					return 'Error forging a SQL request from an universal criteria: ' . $errormessage;
549
+					return 'Error forging a SQL request from an universal criteria: '.$errormessage;
550 550
 				}
551 551
 			}
552 552
 		}
@@ -556,7 +556,7 @@  discard block
 block discarded – undo
556 556
 		$resql = $this->db->query($sql);
557 557
 		if ($resql) {
558 558
 			// Construct $out and $outarray
559
-			$out .= '<select id="' . $htmlname . '" class="' . ($morecss ? ' ' . $morecss : '') . '"' . ($disabled ? ' disabled="disabled"' : '') . ($moreparams ? ' ' . $moreparams : '') . ' name="' . $htmlname . '">' . "\n";
559
+			$out .= '<select id="'.$htmlname.'" class="'.($morecss ? ' '.$morecss : '').'"'.($disabled ? ' disabled="disabled"' : '').($moreparams ? ' '.$moreparams : '').' name="'.$htmlname.'">'."\n";
560 560
 
561 561
 			// 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
562 562
 			$textifempty = '&nbsp;';
@@ -570,7 +570,7 @@  discard block
 block discarded – undo
570 570
 				}
571 571
 			}
572 572
 			if ($showempty) {
573
-				$out .= '<option value="-1">' . $textifempty . '</option>' . "\n";
573
+				$out .= '<option value="-1">'.$textifempty.'</option>'."\n";
574 574
 			}
575 575
 
576 576
 			$num = $this->db->num_rows($resql);
@@ -593,9 +593,9 @@  discard block
 block discarded – undo
593 593
 					}
594 594
 					if (empty($outputmode)) {
595 595
 						if ($preselectedvalue > 0 && $preselectedvalue == $obj->rowid) {
596
-							$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>';
596
+							$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>';
597 597
 						} else {
598
-							$out .= '<option value="' . $obj->rowid . '" data-html="' . dol_escape_htmltag($labelhtml, 0, 0, '', 0, 1) . '">' . dol_escape_htmltag($label, 0, 0, '', 0, 1) . '</option>';
598
+							$out .= '<option value="'.$obj->rowid.'" data-html="'.dol_escape_htmltag($labelhtml, 0, 0, '', 0, 1).'">'.dol_escape_htmltag($label, 0, 0, '', 0, 1).'</option>';
599 599
 						}
600 600
 					} else {
601 601
 						array_push($outarray, array('key' => $obj->rowid, 'value' => $label, 'label' => $label));
@@ -608,7 +608,7 @@  discard block
 block discarded – undo
608 608
 				}
609 609
 			}
610 610
 
611
-			$out .= '</select>' . "\n";
611
+			$out .= '</select>'."\n";
612 612
 		} else {
613 613
 			dol_print_error($this->db);
614 614
 		}
@@ -645,22 +645,22 @@  discard block
 block discarded – undo
645 645
 		$size = !empty($val['size']) ? $val['size'] : 0;
646 646
 		// see common object class
647 647
 		if (preg_match('/^(integer|link):(.*):(.*):(.*):(.*)/i', $val['type'], $reg)) {
648
-			$param['options'] = array($reg[2] . ':' . $reg[3] . ':' . $reg[4] . ':' . $reg[5] => 'N');
648
+			$param['options'] = array($reg[2].':'.$reg[3].':'.$reg[4].':'.$reg[5] => 'N');
649 649
 			$type = 'link';
650 650
 		} elseif (preg_match('/^(integer|link):(.*):(.*):(.*)/i', $val['type'], $reg)) {
651
-			$param['options'] = array($reg[2] . ':' . $reg[3] . ':' . $reg[4] => 'N');
651
+			$param['options'] = array($reg[2].':'.$reg[3].':'.$reg[4] => 'N');
652 652
 			$type = 'link';
653 653
 		} elseif (preg_match('/^(integer|link):(.*):(.*)/i', $val['type'], $reg)) {
654
-			$param['options'] = array($reg[2] . ':' . $reg[3] => 'N');
654
+			$param['options'] = array($reg[2].':'.$reg[3] => 'N');
655 655
 			$type = 'link';
656 656
 		} elseif (preg_match('/^(sellist):(.*):(.*):(.*):(.*)/i', $val['type'], $reg)) {
657
-			$param['options'] = array($reg[2] . ':' . $reg[3] . ':' . $reg[4] . ':' . $reg[5] => 'N');
657
+			$param['options'] = array($reg[2].':'.$reg[3].':'.$reg[4].':'.$reg[5] => 'N');
658 658
 			$type = 'sellist';
659 659
 		} elseif (preg_match('/^(sellist):(.*):(.*):(.*)/i', $val['type'], $reg)) {
660
-			$param['options'] = array($reg[2] . ':' . $reg[3] . ':' . $reg[4] => 'N');
660
+			$param['options'] = array($reg[2].':'.$reg[3].':'.$reg[4] => 'N');
661 661
 			$type = 'sellist';
662 662
 		} elseif (preg_match('/^(sellist):(.*):(.*)/i', $val['type'], $reg)) {
663
-			$param['options'] = array($reg[2] . ':' . $reg[3] => 'N');
663
+			$param['options'] = array($reg[2].':'.$reg[3] => 'N');
664 664
 			$type = 'sellist';
665 665
 		} elseif (preg_match('/^varchar\((\d+)\)/', $val['type'], $reg)) {
666 666
 			$param['options'] = array();
@@ -698,7 +698,7 @@  discard block
 block discarded – undo
698 698
 
699 699
 		if ($computed) {
700 700
 			if (!preg_match('/^search_/', $keyprefix)) {
701
-				return '<span>' . $langs->trans("AutomaticallyCalculated") . '</span>';
701
+				return '<span>'.$langs->trans("AutomaticallyCalculated").'</span>';
702 702
 			} else {
703 703
 				return '';
704 704
 			}
@@ -709,7 +709,7 @@  discard block
 block discarded – undo
709 709
 			$morecss = $val['css'];
710 710
 		}
711 711
 
712
-		$htmlName = $keyprefix . $key . $keysuffix;
712
+		$htmlName = $keyprefix.$key.$keysuffix;
713 713
 		$htmlId = $htmlName;
714 714
 		//$moreparam .= (!empty($required)  ? ' required' : '');
715 715
 		switch ($type) {
@@ -729,7 +729,7 @@  discard block
 block discarded – undo
729 729
 
730 730
 				if ($type == 'datetime') {
731 731
 					//$moreparam .= ' step="1"'; to show seconds
732
-					$out .= ' ' . $this->inputType('time', $htmlName.'_time', $valueTime, $htmlId, $morecss, $moreparam);
732
+					$out .= ' '.$this->inputType('time', $htmlName.'_time', $valueTime, $htmlId, $morecss, $moreparam);
733 733
 				}
734 734
 				break;
735 735
 
@@ -739,7 +739,7 @@  discard block
 block discarded – undo
739 739
 
740 740
 			case 'text':
741 741
 			case 'html':
742
-				$moreparam .= ($size > 0 ? ' maxlength="' . $size . '"' : '');
742
+				$moreparam .= ($size > 0 ? ' maxlength="'.$size.'"' : '');
743 743
 				$out = $this->inputType('text', $htmlName, dol_escape_htmltag($value), $htmlId, $morecss, $moreparam);
744 744
 				break;
745 745
 
@@ -759,7 +759,7 @@  discard block
 block discarded – undo
759 759
 				if (!empty($value)) {
760 760
 					$value = price($value); // $value in memory is a php numeric, we format it into user number format.
761 761
 				}
762
-				$addInputLabel = ' ' . $langs->getCurrencySymbol($conf->currency);
762
+				$addInputLabel = ' '.$langs->getCurrencySymbol($conf->currency);
763 763
 				$out = $this->inputType('text', $htmlName, $value, $htmlId, $morecss, $moreparam, '', $addInputLabel);
764 764
 				break;
765 765
 
@@ -776,14 +776,14 @@  discard block
 block discarded – undo
776 776
 
777 777
 			case 'radio':
778 778
 				foreach ($param['options'] as $keyopt => $valopt) {
779
-					$htmlId = $htmlName . '_' . $keyopt;
780
-					$htmlMoreParam = $moreparam . ($value == $keyopt ? ' checked' : '');
781
-					$out .= $this->inputType('radio', $htmlName, $keyopt, $htmlId, $morecss, $htmlMoreParam, $valopt) . '<br>';
779
+					$htmlId = $htmlName.'_'.$keyopt;
780
+					$htmlMoreParam = $moreparam.($value == $keyopt ? ' checked' : '');
781
+					$out .= $this->inputType('radio', $htmlName, $keyopt, $htmlId, $morecss, $htmlMoreParam, $valopt).'<br>';
782 782
 				}
783 783
 				break;
784 784
 
785 785
 			case 'select':
786
-				$out = '<select class="' . $morecss . '" name="' . $htmlName . '" id="' . $htmlId . '"' . ($moreparam ? ' ' . $moreparam : '') . ' >';
786
+				$out = '<select class="'.$morecss.'" name="'.$htmlName.'" id="'.$htmlId.'"'.($moreparam ? ' '.$moreparam : '').' >';
787 787
 				if ($default == '' || $notNull != 1) {
788 788
 					$out .= '<option value="0">&nbsp;</option>';
789 789
 				}
@@ -794,15 +794,15 @@  discard block
 block discarded – undo
794 794
 					if (strpos($valb, "|") !== false) {
795 795
 						list($valb, $parent) = explode('|', $valb);
796 796
 					}
797
-					$out .= '<option value="' . $keyb . '"';
797
+					$out .= '<option value="'.$keyb.'"';
798 798
 					$out .= (((string) $value == $keyb) ? ' selected' : '');
799
-					$out .= (!empty($parent) ? ' parent="' . $parent . '"' : '');
800
-					$out .= '>' . $valb . '</option>';
799
+					$out .= (!empty($parent) ? ' parent="'.$parent.'"' : '');
800
+					$out .= '>'.$valb.'</option>';
801 801
 				}
802 802
 				$out .= '</select>';
803 803
 				break;
804 804
 			case 'sellist':
805
-				$out = '<select class="' . $morecss . '" name="' . $htmlName . '" id="' . $htmlId . '"' . ($moreparam ? ' ' . $moreparam : '') . '>';
805
+				$out = '<select class="'.$morecss.'" name="'.$htmlName.'" id="'.$htmlId.'"'.($moreparam ? ' '.$moreparam : '').'>';
806 806
 
807 807
 				$param_list = array_keys($param['options']);
808 808
 				$InfoFieldList = explode(":", $param_list[0]);
@@ -815,18 +815,18 @@  discard block
 block discarded – undo
815 815
 				// 4 : where clause filter on column or table extrafield, syntax field='value' or extra.field=value
816 816
 				// 5 : id category type
817 817
 				// 6 : ids categories list separated by comma for category root
818
-				$keyList = (empty($InfoFieldList[2]) ? 'rowid' : $InfoFieldList[2] . ' as rowid');
818
+				$keyList = (empty($InfoFieldList[2]) ? 'rowid' : $InfoFieldList[2].' as rowid');
819 819
 
820 820
 				if (count($InfoFieldList) > 4 && !empty($InfoFieldList[4])) {
821 821
 					if (strpos($InfoFieldList[4], 'extra.') !== false) {
822
-						$keyList = 'main.' . $InfoFieldList[2] . ' as rowid';
822
+						$keyList = 'main.'.$InfoFieldList[2].' as rowid';
823 823
 					} else {
824
-						$keyList = $InfoFieldList[2] . ' as rowid';
824
+						$keyList = $InfoFieldList[2].' as rowid';
825 825
 					}
826 826
 				}
827 827
 				if (count($InfoFieldList) > 3 && !empty($InfoFieldList[3])) {
828 828
 					list($parentName, $parentField) = explode('|', $InfoFieldList[3]);
829
-					$keyList .= ', ' . $parentField;
829
+					$keyList .= ', '.$parentField;
830 830
 				}
831 831
 
832 832
 				$filter_categorie = false;
@@ -844,8 +844,8 @@  discard block
 block discarded – undo
844 844
 					}
845 845
 
846 846
 					$sqlwhere = '';
847
-					$sql = "SELECT " . $keyList;
848
-					$sql .= " FROM " . $this->db->prefix() . $InfoFieldList[0];
847
+					$sql = "SELECT ".$keyList;
848
+					$sql .= " FROM ".$this->db->prefix().$InfoFieldList[0];
849 849
 					if (!empty($InfoFieldList[4])) {
850 850
 						// can use SELECT request
851 851
 						if (strpos($InfoFieldList[4], '$SEL$') !== false) {
@@ -857,24 +857,24 @@  discard block
 block discarded – undo
857 857
 
858 858
 						//We have to join on extrafield table
859 859
 						if (strpos($InfoFieldList[4], 'extra') !== false) {
860
-							$sql .= " as main, " . $this->db->prefix() . $InfoFieldList[0] . "_extrafields as extra";
861
-							$sqlwhere .= " WHERE extra.fk_object=main." . $InfoFieldList[2] . " AND " . $InfoFieldList[4];
860
+							$sql .= " as main, ".$this->db->prefix().$InfoFieldList[0]."_extrafields as extra";
861
+							$sqlwhere .= " WHERE extra.fk_object=main.".$InfoFieldList[2]." AND ".$InfoFieldList[4];
862 862
 						} else {
863
-							$sqlwhere .= " WHERE " . $InfoFieldList[4];
863
+							$sqlwhere .= " WHERE ".$InfoFieldList[4];
864 864
 						}
865 865
 					} else {
866 866
 						$sqlwhere .= ' WHERE 1=1';
867 867
 					}
868 868
 					// Some tables may have field, some other not. For the moment we disable it.
869 869
 					if (in_array($InfoFieldList[0], array('tablewithentity'))) {
870
-						$sqlwhere .= " AND entity = " . ((int) $conf->entity);
870
+						$sqlwhere .= " AND entity = ".((int) $conf->entity);
871 871
 					}
872 872
 					$sql .= $sqlwhere;
873 873
 					//print $sql;
874 874
 
875
-					$sql .= ' ORDER BY ' . implode(', ', $fields_label);
875
+					$sql .= ' ORDER BY '.implode(', ', $fields_label);
876 876
 
877
-					dol_syslog(get_class($this) . '::showInputField type=sellist', LOG_DEBUG);
877
+					dol_syslog(get_class($this).'::showInputField type=sellist', LOG_DEBUG);
878 878
 					$resql = $this->db->query($sql);
879 879
 					if ($resql) {
880 880
 						$out .= '<option value="0">&nbsp;</option>';
@@ -890,7 +890,7 @@  discard block
 block discarded – undo
890 890
 							if (count($fields_label) > 1) {
891 891
 								$notrans = true;
892 892
 								foreach ($fields_label as $field_toshow) {
893
-									$labeltoshow .= $obj->$field_toshow . ' ';
893
+									$labeltoshow .= $obj->$field_toshow.' ';
894 894
 								}
895 895
 							} else {
896 896
 								$labeltoshow = $obj->{$InfoFieldList[1]};
@@ -901,12 +901,12 @@  discard block
 block discarded – undo
901 901
 								foreach ($fields_label as $field_toshow) {
902 902
 									$translabel = $langs->trans($obj->$field_toshow);
903 903
 									if ($translabel != $obj->$field_toshow) {
904
-										$labeltoshow = dol_trunc($translabel) . ' ';
904
+										$labeltoshow = dol_trunc($translabel).' ';
905 905
 									} else {
906
-										$labeltoshow = dol_trunc($obj->$field_toshow) . ' ';
906
+										$labeltoshow = dol_trunc($obj->$field_toshow).' ';
907 907
 									}
908 908
 								}
909
-								$out .= '<option value="' . $obj->rowid . '" selected>' . $labeltoshow . '</option>';
909
+								$out .= '<option value="'.$obj->rowid.'" selected>'.$labeltoshow.'</option>';
910 910
 							} else {
911 911
 								if (!$notrans) {
912 912
 									$translabel = $langs->trans($obj->{$InfoFieldList[1]});
@@ -920,28 +920,28 @@  discard block
 block discarded – undo
920 920
 									$labeltoshow = '(not defined)';
921 921
 								}
922 922
 								if ($value == $obj->rowid) {
923
-									$out .= '<option value="' . $obj->rowid . '" selected>' . $labeltoshow . '</option>';
923
+									$out .= '<option value="'.$obj->rowid.'" selected>'.$labeltoshow.'</option>';
924 924
 								}
925 925
 
926 926
 								if (!empty($InfoFieldList[3]) && $parentField) {
927
-									$parent = $parentName . ':' . $obj->{$parentField};
927
+									$parent = $parentName.':'.$obj->{$parentField};
928 928
 									$isDependList = 1;
929 929
 								}
930 930
 
931
-								$out .= '<option value="' . $obj->rowid . '"';
931
+								$out .= '<option value="'.$obj->rowid.'"';
932 932
 								$out .= ($value == $obj->rowid ? ' selected' : '');
933
-								$out .= (!empty($parent) ? ' parent="' . $parent . '"' : '');
934
-								$out .= '>' . $labeltoshow . '</option>';
933
+								$out .= (!empty($parent) ? ' parent="'.$parent.'"' : '');
934
+								$out .= '>'.$labeltoshow.'</option>';
935 935
 							}
936 936
 
937 937
 							$i++;
938 938
 						}
939 939
 						$this->db->free($resql);
940 940
 					} else {
941
-						$out .= 'Error in request ' . $sql . ' ' . $this->db->lasterror() . '. Check setup of extra parameters.<br>';
941
+						$out .= 'Error in request '.$sql.' '.$this->db->lasterror().'. Check setup of extra parameters.<br>';
942 942
 					}
943 943
 				} else {
944
-					require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php';
944
+					require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
945 945
 					$categorytype = $InfoFieldList[5];
946 946
 					if (is_numeric($categorytype)) {
947 947
 						$categorytype = Categorie::$MAP_ID_TO_CODE[(int) $categorytype]; // For backward compatibility
@@ -949,9 +949,9 @@  discard block
 block discarded – undo
949 949
 					$data = $this->select_all_categories($categorytype, '', 'parent', 64, $InfoFieldList[6], 1, 1);
950 950
 					$out .= '<option value="0">&nbsp;</option>';
951 951
 					foreach ($data as $data_key => $data_value) {
952
-						$out .= '<option value="' . $data_key . '"';
952
+						$out .= '<option value="'.$data_key.'"';
953 953
 						$out .= ($value == $data_key ? ' selected' : '');
954
-						$out .= '>' . $data_value . '</option>';
954
+						$out .= '>'.$data_value.'</option>';
955 955
 					}
956 956
 				}
957 957
 				$out .= '</select>';
@@ -1024,19 +1024,19 @@  discard block
 block discarded – undo
1024 1024
 		}
1025 1025
 		if (preg_match('/^integer:(.*):(.*)/i', $val['type'], $reg)) {
1026 1026
 			$type = 'link';
1027
-			$stringforoptions = $reg[1] . ':' . $reg[2];
1027
+			$stringforoptions = $reg[1].':'.$reg[2];
1028 1028
 			if ($reg[1] == 'User') {
1029 1029
 				$stringforoptions .= ':-1';
1030 1030
 			}
1031 1031
 			$param['options'] = array($stringforoptions => $stringforoptions);
1032 1032
 		} elseif (preg_match('/^sellist:(.*):(.*):(.*):(.*)/i', $val['type'], $reg)) {
1033
-			$param['options'] = array($reg[1] . ':' . $reg[2] . ':' . $reg[3] . ':' . $reg[4] => 'N');
1033
+			$param['options'] = array($reg[1].':'.$reg[2].':'.$reg[3].':'.$reg[4] => 'N');
1034 1034
 			$type = 'sellist';
1035 1035
 		} elseif (preg_match('/^sellist:(.*):(.*):(.*)/i', $val['type'], $reg)) {
1036
-			$param['options'] = array($reg[1] . ':' . $reg[2] . ':' . $reg[3] => 'N');
1036
+			$param['options'] = array($reg[1].':'.$reg[2].':'.$reg[3] => 'N');
1037 1037
 			$type = 'sellist';
1038 1038
 		} elseif (preg_match('/^sellist:(.*):(.*)/i', $val['type'], $reg)) {
1039
-			$param['options'] = array($reg[1] . ':' . $reg[2] => 'N');
1039
+			$param['options'] = array($reg[1].':'.$reg[2] => 'N');
1040 1040
 			$type = 'sellist';
1041 1041
 		} elseif (preg_match('/^chkbxlst:(.*)/i', $val['type'], $reg)) {
1042 1042
 			$param['options'] = array($reg[1] => 'N');
@@ -1089,7 +1089,7 @@  discard block
 block discarded – undo
1089 1089
 			//
1090 1090
 		} elseif ($type == 'date') {
1091 1091
 			if (!empty($value)) {
1092
-				$value = dol_print_date($value, 'day');    // We suppose dates without time are always gmt (storage of course + output)
1092
+				$value = dol_print_date($value, 'day'); // We suppose dates without time are always gmt (storage of course + output)
1093 1093
 			} else {
1094 1094
 				$value = '';
1095 1095
 			}
@@ -1100,7 +1100,7 @@  discard block
 block discarded – undo
1100 1100
 				$value = '';
1101 1101
 			}
1102 1102
 		} elseif ($type == 'duration') {
1103
-			include_once DOL_DOCUMENT_ROOT . '/core/lib/date.lib.php';
1103
+			include_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
1104 1104
 			if (!is_null($value) && $value !== '') {
1105 1105
 				$value = convertSecondToTime((int) $value, 'allhourmin');
1106 1106
 			} else {
@@ -1119,7 +1119,7 @@  discard block
 block discarded – undo
1119 1119
 			if (!empty($value)) {
1120 1120
 				$checked = ' checked ';
1121 1121
 			}
1122
-			$value = '<input type="checkbox" ' . $checked . ' ' . ($moreparam ? $moreparam : '') . ' readonly disabled>';
1122
+			$value = '<input type="checkbox" '.$checked.' '.($moreparam ? $moreparam : '').' readonly disabled>';
1123 1123
 		} elseif ($type == 'mail' || $type == 'email') {
1124 1124
 			$value = dol_print_email($value, 0, 0, 0, 64, 1, 1);
1125 1125
 		} elseif ($type == 'url') {
@@ -1146,7 +1146,7 @@  discard block
 block discarded – undo
1146 1146
 
1147 1147
 			if (count($InfoFieldList) > 4 && !empty($InfoFieldList[4])) {
1148 1148
 				$selectkey = $InfoFieldList[2];
1149
-				$keyList = $InfoFieldList[2] . ' as rowid';
1149
+				$keyList = $InfoFieldList[2].' as rowid';
1150 1150
 			}
1151 1151
 
1152 1152
 			$fields_label = explode('|', $InfoFieldList[1]);
@@ -1162,20 +1162,20 @@  discard block
 block discarded – undo
1162 1162
 				}
1163 1163
 			}
1164 1164
 
1165
-			$sql = "SELECT " . $keyList;
1166
-			$sql .= ' FROM ' . $this->db->prefix() . $InfoFieldList[0];
1165
+			$sql = "SELECT ".$keyList;
1166
+			$sql .= ' FROM '.$this->db->prefix().$InfoFieldList[0];
1167 1167
 			if (strpos($InfoFieldList[4], 'extra') !== false) {
1168 1168
 				$sql .= ' as main';
1169 1169
 			}
1170 1170
 			if ($selectkey == 'rowid' && empty($value)) {
1171
-				$sql .= " WHERE " . $selectkey . " = 0";
1171
+				$sql .= " WHERE ".$selectkey." = 0";
1172 1172
 			} elseif ($selectkey == 'rowid') {
1173
-				$sql .= " WHERE " . $selectkey . " = " . ((int) $value);
1173
+				$sql .= " WHERE ".$selectkey." = ".((int) $value);
1174 1174
 			} else {
1175
-				$sql .= " WHERE " . $selectkey . " = '" . $this->db->escape($value) . "'";
1175
+				$sql .= " WHERE ".$selectkey." = '".$this->db->escape($value)."'";
1176 1176
 			}
1177 1177
 
1178
-			dol_syslog(__METHOD__ . ' type=sellist', LOG_DEBUG);
1178
+			dol_syslog(__METHOD__.' type=sellist', LOG_DEBUG);
1179 1179
 			$resql = $this->db->query($sql);
1180 1180
 			if ($resql) {
1181 1181
 				if (!$filter_categorie) {
@@ -1194,9 +1194,9 @@  discard block
 block discarded – undo
1194 1194
 									$translabel = $langs->trans($obj->$field_toshow);
1195 1195
 								}
1196 1196
 								if ($translabel != $field_toshow) {
1197
-									$value .= dol_trunc($translabel, 18) . ' ';
1197
+									$value .= dol_trunc($translabel, 18).' ';
1198 1198
 								} else {
1199
-									$value .= $obj->$field_toshow . ' ';
1199
+									$value .= $obj->$field_toshow.' ';
1200 1200
 								}
1201 1201
 							}
1202 1202
 						} else {
@@ -1212,7 +1212,7 @@  discard block
 block discarded – undo
1212 1212
 						}
1213 1213
 					}
1214 1214
 				} else {
1215
-					require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php';
1215
+					require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
1216 1216
 
1217 1217
 					$toprint = array();
1218 1218
 					$obj = $this->db->fetch_object($resql);
@@ -1220,12 +1220,12 @@  discard block
 block discarded – undo
1220 1220
 					$c->fetch($obj->rowid);
1221 1221
 					$ways = $c->print_all_ways(); // $ways[0] = "ccc2 >> ccc2a >> ccc2a1" with html formatted text
1222 1222
 					foreach ($ways as $way) {
1223
-						$toprint[] = '<li>' . img_object('', 'category') . ' ' . $way . '</li>';
1223
+						$toprint[] = '<li>'.img_object('', 'category').' '.$way.'</li>';
1224 1224
 					}
1225
-					$value = '<div><ul>' . implode(' ', $toprint) . '</ul></div>';
1225
+					$value = '<div><ul>'.implode(' ', $toprint).'</ul></div>';
1226 1226
 				}
1227 1227
 			} else {
1228
-				dol_syslog(__METHOD__ . ' error ' . $this->db->lasterror(), LOG_WARNING);
1228
+				dol_syslog(__METHOD__.' error '.$this->db->lasterror(), LOG_WARNING);
1229 1229
 			}
1230 1230
 		} elseif ($type == 'radio') {
1231 1231
 			$value = (string) $param['options'][$value];
@@ -1236,11 +1236,11 @@  discard block
 block discarded – undo
1236 1236
 				$toprint = array();
1237 1237
 				foreach ($value_arr as $valueval) {
1238 1238
 					if (!empty($valueval)) {
1239
-						$toprint[] = '<li>' . $param['options'][$valueval] . '</li>';
1239
+						$toprint[] = '<li>'.$param['options'][$valueval].'</li>';
1240 1240
 					}
1241 1241
 				}
1242 1242
 				if (!empty($toprint)) {
1243
-					$value = '<div><ul>' . implode(' ', $toprint) . '</ul></div>';
1243
+					$value = '<div><ul>'.implode(' ', $toprint).'</ul></div>';
1244 1244
 				}
1245 1245
 			}
1246 1246
 		} elseif ($type == 'chkbxlst') {
@@ -1254,7 +1254,7 @@  discard block
 block discarded – undo
1254 1254
 
1255 1255
 			if (count($InfoFieldList) >= 3) {
1256 1256
 				$selectkey = $InfoFieldList[2];
1257
-				$keyList = $InfoFieldList[2] . ' as rowid';
1257
+				$keyList = $InfoFieldList[2].' as rowid';
1258 1258
 			}
1259 1259
 
1260 1260
 			$fields_label = explode('|', $InfoFieldList[1]);
@@ -1270,15 +1270,15 @@  discard block
 block discarded – undo
1270 1270
 				}
1271 1271
 			}
1272 1272
 
1273
-			$sql = "SELECT " . $keyList;
1274
-			$sql .= ' FROM ' . $this->db->prefix() . $InfoFieldList[0];
1273
+			$sql = "SELECT ".$keyList;
1274
+			$sql .= ' FROM '.$this->db->prefix().$InfoFieldList[0];
1275 1275
 			if (strpos($InfoFieldList[4], 'extra') !== false) {
1276 1276
 				$sql .= ' as main';
1277 1277
 			}
1278 1278
 			// $sql.= " WHERE ".$selectkey."='".$this->db->escape($value)."'";
1279 1279
 			// $sql.= ' AND entity = '.$conf->entity;
1280 1280
 
1281
-			dol_syslog(__METHOD__ . ' type=chkbxlst', LOG_DEBUG);
1281
+			dol_syslog(__METHOD__.' type=chkbxlst', LOG_DEBUG);
1282 1282
 			$resql = $this->db->query($sql);
1283 1283
 			if ($resql) {
1284 1284
 				if (!$filter_categorie) {
@@ -1295,9 +1295,9 @@  discard block
 block discarded – undo
1295 1295
 										$translabel = $langs->trans($obj->$field_toshow);
1296 1296
 									}
1297 1297
 									if ($translabel != $field_toshow) {
1298
-										$toprint[] = '<li>' . dol_trunc($translabel, 18) . '</li>';
1298
+										$toprint[] = '<li>'.dol_trunc($translabel, 18).'</li>';
1299 1299
 									} else {
1300
-										$toprint[] = '<li>' . $obj->$field_toshow . '</li>';
1300
+										$toprint[] = '<li>'.$obj->$field_toshow.'</li>';
1301 1301
 									}
1302 1302
 								}
1303 1303
 							} else {
@@ -1306,15 +1306,15 @@  discard block
 block discarded – undo
1306 1306
 									$translabel = $langs->trans($obj->{$InfoFieldList[1]});
1307 1307
 								}
1308 1308
 								if ($translabel != $obj->{$InfoFieldList[1]}) {
1309
-									$toprint[] = '<li>' . dol_trunc($translabel, 18) . '</li>';
1309
+									$toprint[] = '<li>'.dol_trunc($translabel, 18).'</li>';
1310 1310
 								} else {
1311
-									$toprint[] = '<li>' . $obj->{$InfoFieldList[1]} . '</li>';
1311
+									$toprint[] = '<li>'.$obj->{$InfoFieldList[1]}.'</li>';
1312 1312
 								}
1313 1313
 							}
1314 1314
 						}
1315 1315
 					}
1316 1316
 				} else {
1317
-					require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php';
1317
+					require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
1318 1318
 
1319 1319
 					$toprint = array();
1320 1320
 					while ($obj = $this->db->fetch_object($resql)) {
@@ -1323,14 +1323,14 @@  discard block
 block discarded – undo
1323 1323
 							$c->fetch($obj->rowid);
1324 1324
 							$ways = $c->print_all_ways(); // $ways[0] = "ccc2 >> ccc2a >> ccc2a1" with html formatted text
1325 1325
 							foreach ($ways as $way) {
1326
-								$toprint[] = '<li>' . img_object('', 'category') . ' ' . $way . '</li>';
1326
+								$toprint[] = '<li>'.img_object('', 'category').' '.$way.'</li>';
1327 1327
 							}
1328 1328
 						}
1329 1329
 					}
1330 1330
 				}
1331
-				$value = '<div><ul>' . implode(' ', $toprint) . '</ul></div>';
1331
+				$value = '<div><ul>'.implode(' ', $toprint).'</ul></div>';
1332 1332
 			} else {
1333
-				dol_syslog(__METHOD__ . ' error ' . $this->db->lasterror(), LOG_WARNING);
1333
+				dol_syslog(__METHOD__.' error '.$this->db->lasterror(), LOG_WARNING);
1334 1334
 			}
1335 1335
 		} elseif ($type == 'link') {
1336 1336
 			// only if something to display (perf)
@@ -1349,16 +1349,16 @@  discard block
 block discarded – undo
1349 1349
 						$value = '';
1350 1350
 						if ($result > 0) {
1351 1351
 							if (property_exists($object, 'label')) {
1352
-								$value = $object->label;  // @phan-suppress-current-line PhanUndeclaredProperty
1352
+								$value = $object->label; // @phan-suppress-current-line PhanUndeclaredProperty
1353 1353
 							} elseif (property_exists($object, 'libelle')) {
1354
-								$value = $object->libelle;  // @phan-suppress-current-line PhanUndeclaredProperty
1354
+								$value = $object->libelle; // @phan-suppress-current-line PhanUndeclaredProperty
1355 1355
 							} elseif (property_exists($object, 'nom')) {
1356
-								$value = $object->nom;  // @phan-suppress-current-line PhanUndeclaredProperty
1356
+								$value = $object->nom; // @phan-suppress-current-line PhanUndeclaredProperty
1357 1357
 							}
1358 1358
 						}
1359 1359
 					}
1360 1360
 				} else {
1361
-					dol_syslog(__METHOD__ . ' Error bad setup of field', LOG_WARNING);
1361
+					dol_syslog(__METHOD__.' Error bad setup of field', LOG_WARNING);
1362 1362
 					return 'Error bad setup of field';
1363 1363
 				}
1364 1364
 			} else {
Please login to merge, or discard this patch.
htdocs/webportal/class/html.formcardwebportal.class.php 1 patch
Spacing   +42 added lines, -42 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
  * \brief      File of class with all html predefined components for WebPortal
26 26
  */
27 27
 
28
-require_once DOL_DOCUMENT_ROOT . '/webportal/class/html.formwebportal.class.php';
28
+require_once DOL_DOCUMENT_ROOT.'/webportal/class/html.formwebportal.class.php';
29 29
 
30 30
 /**
31 31
  *    Class to manage generation of HTML components
@@ -152,15 +152,15 @@  discard block
 block discarded – undo
152 152
 		global $hookmanager, $langs;
153 153
 
154 154
 		$elementEnUpper = strtoupper($elementEn);
155
-		$objectclass = 'WebPortal' . ucfirst($elementEn);
155
+		$objectclass = 'WebPortal'.ucfirst($elementEn);
156 156
 
157
-		$elementCardAccess = getDolGlobalString('WEBPORTAL_' . $elementEnUpper . '_CARD_ACCESS', 'hidden');
157
+		$elementCardAccess = getDolGlobalString('WEBPORTAL_'.$elementEnUpper.'_CARD_ACCESS', 'hidden');
158 158
 		if ($elementCardAccess == 'hidden' || $id <= 0) {
159 159
 			accessforbidden();
160 160
 		}
161 161
 
162 162
 		// load module libraries
163
-		dol_include_once('/webportal/class/webportal' . $elementEn . '.class.php');
163
+		dol_include_once('/webportal/class/webportal'.$elementEn.'.class.php');
164 164
 
165 165
 		// Load translation files required by the page
166 166
 		$langs->loadLangs(array('website', 'other'));
@@ -171,15 +171,15 @@  discard block
 block discarded – undo
171 171
 		$action = GETPOST('action', 'aZ09');
172 172
 		$confirm = GETPOST('confirm', 'alpha');
173 173
 		$cancel = GETPOST('cancel', 'aZ09');
174
-		$contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'webportal' . $elementEn . 'card'; // To manage different context of search
175
-		$backtopage = GETPOST('backtopage', 'alpha');                    // if not set, a default page will be used
176
-		$backtopageforcancel = GETPOST('backtopageforcancel', 'alpha');    // if not set, $backtopage will be used
174
+		$contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'webportal'.$elementEn.'card'; // To manage different context of search
175
+		$backtopage = GETPOST('backtopage', 'alpha'); // if not set, a default page will be used
176
+		$backtopageforcancel = GETPOST('backtopageforcancel', 'alpha'); // if not set, $backtopage will be used
177 177
 		$backtopagejsfields = GETPOST('backtopagejsfields', 'alpha');
178 178
 
179 179
 		// Initialize a technical objects
180 180
 		$object = new $objectclass($this->db);
181 181
 		//$extrafields = new ExtraFields($db);
182
-		$hookmanager->initHooks(array('webportal' . $elementEn . 'card', 'globalcard')); // Note that conf->hooks_modules contains array
182
+		$hookmanager->initHooks(array('webportal'.$elementEn.'card', 'globalcard')); // Note that conf->hooks_modules contains array
183 183
 
184 184
 		// Fetch optionals attributes and labels
185 185
 		//$extrafields->fetch_name_optionals_label($object->table_element);
@@ -190,7 +190,7 @@  discard block
 block discarded – undo
190 190
 		}
191 191
 
192 192
 		// Load object
193
-		include DOL_DOCUMENT_ROOT . '/core/actions_fetchobject.inc.php'; // Must be 'include', not 'include_once'.
193
+		include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be 'include', not 'include_once'.
194 194
 
195 195
 		// Security check (enable the most restrictive one)
196 196
 		if (!isModEnabled('webportal')) {
@@ -214,7 +214,7 @@  discard block
 block discarded – undo
214 214
 		$this->permissiontodelete = $permissiontodelete;
215 215
 		$this->permissionnote = $permissionnote;
216 216
 		$this->permissiondellink = $permissiondellink;
217
-		$this->titleKey = $objectclass . 'CardTitle';
217
+		$this->titleKey = $objectclass.'CardTitle';
218 218
 		$this->ref = $ref;
219 219
 	}
220 220
 
@@ -247,17 +247,17 @@  discard block
 block discarded – undo
247 247
 
248 248
 		if (empty($backtopage) || ($cancel && empty($id))) {
249 249
 			if (empty($backtopage) || ($cancel && strpos($backtopage, '__ID__'))) {
250
-				$backtopage = $context->getControllerUrl($elementEn . 'card');
250
+				$backtopage = $context->getControllerUrl($elementEn.'card');
251 251
 			}
252 252
 		}
253 253
 
254 254
 		// Action to cancel record
255 255
 		if ($cancel) {
256 256
 			if (!empty($backtopageforcancel)) {
257
-				header("Location: " . $backtopageforcancel);
257
+				header("Location: ".$backtopageforcancel);
258 258
 				exit;
259 259
 			} elseif (!empty($backtopage)) {
260
-				header("Location: " . $backtopage);
260
+				header("Location: ".$backtopage);
261 261
 				exit;
262 262
 			}
263 263
 			$action = '';
@@ -268,7 +268,7 @@  discard block
 block discarded – undo
268 268
 			foreach ($object->fields as $key => $val) {
269 269
 				// Check if field was submitted to be edited
270 270
 				if ($object->fields[$key]['type'] == 'duration') {
271
-					if (!GETPOSTISSET($key . 'hour') || !GETPOSTISSET($key . 'min')) {
271
+					if (!GETPOSTISSET($key.'hour') || !GETPOSTISSET($key.'min')) {
272 272
 						continue; // The field was not submitted to be saved
273 273
 					}
274 274
 				} elseif ($object->fields[$key]['type'] == 'boolean') {
@@ -319,7 +319,7 @@  discard block
 block discarded – undo
319 319
 						$dateDay = (int) $dateArr[2];
320 320
 					}
321 321
 					// extract time HH:ii:ss for hours, minutes and seconds
322
-					$postTime = GETPOST($key . '_time', 'alphanohtml');
322
+					$postTime = GETPOST($key.'_time', 'alphanohtml');
323 323
 					$timeArr = explode(':', $postTime);
324 324
 					$timeHours = 12;
325 325
 					$timeMinutes = 0;
@@ -337,8 +337,8 @@  discard block
 block discarded – undo
337 337
 					}
338 338
 					$value = dol_mktime($timeHours, $timeMinutes, $timeSeconds, $dateMonth, $dateDay, $dateYear);
339 339
 				} elseif ($object->fields[$key]['type'] == 'duration') {
340
-					if (GETPOSTINT($key . 'hour') != '' || GETPOSTINT($key . 'min') != '') {
341
-						$value = 60 * 60 * GETPOSTINT($key . 'hour') + 60 * GETPOSTINT($key . 'min');
340
+					if (GETPOSTINT($key.'hour') != '' || GETPOSTINT($key.'min') != '') {
341
+						$value = 60 * 60 * GETPOSTINT($key.'hour') + 60 * GETPOSTINT($key.'min');
342 342
 					} else {
343 343
 						$value = '';
344 344
 					}
@@ -407,7 +407,7 @@  discard block
 block discarded – undo
407 407
 					$urltogo = $backtopage ? str_replace('__ID__', $result, $backtopage) : $backurlforlist;
408 408
 					$urltogo = preg_replace('/--IDFORBACKTOPAGE--/', (string) $object->id, $urltogo); // New method to autoselect project after a New on another form object creation
409 409
 					if ($urltogo && empty($noback)) {
410
-						header("Location: " . $urltogo);
410
+						header("Location: ".$urltogo);
411 411
 						exit;
412 412
 					}
413 413
 				} else {
@@ -474,7 +474,7 @@  discard block
 block discarded – undo
474 474
 		// main information - begin
475 475
 		$html .= '<div class="header-card-main-information inline-block valignmiddle">';
476 476
 		// ref
477
-		$html .= '<div><strong>' . $langs->trans("Ref").' : '.dol_escape_htmltag($object->ref) . '</strong></div>';
477
+		$html .= '<div><strong>'.$langs->trans("Ref").' : '.dol_escape_htmltag($object->ref).'</strong></div>';
478 478
 		// full name
479 479
 		$fullname = '';
480 480
 		if (method_exists($object, 'getFullName')) {
@@ -485,11 +485,11 @@  discard block
 block discarded – undo
485 485
 			'@phan-var-force Adherent $object';
486 486
 			if ($object->morphy == 'mor' && !empty($object->societe)) {
487 487
 				$html .= dol_htmlentities($object->societe);
488
-				$html .= (!empty($fullname) && $object->societe != $fullname) ? ' (' . dol_htmlentities($fullname) . $addgendertxt . ')' : '';
488
+				$html .= (!empty($fullname) && $object->societe != $fullname) ? ' ('.dol_htmlentities($fullname).$addgendertxt.')' : '';
489 489
 			} else {
490
-				$html .= dol_htmlentities($fullname) . $addgendertxt;
490
+				$html .= dol_htmlentities($fullname).$addgendertxt;
491 491
 				if (empty($object->fk_soc)) {
492
-					$html .= (!empty($object->societe) && $object->societe != $fullname) ? ' (' . dol_htmlentities($object->societe) . ')' : '';
492
+					$html .= (!empty($object->societe) && $object->societe != $fullname) ? ' ('.dol_htmlentities($object->societe).')' : '';
493 493
 				}
494 494
 			}
495 495
 		} else {
@@ -579,23 +579,23 @@  discard block
 block discarded – undo
579 579
 
580 580
 			$value = $object->$key;
581 581
 
582
-			$html .= '<div class="grid field_' . $key . '">';
582
+			$html .= '<div class="grid field_'.$key.'">';
583 583
 
584
-			$html .= '<div class="' . (empty($val['tdcss']) ? '' : $val['tdcss']) . ' fieldname_' . $key;
584
+			$html .= '<div class="'.(empty($val['tdcss']) ? '' : $val['tdcss']).' fieldname_'.$key;
585 585
 			$html .= '">';
586 586
 			$labeltoshow = '';
587
-			$labeltoshow .= '<strong>' . $langs->trans($val['label']) . '</strong>';
587
+			$labeltoshow .= '<strong>'.$langs->trans($val['label']).'</strong>';
588 588
 			$html .= $labeltoshow;
589 589
 			$html .= '</div>';
590 590
 
591
-			$html .= '<div class="valuefield fieldname_' . $key;
591
+			$html .= '<div class="valuefield fieldname_'.$key;
592 592
 			if (!empty($val['cssview'])) {
593
-				$html .= ' ' . $val['cssview'];
593
+				$html .= ' '.$val['cssview'];
594 594
 			}
595 595
 			$html .= '">';
596 596
 			if ($key == 'lang') {
597 597
 				$langs->load('languages');
598
-				$labellang = ($value ? $langs->trans('Language_' . $value) : '');
598
+				$labellang = ($value ? $langs->trans('Language_'.$value) : '');
599 599
 				//$html .= picto_from_langcode($value, 'class="paddingrightonly saturatemedium opacitylow"');
600 600
 				$html .= $labellang;
601 601
 			} else {
@@ -655,7 +655,7 @@  discard block
 block discarded – undo
655 655
 				continue; // We don't want this field
656 656
 			}
657 657
 
658
-			$html .= '<div class="grid field_' . $key . '">';
658
+			$html .= '<div class="grid field_'.$key.'">';
659 659
 			$html .= '<div class="titlefieldcreate';
660 660
 			if (isset($val['notnull']) && $val['notnull'] > 0) {
661 661
 				$html .= ' required';
@@ -687,15 +687,15 @@  discard block
 block discarded – undo
687 687
 				$value = GETPOSTISSET($key) ? GETPOST($key, $check) : $object->$key;
688 688
 			} elseif (in_array($val['type'], array('date', 'datetime'))) {
689 689
 				$isPostDate = GETPOSTISSET($key);
690
-				$isPostTime = GETPOSTISSET($key . '_time');
690
+				$isPostTime = GETPOSTISSET($key.'_time');
691 691
 				if ($isPostDate) {
692 692
 					$postDate = GETPOST($key, 'alphanohtml');
693 693
 					if ($isPostTime) {
694
-						$postTime = GETPOST($key . '_time', 'alphanohtml') . ':00';
694
+						$postTime = GETPOST($key.'_time', 'alphanohtml').':00';
695 695
 					} else {
696 696
 						$postTime = '00:00:00';
697 697
 					}
698
-					$valueDateTimeStr = $postDate . ' ' . $postTime;
698
+					$valueDateTimeStr = $postDate.' '.$postTime;
699 699
 				} else {
700 700
 					// format date timestamp to YYYY-MM-DD HH:ii:ss
701 701
 					$valueDateTimeStr = dol_print_date($object->$key, '%Y-%m-%d %H:%M:%S');
@@ -767,19 +767,19 @@  discard block
 block discarded – undo
767 767
 			$html .= '<article>';
768 768
 			//$html .= load_fiche_titre($title, '', 'object_'.$object->picto);
769 769
 			$html .= '<header>';
770
-			$html .= '<h2>' . $title . '</h2>';
770
+			$html .= '<h2>'.$title.'</h2>';
771 771
 			$html .= '</header>';
772 772
 
773 773
 			$url_file = $context->getControllerUrl($context->controller, '', false);
774
-			$html .= '<form method="POST" action="' . $url_file . '">';
774
+			$html .= '<form method="POST" action="'.$url_file.'">';
775 775
 			$html .= $context->getFormToken();
776 776
 			$html .= '<input type="hidden" name="action" value="update">';
777
-			$html .= '<input type="hidden" name="id" value="' . $object->id . '">';
777
+			$html .= '<input type="hidden" name="id" value="'.$object->id.'">';
778 778
 			if ($backtopage) {
779
-				$html .= '<input type="hidden" name="backtopage" value="' . $backtopage . '">';
779
+				$html .= '<input type="hidden" name="backtopage" value="'.$backtopage.'">';
780 780
 			}
781 781
 			if ($backtopageforcancel) {
782
-				$html .= '<input type="hidden" name="backtopageforcancel" value="' . $backtopageforcancel . '">';
782
+				$html .= '<input type="hidden" name="backtopageforcancel" value="'.$backtopageforcancel.'">';
783 783
 			}
784 784
 
785 785
 			//$html .= '<table>'."\n";
@@ -793,8 +793,8 @@  discard block
 block discarded – undo
793 793
 
794 794
 			// Save and Cancel buttons
795 795
 			$html .= '<div class="grid">';
796
-			$html .= '<div><input type="submit" name="save" role="button" value="' . dol_escape_htmltag($langs->trans('Save')) . '" /></div>';
797
-			$html .= '<div><input type="submit" name="cancel" role="button" value="' . dol_escape_htmltag($langs->trans('Cancel')) . '" /></div>';
796
+			$html .= '<div><input type="submit" name="save" role="button" value="'.dol_escape_htmltag($langs->trans('Save')).'" /></div>';
797
+			$html .= '<div><input type="submit" name="cancel" role="button" value="'.dol_escape_htmltag($langs->trans('Cancel')).'" /></div>';
798 798
 			$html .= '</div>';
799 799
 
800 800
 			$html .= '</form>';
@@ -835,7 +835,7 @@  discard block
 block discarded – undo
835 835
 
836 836
 			// Buttons for actions
837 837
 			if ($action != 'presend' && $action != 'editline') {
838
-				$html .= '<div>' . "\n";
838
+				$html .= '<div>'."\n";
839 839
 				$parameters = array();
840 840
 				$reshook = $hookmanager->executeHooks('addMoreActionsButtons', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
841 841
 				if ($reshook < 0) {
@@ -845,10 +845,10 @@  discard block
 block discarded – undo
845 845
 				if (empty($reshook)) {
846 846
 					if ($permissiontoadd) {
847 847
 						$url_file = $context->getControllerUrl($context->controller, '', false);
848
-						$html .= '<a href="' . $url_file . '&id=' . $object->id . '&action=edit" role="button">' . $langs->trans('Modify') . '</a>';
848
+						$html .= '<a href="'.$url_file.'&id='.$object->id.'&action=edit" role="button">'.$langs->trans('Modify').'</a>';
849 849
 					}
850 850
 				}
851
-				$html .= '</div>' . "\n";
851
+				$html .= '</div>'."\n";
852 852
 			}
853 853
 		}
854 854
 
Please login to merge, or discard this patch.
htdocs/knowledgemanagement/knowledgerecord_card.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
 $contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'knowledgerecordcard'; // To manage different context of search
46 46
 $backtopage = GETPOST('backtopage', 'alpha');
47 47
 $backtopageforcancel = GETPOST('backtopageforcancel', 'alpha');
48
-$lineid   = GETPOSTINT('lineid');
48
+$lineid = GETPOSTINT('lineid');
49 49
 
50 50
 // Initialize a technical objects
51 51
 $object = new KnowledgeRecord($db);
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
 $permissiontoread = $user->hasRight('knowledgemanagement', 'knowledgerecord', 'read');
79 79
 $permissiontoadd = $user->hasRight('knowledgemanagement', 'knowledgerecord', 'write'); // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php
80 80
 $permissiontodelete = $user->hasRight('knowledgemanagement', 'knowledgerecord', 'delete') || ($permissiontoadd && isset($object->status) && $object->status == $object::STATUS_DRAFT);
81
-$permissiontovalidate =  ((!getDolGlobalString('MAIN_USE_ADVANCED_PERMS') && $permissiontoadd) || (getDolGlobalString('MAIN_USE_ADVANCED_PERMS') && $user->hasRight('knowledgemanagement', 'knowledgerecord_advance', 'validate')));
81
+$permissiontovalidate = ((!getDolGlobalString('MAIN_USE_ADVANCED_PERMS') && $permissiontoadd) || (getDolGlobalString('MAIN_USE_ADVANCED_PERMS') && $user->hasRight('knowledgemanagement', 'knowledgerecord_advance', 'validate')));
82 82
 $permissionnote = $user->hasRight('knowledgemanagement', 'knowledgerecord', 'write'); // Used by the include of actions_setnotes.inc.php
83 83
 $permissiondellink = $user->hasRight('knowledgemanagement', 'knowledgerecord', 'write'); // Used by the include of actions_dellink.inc.php
84 84
 $upload_dir = $conf->knowledgemanagement->multidir_output[isset($object->entity) ? $object->entity : 1];
@@ -426,7 +426,7 @@  discard block
 block discarded – undo
426 426
 	print '<table class="border centpercent tableforfield">'."\n";
427 427
 
428 428
 	// Common attributes
429
-	$keyforbreak = 'fk_c_ticket_category';	// We change column just before this field
429
+	$keyforbreak = 'fk_c_ticket_category'; // We change column just before this field
430 430
 	//unset($object->fields['fk_project']);				// Hide field already shown in banner
431 431
 	//unset($object->fields['fk_soc']);					// Hide field already shown in banner
432 432
 	$object->fields['answer']['enabled'] = 0;
Please login to merge, or discard this patch.
htdocs/comm/action/card.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
 $offsetunit = GETPOST('offsetunittype_duration', 'aZ09');
75 75
 $remindertype = GETPOST('selectremindertype', 'aZ09');
76 76
 $modelmail = GETPOSTINT('actioncommsendmodel_mail');
77
-$complete = GETPOST('complete', 'alpha');	// 'na' must be allowed
77
+$complete = GETPOST('complete', 'alpha'); // 'na' must be allowed
78 78
 $private = GETPOST('private', 'alphanohtml');
79 79
 if ($complete == 'na' || $complete == -2) {
80 80
 	$complete = -1;
@@ -332,7 +332,7 @@  discard block
 block discarded – undo
332 332
 		$datef = dol_mktime(GETPOSTINT("p2hour"), GETPOSTINT("p2min"), GETPOSTINT("apsec"), GETPOSTINT("p2month"), GETPOSTINT("p2day"), GETPOSTINT("p2year"), 'tzuserrel');
333 333
 	}
334 334
 	//set end date to now if percentage is set to 100 and end date not set
335
-	$datef = (!$datef && $percentage == 100)?dol_now():$datef;
335
+	$datef = (!$datef && $percentage == 100) ?dol_now() : $datef;
336 336
 
337 337
 	// Check parameters
338 338
 	if (!$datef && $percentage == 100) {
@@ -614,12 +614,12 @@  discard block
 block discarded – undo
614 614
 			if ($selectedrecurrulefreq == 'WEEKLY' && !empty($selectedrecurrulebyday)) {
615 615
 				$firstdatearray = dol_get_first_day_week(GETPOSTINT("apday"), GETPOSTINT("apmonth"), GETPOSTINT("apyear"));
616 616
 				$datep = dol_mktime($fulldayevent ? '00' : GETPOSTINT("aphour"), $fulldayevent ? '00' : GETPOSTINT("apmin"), $fulldayevent ? '00' : GETPOSTINT("apsec"), $firstdatearray['month'], $firstdatearray['first_day'], $firstdatearray['year'], $tzforfullday ? $tzforfullday : 'tzuserrel');
617
-				$datep = dol_time_plus_duree($datep, $selectedrecurrulebyday + 6, 'd');//We begin the week after
617
+				$datep = dol_time_plus_duree($datep, $selectedrecurrulebyday + 6, 'd'); //We begin the week after
618 618
 				$dayoffset = 7;
619 619
 				$monthoffset = 0;
620 620
 			} elseif ($selectedrecurrulefreq == 'MONTHLY' && !empty($selectedrecurrulebymonthday)) {
621 621
 				$firstday = $selectedrecurrulebymonthday;
622
-				$firstmonth = GETPOST("apday") > $selectedrecurrulebymonthday ? GETPOSTINT("apmonth") + 1 : GETPOSTINT("apmonth");//We begin the week after
622
+				$firstmonth = GETPOST("apday") > $selectedrecurrulebymonthday ? GETPOSTINT("apmonth") + 1 : GETPOSTINT("apmonth"); //We begin the week after
623 623
 				$datep = dol_mktime($fulldayevent ? '00' : GETPOSTINT("aphour"), $fulldayevent ? '00' : GETPOSTINT("apmin"), $fulldayevent ? '00' : GETPOSTINT("apsec"), $firstmonth, $firstday, GETPOSTINT("apyear"), $tzforfullday ? $tzforfullday : 'tzuserrel');
624 624
 				$dayoffset = 0;
625 625
 				$monthoffset = 1;
@@ -724,9 +724,9 @@  discard block
 block discarded – undo
724 724
 
725 725
 				// increment date for recurrent events
726 726
 				$datep = dol_time_plus_duree($datep, $dayoffset, 'd');
727
-				$datep = dol_time_plus_duree($datep, $monthoffset, 'm');  // @phan-suppress-current-line PhanPluginSuspiciousParamOrder
727
+				$datep = dol_time_plus_duree($datep, $monthoffset, 'm'); // @phan-suppress-current-line PhanPluginSuspiciousParamOrder
728 728
 				$datef = dol_time_plus_duree($datef, $dayoffset, 'd');
729
-				$datef = dol_time_plus_duree($datef, $monthoffset, 'm');  // @phan-suppress-current-line PhanPluginSuspiciousParamOrder
729
+				$datef = dol_time_plus_duree($datef, $monthoffset, 'm'); // @phan-suppress-current-line PhanPluginSuspiciousParamOrder
730 730
 			}
731 731
 		}
732 732
 		if (!empty($backtopage) && !$error) {
@@ -1068,7 +1068,7 @@  discard block
 block discarded – undo
1068 1068
 if (empty($reshook) && GETPOST('actionmove', 'alpha') == 'mupdate') {
1069 1069
 	$error = 0;
1070 1070
 
1071
-	$shour = (int) dol_print_date($object->datep, "%H", 'tzuserrel');		// We take the date visible by user $newdate is also date visible by user.
1071
+	$shour = (int) dol_print_date($object->datep, "%H", 'tzuserrel'); // We take the date visible by user $newdate is also date visible by user.
1072 1072
 	$smin = (int) dol_print_date($object->datep, "%M", 'tzuserrel');
1073 1073
 
1074 1074
 	$newdate = GETPOST('newdate', 'alpha');
@@ -1242,7 +1242,7 @@  discard block
 block discarded – undo
1242 1242
 								if (new_startdate > old_enddate) {
1243 1243
 									var timeDiff = old_enddate - old_startdate;
1244 1244
 									var new_enddate = new Date(new_startdate.getTime() + timeDiff);
1245
-									$("#p2").val(formatDate(new_enddate, "' . $langs->trans('FormatDateShortJavaInput') . '"));
1245
+									$("#p2").val(formatDate(new_enddate, "' . $langs->trans('FormatDateShortJavaInput').'"));
1246 1246
 									$("#p2day").val(new_enddate.getDate());
1247 1247
 									$("#p2month").val(new_enddate.getMonth() + 1);
1248 1248
 									$("#p2year").val(new_enddate.getFullYear());
@@ -1300,7 +1300,7 @@  discard block
 block discarded – undo
1300 1300
 		$default = getDolGlobalString('AGENDA_USE_EVENT_TYPE_DEFAULT', 'AC_RDV');
1301 1301
 		print img_picto($langs->trans("ActionType"), 'square', 'class="fawidth30 inline-block" style="color: #ddd;"');
1302 1302
 		$selectedvalue = GETPOSTISSET("actioncode") ? GETPOST("actioncode", 'aZ09') : ($object->type_code ? $object->type_code : $default);
1303
-		print $formactions->select_type_actions($selectedvalue, "actioncode", "systemauto", 0, -1, 0, 1);	// TODO Replace 0 with -2 in onlyautoornot
1303
+		print $formactions->select_type_actions($selectedvalue, "actioncode", "systemauto", 0, -1, 0, 1); // TODO Replace 0 with -2 in onlyautoornot
1304 1304
 		print '</td></tr>';
1305 1305
 	}
1306 1306
 
@@ -1631,7 +1631,7 @@  discard block
 block discarded – undo
1631 1631
 		}
1632 1632
 		//var_dump('origin='.$origin.' originid='.$originid.' hasPermissionOnLinkedObject='.$hasPermissionOnLinkedObject);
1633 1633
 
1634
-		if (! in_array($origin, array('societe', 'project', 'task', 'user'))) {
1634
+		if (!in_array($origin, array('societe', 'project', 'task', 'user'))) {
1635 1635
 			// We do not use link for object that already contains a hard coded field to make links with agenda events
1636 1636
 			print '<tr><td class="titlefieldcreate">'.$langs->trans("LinkedObject").'</td>';
1637 1637
 			print '<td colspan="3">';
@@ -1782,7 +1782,7 @@  discard block
 block discarded – undo
1782 1782
 			$object->socpeopleassigned[$id] = array('id' => $tmpid);
1783 1783
 		}
1784 1784
 		$object->contact_id   = GETPOSTINT("contactid");
1785
-		$object->fk_project  = GETPOSTINT("projectid");
1785
+		$object->fk_project = GETPOSTINT("projectid");
1786 1786
 
1787 1787
 		$object->note_private = GETPOST("note", 'restricthtml');
1788 1788
 	}
@@ -1856,7 +1856,7 @@  discard block
 block discarded – undo
1856 1856
 									if (new_startdate > old_enddate) {
1857 1857
 										var timeDiff = old_enddate - old_startdate;
1858 1858
 										var new_enddate = new Date(new_startdate.getTime() + timeDiff);
1859
-										$("#p2").val(formatDate(new_enddate, "' . $langs->trans('FormatDateShortJavaInput') . '"));
1859
+										$("#p2").val(formatDate(new_enddate, "' . $langs->trans('FormatDateShortJavaInput').'"));
1860 1860
 										$("#p2day").val(new_enddate.getDate());
1861 1861
 										$("#p2month").val(new_enddate.getMonth() + 1);
1862 1862
 										$("#p2year").val(new_enddate.getFullYear());
@@ -1881,7 +1881,7 @@  discard block
 block discarded – undo
1881 1881
 		if ($backtopage) {
1882 1882
 			print '<input type="hidden" name="backtopage" value="'.($backtopage != '1' ? $backtopage : '').'">';
1883 1883
 		}
1884
-		if (!getDolGlobalString('AGENDA_USE_EVENT_TYPE') && ! preg_match('/^TICKET_MSG_PRIVATE/', $object->code)) {
1884
+		if (!getDolGlobalString('AGENDA_USE_EVENT_TYPE') && !preg_match('/^TICKET_MSG_PRIVATE/', $object->code)) {
1885 1885
 			print '<input type="hidden" name="actioncode" value="'.$object->type_code.'">';
1886 1886
 		}
1887 1887
 
@@ -2269,7 +2269,7 @@  discard block
 block discarded – undo
2269 2269
                    })';
2270 2270
 			print '</script>'."\n";
2271 2271
 
2272
-			print '</div>';		// End of div for reminderparameters
2272
+			print '</div>'; // End of div for reminderparameters
2273 2273
 		}
2274 2274
 
2275 2275
 		print dol_get_fiche_end();
@@ -2541,7 +2541,7 @@  discard block
 block discarded – undo
2541 2541
 
2542 2542
 		// Priority
2543 2543
 		if (getDolGlobalString('AGENDA_SUPPORT_PRIORITY_IN_EVENTS')) {
2544
-			print '<tr><td class="nowrap" class="titlefield">' . $langs->trans("Priority") . '</td><td>';
2544
+			print '<tr><td class="nowrap" class="titlefield">'.$langs->trans("Priority").'</td><td>';
2545 2545
 			print($object->priority ? $object->priority : '');
2546 2546
 			print '</td></tr>';
2547 2547
 		}
Please login to merge, or discard this patch.
htdocs/modulebuilder/template/ajax/myobject.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -85,9 +85,9 @@
 block discarded – undo
85 85
 	$result = $object->update($user);
86 86
 
87 87
 	if ($result < 0) {
88
-		print json_encode(['status' => 'error', 'message' => 'Error updating '. $field]);
88
+		print json_encode(['status' => 'error', 'message' => 'Error updating '.$field]);
89 89
 	} else {
90
-		print json_encode(['status' => 'success', 'message' => $field . ' updated successfully']);
90
+		print json_encode(['status' => 'success', 'message' => $field.' updated successfully']);
91 91
 	}
92 92
 }
93 93
 
Please login to merge, or discard this patch.
htdocs/eventorganization/core/actions_massactions_mail.inc.php 1 patch
Spacing   +29 added lines, -29 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
 	$nbsent = 0;
73 73
 	$nbignored = 0;
74 74
 	$langs->load("mails");
75
-	include_once DOL_DOCUMENT_ROOT . '/core/lib/files.lib.php';
75
+	include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
76 76
 
77 77
 	$listofobjectid = array();
78 78
 
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
 	$listofselectedid = array();
83 83
 	$listofselectedref = array();
84 84
 	if (!$error) {
85
-		require_once DOL_DOCUMENT_ROOT . '/eventorganization/class/conferenceorboothattendee.class.php';
85
+		require_once DOL_DOCUMENT_ROOT.'/eventorganization/class/conferenceorboothattendee.class.php';
86 86
 		$attendee = new ConferenceOrBoothAttendee($db);
87 87
 		$objecttmp = new $objectclass($db);
88 88
 		'@phan-var-force CommonObject $objecttmp';
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
 			$sendtoid = array();
143 143
 
144 144
 			// Define $sendto
145
-			$sendto = $attendees->thirdparty->name . '<' . trim($attendees->email) . '>';
145
+			$sendto = $attendees->thirdparty->name.'<'.trim($attendees->email).'>';
146 146
 
147 147
 			// Define $sendtocc
148 148
 			$receivercc = GETPOST('receivercc', 'alphawithlgt');
@@ -165,9 +165,9 @@  discard block
 block discarded – undo
165 165
 			$reg = array();
166 166
 			$fromtype = GETPOST('fromtype');
167 167
 			if ($fromtype === 'user') {
168
-				$from = $user->getFullName($langs) . ' <' . $user->email . '>';
168
+				$from = $user->getFullName($langs).' <'.$user->email.'>';
169 169
 			} elseif ($fromtype === 'company') {
170
-				$from = getDolGlobalString('MAIN_INFO_SOCIETE_NOM') . ' <' . getDolGlobalString('MAIN_INFO_SOCIETE_MAIL') . '>';
170
+				$from = getDolGlobalString('MAIN_INFO_SOCIETE_NOM').' <'.getDolGlobalString('MAIN_INFO_SOCIETE_MAIL').'>';
171 171
 			} elseif (preg_match('/user_aliases_(\d+)/', $fromtype, $reg)) {
172 172
 				$tmp = explode(',', $user->email_aliases);
173 173
 				$from = trim($tmp[((int) $reg[1] - 1)]);
@@ -175,14 +175,14 @@  discard block
 block discarded – undo
175 175
 				$tmp = explode(',', getDolGlobalString('MAIN_INFO_SOCIETE_MAIL_ALIASES'));
176 176
 				$from = trim($tmp[((int) $reg[1] - 1)]);
177 177
 			} elseif (preg_match('/senderprofile_(\d+)_(\d+)/', $fromtype, $reg)) {
178
-				$sql = "SELECT rowid, label, email FROM " . MAIN_DB_PREFIX . "c_email_senderprofile WHERE rowid = " . (int) $reg[1];
178
+				$sql = "SELECT rowid, label, email FROM ".MAIN_DB_PREFIX."c_email_senderprofile WHERE rowid = ".(int) $reg[1];
179 179
 				$resql = $db->query($sql);
180 180
 				$obj = $db->fetch_object($resql);
181 181
 				if ($obj) {
182
-					$from = dol_string_nospecial($obj->label, ' ', array(",")) . ' <' . $obj->email . '>';
182
+					$from = dol_string_nospecial($obj->label, ' ', array(",")).' <'.$obj->email.'>';
183 183
 				}
184 184
 			} else {
185
-				$from = dol_string_nospecial(GETPOST('fromname'), ' ', array(",")) . ' <' . GETPOST('frommail') . '>';
185
+				$from = dol_string_nospecial(GETPOST('fromname'), ' ', array(",")).' <'.GETPOST('frommail').'>';
186 186
 			}
187 187
 
188 188
 			$replyto = $from;
@@ -198,12 +198,12 @@  discard block
 block discarded – undo
198 198
 			$html_link = null;
199 199
 
200 200
 			if (getDolGlobalString('MAIN_AGENDA_XCAL_EXPORTKEY')) {
201
-				$urlwithouturlroot = preg_replace('/' . preg_quote(DOL_URL_ROOT, '/') . '$/i', '', trim($dolibarr_main_url_root));
202
-				$urlwithroot = $urlwithouturlroot . DOL_URL_ROOT;
203
-				$url_link = $urlwithroot . '/public/agenda/agendaexport.php?format=ical' . ($conf->entity > 1 ? "&entity=" . $conf->entity : "");
204
-				$url_link .= '&exportkey=' . ($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY ? urlencode(getDolGlobalString('MAIN_AGENDA_XCAL_EXPORTKEY')) : '...');
205
-				$url_link .= "&project=" . $listofselectedref[$email]->fk_project . '&module=' . urlencode('@eventorganization') . '&status=' . ConferenceOrBooth::STATUS_CONFIRMED;
206
-				$html_link = '<a href="' . $url_link . '">' . $langs->trans('DownloadICSLink') . '</a>';
201
+				$urlwithouturlroot = preg_replace('/'.preg_quote(DOL_URL_ROOT, '/').'$/i', '', trim($dolibarr_main_url_root));
202
+				$urlwithroot = $urlwithouturlroot.DOL_URL_ROOT;
203
+				$url_link = $urlwithroot.'/public/agenda/agendaexport.php?format=ical'.($conf->entity > 1 ? "&entity=".$conf->entity : "");
204
+				$url_link .= '&exportkey='.($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY ? urlencode(getDolGlobalString('MAIN_AGENDA_XCAL_EXPORTKEY')) : '...');
205
+				$url_link .= "&project=".$listofselectedref[$email]->fk_project.'&module='.urlencode('@eventorganization').'&status='.ConferenceOrBooth::STATUS_CONFIRMED;
206
+				$html_link = '<a href="'.$url_link.'">'.$langs->trans('DownloadICSLink').'</a>';
207 207
 			}
208 208
 			$substitutionarray['__EVENTORGANIZATION_ICS_LINK__'] = $html_link;
209 209
 			$substitutionarray['__EVENTORGANIZATION_URL_LINK__'] = $url_link;
@@ -225,25 +225,25 @@  discard block
 block discarded – undo
225 225
 			}
226 226
 
227 227
 			// Send mail (substitutionarray must be done just before this)
228
-			require_once DOL_DOCUMENT_ROOT . '/core/class/CMailFile.class.php';
228
+			require_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php';
229 229
 			$mailfile = new CMailFile($subjectreplaced, $sendto, $from, $messagereplaced, array(), array(), array(), $sendtocc, $sendtobcc, $deliveryreceipt, -1, '', '', "attendees_".$attendees->id, '', $sendcontext);
230 230
 			if ($mailfile->error) {
231
-				$resaction .= '<div class="error">' . $mailfile->error . '</div>';
231
+				$resaction .= '<div class="error">'.$mailfile->error.'</div>';
232 232
 			} else {
233 233
 				$result = $mailfile->sendfile();
234 234
 				if ($result) {
235
-					$resaction .= $langs->trans('MailSuccessfulySent', $mailfile->getValidAddress($from, 2), $mailfile->getValidAddress($sendto, 2)) . '<br>'; // Must not contain "
235
+					$resaction .= $langs->trans('MailSuccessfulySent', $mailfile->getValidAddress($from, 2), $mailfile->getValidAddress($sendto, 2)).'<br>'; // Must not contain "
236 236
 					$error = 0;
237 237
 
238
-					dol_syslog("Try to insert email event into agenda for objid=" . $attendees->id . " => objectobj=" . get_class($attendees));
238
+					dol_syslog("Try to insert email event into agenda for objid=".$attendees->id." => objectobj=".get_class($attendees));
239 239
 
240 240
 					$actionmsg = $langs->transnoentities('MailSentByTo', $from, $sendto);
241 241
 					if ($message) {
242 242
 						if ($sendtocc) {
243
-							$actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('Bcc') . ": " . $sendtocc);
243
+							$actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('Bcc').": ".$sendtocc);
244 244
 						}
245
-						$actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('MailTopic') . ": " . $subjectreplaced);
246
-						$actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('TextUsedInTheMessageBody') . ":");
245
+						$actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('MailTopic').": ".$subjectreplaced);
246
+						$actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('TextUsedInTheMessageBody').":");
247 247
 						$actionmsg = dol_concatdesc($actionmsg, $messagereplaced);
248 248
 					}
249 249
 					$actionmsg2 = '';
@@ -266,7 +266,7 @@  discard block
 block discarded – undo
266 266
 
267 267
 						if ($error) {
268 268
 							setEventMessages($db->lasterror(), $objectobj2->errors, 'errors');
269
-							dol_syslog("Error in trigger " . $triggername . ' ' . $db->lasterror(), LOG_ERR);
269
+							dol_syslog("Error in trigger ".$triggername.' '.$db->lasterror(), LOG_ERR);
270 270
 						}
271 271
 					}
272 272
 
@@ -275,26 +275,26 @@  discard block
 block discarded – undo
275 275
 					$langs->load("other");
276 276
 					if ($mailfile->error) {
277 277
 						$resaction .= $langs->trans('ErrorFailedToSendMail', $from, $sendto);
278
-						$resaction .= '<br><div class="error">' . $mailfile->error . '</div>';
278
+						$resaction .= '<br><div class="error">'.$mailfile->error.'</div>';
279 279
 					} elseif (getDolGlobalString('MAIN_DISABLE_ALL_MAILS')) {
280 280
 						$resaction .= '<div class="warning">No mail sent. Feature is disabled by option MAIN_DISABLE_ALL_MAILS</div>';
281 281
 					} else {
282
-						$resaction .= $langs->trans('ErrorFailedToSendMail', $from, $sendto) . '<br><div class="error">(unhandled error)</div>';
282
+						$resaction .= $langs->trans('ErrorFailedToSendMail', $from, $sendto).'<br><div class="error">(unhandled error)</div>';
283 283
 					}
284 284
 				}
285 285
 			}
286 286
 		}  // foreach ($listofselectedid as $email => $attendees)
287 287
 	}
288 288
 	$resaction .= ($resaction ? '<br>' : $resaction);
289
-	$resaction .= '<strong>' . $langs->trans("ResultOfMailSending") . ':</strong><br>' . "\n";
290
-	$resaction .= $langs->trans("NbSelected") . ': ' . count($toselect) . "\n<br>";
291
-	$resaction .= $langs->trans("NbIgnored") . ': ' . ($nbignored ? $nbignored : 0) . "\n<br>";
292
-	$resaction .= $langs->trans("NbSent") . ': ' . ($nbsent ? $nbsent : 0) . "\n<br>";
289
+	$resaction .= '<strong>'.$langs->trans("ResultOfMailSending").':</strong><br>'."\n";
290
+	$resaction .= $langs->trans("NbSelected").': '.count($toselect)."\n<br>";
291
+	$resaction .= $langs->trans("NbIgnored").': '.($nbignored ? $nbignored : 0)."\n<br>";
292
+	$resaction .= $langs->trans("NbSent").': '.($nbsent ? $nbsent : 0)."\n<br>";
293 293
 
294 294
 	if ($nbsent) {
295 295
 		$action = ''; // Do not show form post if there was at least one successful sent
296 296
 		//setEventMessages($langs->trans("EMailSentToNRecipients", $nbsent.'/'.count($toselect)), null, 'mesgs');
297
-		setEventMessages($langs->trans("EMailSentForNElements", $nbsent . '/' . count($toselect)), null, 'mesgs');
297
+		setEventMessages($langs->trans("EMailSentForNElements", $nbsent.'/'.count($toselect)), null, 'mesgs');
298 298
 		setEventMessages($resaction, null, 'mesgs');
299 299
 	} else {
300 300
 		//setEventMessages($langs->trans("EMailSentToNRecipients", 0), null, 'warnings');  // May be object has no generated PDF file
Please login to merge, or discard this patch.