Completed
Branch develop (b61ff7)
by
unknown
23:00
created
htdocs/bookcal/calendar_card.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -48,14 +48,14 @@  discard block
 block discarded – undo
48 48
 // Get parameters
49 49
 $id = GETPOSTINT('id');
50 50
 $ref = GETPOST('ref', 'alpha');
51
-$lineid   = GETPOSTINT('lineid');
51
+$lineid = GETPOSTINT('lineid');
52 52
 
53 53
 $action = GETPOST('action', 'aZ09');
54 54
 $confirm = GETPOST('confirm', 'alpha');
55 55
 $cancel = GETPOST('cancel', 'alpha');
56 56
 $contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : str_replace('_', '', basename(dirname(__FILE__)).basename(__FILE__, '.php')); // To manage different context of search
57
-$backtopage = GETPOST('backtopage', 'alpha');					// if not set, a default page will be used
58
-$backtopageforcancel = GETPOST('backtopageforcancel', 'alpha');	// if not set, $backtopage will be used
57
+$backtopage = GETPOST('backtopage', 'alpha'); // if not set, a default page will be used
58
+$backtopageforcancel = GETPOST('backtopageforcancel', 'alpha'); // if not set, $backtopage will be used
59 59
 $dol_openinpopup = GETPOST('dol_openinpopup', 'aZ09');
60 60
 
61 61
 // Initialize a technical objects
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
 // Load object
86 86
 include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be 'include', not 'include_once'.
87 87
 
88
-$object->entity	= ((GETPOSTISSET('entity') && GETPOST('entity') != '') ? GETPOSTINT('entity') : $conf->entity);
88
+$object->entity = ((GETPOSTISSET('entity') && GETPOST('entity') != '') ? GETPOSTINT('entity') : $conf->entity);
89 89
 
90 90
 // There is several ways to check permission.
91 91
 // Set $enablepermissioncheck to 1 to enable a minimum low level of checks
Please login to merge, or discard this patch.
htdocs/webportal/class/html.formcardwebportal.class.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -25,9 +25,9 @@  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';
29
-require_once DOL_DOCUMENT_ROOT . '/webportal/class/webportalfieldsmanager.class.php';
30
-require_once DOL_DOCUMENT_ROOT . '/core/class/extrafields.class.php';
28
+require_once DOL_DOCUMENT_ROOT.'/webportal/class/html.formwebportal.class.php';
29
+require_once DOL_DOCUMENT_ROOT.'/webportal/class/webportalfieldsmanager.class.php';
30
+require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
31 31
 
32 32
 /**
33 33
  *    Class to manage generation of HTML components
@@ -175,9 +175,9 @@  discard block
 block discarded – undo
175 175
 		global $hookmanager, $langs;
176 176
 
177 177
 		$elementEnUpper = strtoupper($elementEn);
178
-		$objectclass = 'WebPortal' . ucfirst($elementEn);
178
+		$objectclass = 'WebPortal'.ucfirst($elementEn);
179 179
 
180
-		$elementCardAccess = getDolGlobalString('WEBPORTAL_' . $elementEnUpper . '_CARD_ACCESS', 'hidden');
180
+		$elementCardAccess = getDolGlobalString('WEBPORTAL_'.$elementEnUpper.'_CARD_ACCESS', 'hidden');
181 181
 		if ($elementCardAccess == 'hidden' || $id <= 0) {
182 182
 			accessforbidden();
183 183
 		}
@@ -185,7 +185,7 @@  discard block
 block discarded – undo
185 185
 		$context = Context::getInstance();
186 186
 
187 187
 		// load module libraries
188
-		dol_include_once('/webportal/class/webportal' . $elementEn . '.class.php');
188
+		dol_include_once('/webportal/class/webportal'.$elementEn.'.class.php');
189 189
 
190 190
 		// Load translation files required by the page
191 191
 		$langs->loadLangs(array('website', 'other'));
@@ -196,9 +196,9 @@  discard block
 block discarded – undo
196 196
 		$action = GETPOST('action', 'aZ09');
197 197
 		$confirm = GETPOST('confirm', 'alpha');
198 198
 		$cancel = GETPOST('cancel');
199
-		$contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'webportal' . $elementEn . 'card'; // To manage different context of search
200
-		$backtopage = GETPOST('backtopage', 'alpha');                    // if not set, a default page will be used
201
-		$backtopageforcancel = GETPOST('backtopageforcancel', 'alpha');    // if not set, $backtopage will be used
199
+		$contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'webportal'.$elementEn.'card'; // To manage different context of search
200
+		$backtopage = GETPOST('backtopage', 'alpha'); // if not set, a default page will be used
201
+		$backtopageforcancel = GETPOST('backtopageforcancel', 'alpha'); // if not set, $backtopage will be used
202 202
 		$modal = GETPOSTINT('modal') == 1;
203 203
 
204 204
 		// Initialize a technical objects
@@ -206,7 +206,7 @@  discard block
 block discarded – undo
206 206
 		'@phan-var-force CommonObject $object';
207 207
 		/** @var CommonObject $object */
208 208
 		//$extrafields = new ExtraFields($db);
209
-		$hookmanager->initHooks(array('webportal' . $elementEn . 'card', 'globalcard')); // Note that conf->hooks_modules contains array
209
+		$hookmanager->initHooks(array('webportal'.$elementEn.'card', 'globalcard')); // Note that conf->hooks_modules contains array
210 210
 
211 211
 		// Fetch optionals attributes and labels
212 212
 		$this->extrafields = new ExtraFields($this->db);
@@ -231,7 +231,7 @@  discard block
 block discarded – undo
231 231
 				} else {
232 232
 					if (empty($object->error) && !count($object->errors)) {
233 233
 						if ($ret < 0) {    // if $ret == 0, it means not found.
234
-							$context->setEventMessages('Fetch on object (type ' . get_class($object) . ') return an error without filling $object->error nor $object->errors', null, 'errors');
234
+							$context->setEventMessages('Fetch on object (type '.get_class($object).') return an error without filling $object->error nor $object->errors', null, 'errors');
235 235
 						}
236 236
 					} else {
237 237
 						$context->setEventMessages($object->error, $object->errors, 'errors');
@@ -262,7 +262,7 @@  discard block
 block discarded – undo
262 262
 		$this->permissiontodelete = $permissiontodelete;
263 263
 		$this->permissionnote = $permissionnote;
264 264
 		$this->permissiondellink = $permissiondellink;
265
-		$this->titleKey = $objectclass . 'CardTitle';
265
+		$this->titleKey = $objectclass.'CardTitle';
266 266
 		$this->ref = $ref;
267 267
 		$this->modal = $modal;
268 268
 	}
@@ -292,17 +292,17 @@  discard block
 block discarded – undo
292 292
 
293 293
 		if (empty($backtopage) || ($cancel && empty($id))) {
294 294
 			if (empty($backtopage) || ($cancel && strpos($backtopage, '__ID__'))) {
295
-				$backtopage = $context->getControllerUrl($elementEn . 'card');
295
+				$backtopage = $context->getControllerUrl($elementEn.'card');
296 296
 			}
297 297
 		}
298 298
 
299 299
 		// Action to cancel record
300 300
 		if ($cancel) {
301 301
 			if (!empty($backtopageforcancel)) {
302
-				header("Location: " . $backtopageforcancel);
302
+				header("Location: ".$backtopageforcancel);
303 303
 				exit;
304 304
 			} elseif (!empty($backtopage)) {
305
-				header("Location: " . $backtopage);
305
+				header("Location: ".$backtopage);
306 306
 				exit;
307 307
 			}
308 308
 			$action = '';
@@ -335,7 +335,7 @@  discard block
 block discarded – undo
335 335
 				$urltogo = $backtopage ? str_replace('__ID__', (string) $object->id, $backtopage) : $backurlforlist;
336 336
 				$urltogo = preg_replace('/--IDFORBACKTOPAGE--/', (string) $object->id, $urltogo); // New method to autoselect project after a New on another form object creation
337 337
 				if ($urltogo && empty($noback)) {
338
-					header("Location: " . $urltogo);
338
+					header("Location: ".$urltogo);
339 339
 					exit;
340 340
 				}
341 341
 			}
Please login to merge, or discard this patch.
htdocs/projet/tasks/time.php 1 patch
Spacing   +174 added lines, -174 removed lines patch added patch discarded remove patch
@@ -44,14 +44,14 @@  discard block
 block discarded – undo
44 44
 '
45 45
 @phan-var-force ?string $uploaddir
46 46
 ';
47
-require_once DOL_DOCUMENT_ROOT . '/projet/class/project.class.php';
48
-require_once DOL_DOCUMENT_ROOT . '/projet/class/task.class.php';
49
-require_once DOL_DOCUMENT_ROOT . '/compta/facture/class/facture.class.php';
50
-require_once DOL_DOCUMENT_ROOT . '/core/lib/project.lib.php';
51
-require_once DOL_DOCUMENT_ROOT . '/core/lib/date.lib.php';
52
-require_once DOL_DOCUMENT_ROOT . '/core/class/html.formother.class.php';
53
-require_once DOL_DOCUMENT_ROOT . '/core/class/html.formprojet.class.php';
54
-require_once DOL_DOCUMENT_ROOT . '/core/class/html.formintervention.class.php';
47
+require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
48
+require_once DOL_DOCUMENT_ROOT.'/projet/class/task.class.php';
49
+require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
50
+require_once DOL_DOCUMENT_ROOT.'/core/lib/project.lib.php';
51
+require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
52
+require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
53
+require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php';
54
+require_once DOL_DOCUMENT_ROOT.'/core/class/html.formintervention.class.php';
55 55
 
56 56
 // Load translation files required by the page
57 57
 $langsLoad = array('projects', 'bills', 'orders', 'companies');
@@ -71,9 +71,9 @@  discard block
 block discarded – undo
71 71
 $optioncss = GETPOST('optioncss', 'alpha');
72 72
 $mode = GETPOST('mode', 'alpha');
73 73
 
74
-$id = GETPOSTINT('id');						// Id of task
75
-$projectid = GETPOSTINT('projectid');		// Id of project
76
-$lineid = GETPOSTINT('lineid');				// Id of time spent line
74
+$id = GETPOSTINT('id'); // Id of task
75
+$projectid = GETPOSTINT('projectid'); // Id of project
76
+$lineid = GETPOSTINT('lineid'); // Id of time spent line
77 77
 $ref = GETPOST('ref', 'alpha');
78 78
 $withproject = GETPOSTINT('withproject');
79 79
 $project_ref = GETPOST('project_ref', 'alpha');
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
 	setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
181 181
 }
182 182
 
183
-include DOL_DOCUMENT_ROOT . '/core/actions_changeselectedfields.inc.php';
183
+include DOL_DOCUMENT_ROOT.'/core/actions_changeselectedfields.inc.php';
184 184
 
185 185
 // Purge search criteria
186 186
 if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x', 'alpha') || GETPOST('button_removefilter', 'alpha')) { // All tests are required to be compatible with all browsers
@@ -291,7 +291,7 @@  discard block
 block discarded – undo
291 291
 
292 292
 	if (!$error) {
293 293
 		if ($id && GETPOSTINT('taskid') != $id) {      // GETPOSTINT('taskid') is the id of new task
294
-			$id_temp = GETPOSTINT('taskid'); 	// should not overwrite $id
294
+			$id_temp = GETPOSTINT('taskid'); // should not overwrite $id
295 295
 
296 296
 			$object->fetchTimeSpent($lineid);
297 297
 
@@ -326,7 +326,7 @@  discard block
 block discarded – undo
326 326
 				}
327 327
 			}
328 328
 		} else {
329
-			$object->fetch($id, $ref);	// $object is Task
329
+			$object->fetch($id, $ref); // $object is Task
330 330
 
331 331
 			$object->fetchTimeSpent(GETPOSTINT('lineid'));
332 332
 
@@ -369,10 +369,10 @@  discard block
 block discarded – undo
369 369
 }
370 370
 
371 371
 if ($action == 'confirm_deleteline' && $confirm == "yes" && ($user->hasRight('projet', 'time') || $user->hasRight('projet', 'all', 'creer'))) {
372
-	$object->fetchTimeSpent(GETPOSTINT('lineid'));    // load properties like $object->timespent_xxx
372
+	$object->fetchTimeSpent(GETPOSTINT('lineid')); // load properties like $object->timespent_xxx
373 373
 
374 374
 	if (in_array($object->timespent_fk_user, $childids) || $user->hasRight('projet', 'all', 'creer')) {
375
-		$result = $object->delTimeSpent($user);    // delete line with $object->timespent_id
375
+		$result = $object->delTimeSpent($user); // delete line with $object->timespent_id
376 376
 
377 377
 		if ($result < 0) {
378 378
 			$langs->load("errors");
@@ -392,7 +392,7 @@  discard block
 block discarded – undo
392 392
 		if (count($tasksarray) > 0) {
393 393
 			$id = $tasksarray[0]->id;
394 394
 		} else {
395
-			header("Location: " . DOL_URL_ROOT . '/projet/tasks.php?id=' . $projectstatic->id . ($withproject ? '&withproject=1' : '') . (empty($mode) ? '' : '&mode=' . $mode));
395
+			header("Location: ".DOL_URL_ROOT.'/projet/tasks.php?id='.$projectstatic->id.($withproject ? '&withproject=1' : '').(empty($mode) ? '' : '&mode='.$mode));
396 396
 			exit;
397 397
 		}
398 398
 	}
@@ -431,9 +431,9 @@  discard block
 block discarded – undo
431 431
 	if (!($projectstatic->thirdparty->id > 0)) {
432 432
 		setEventMessages($langs->trans("ThirdPartyRequiredToGenerateInvoice"), null, 'errors');
433 433
 	} else {
434
-		include_once DOL_DOCUMENT_ROOT . '/compta/facture/class/facture.class.php';
435
-		include_once DOL_DOCUMENT_ROOT . '/projet/class/project.class.php';
436
-		include_once DOL_DOCUMENT_ROOT . '/product/class/product.class.php';
434
+		include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
435
+		include_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
436
+		include_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
437 437
 
438 438
 		$tmpinvoice = new Facture($db);
439 439
 		$tmptimespent = new Task($db);
@@ -499,7 +499,7 @@  discard block
 block discarded – undo
499 499
 				$arrayoftasks = array();
500 500
 				foreach ($toselect as $key => $value) {
501 501
 					// Get userid, timepent
502
-					$object->fetchTimeSpent($value);    // $value is ID of 1 line in timespent table
502
+					$object->fetchTimeSpent($value); // $value is ID of 1 line in timespent table
503 503
 					$arrayoftasks[$object->timespent_fk_user][(int) $object->timespent_fk_product]['timespent'] += $object->timespent_duration;
504 504
 					$arrayoftasks[$object->timespent_fk_user][(int) $object->timespent_fk_product]['totalvaluetodivideby3600'] += ($object->timespent_duration * $object->timespent_thm);
505 505
 				}
@@ -572,7 +572,7 @@  discard block
 block discarded – undo
572 572
 						}
573 573
 
574 574
 						// Add lines
575
-						$lineid = $tmpinvoice->addline($langs->trans("TimeSpentForInvoice", $username) . ' : ' . $qtyhourtext, $pu_htline, round($qtyhour / $prodDurationHours, 2), $txtvaline, $localtax1line, $localtax2line, ($idprodline > 0 ? $idprodline : 0), (float) $remiseproject);
575
+						$lineid = $tmpinvoice->addline($langs->trans("TimeSpentForInvoice", $username).' : '.$qtyhourtext, $pu_htline, round($qtyhour / $prodDurationHours, 2), $txtvaline, $localtax1line, $localtax2line, ($idprodline > 0 ? $idprodline : 0), (float) $remiseproject);
576 576
 						if ($lineid < 0) {
577 577
 							$error++;
578 578
 							setEventMessages(null, $tmpinvoice->errors, 'errors');
@@ -605,16 +605,16 @@  discard block
 block discarded – undo
605 605
 
606 606
 					$arrayoftasks[$object->timespent_id]['timespent'] = $object->timespent_duration;
607 607
 					$arrayoftasks[$object->timespent_id]['totalvaluetodivideby3600'] = $object->timespent_duration * $object->timespent_thm;
608
-					$arrayoftasks[$object->timespent_id]['note'] = $ftask->ref . ' - ' . $ftask->label . ' - ' . $username;
608
+					$arrayoftasks[$object->timespent_id]['note'] = $ftask->ref.' - '.$ftask->label.' - '.$username;
609 609
 					$arrayoftasks[$object->timespent_id]['note'] = dol_concatdesc($arrayoftasks[$object->timespent_id]['note'], $object->timespent_note);
610 610
 
611 611
 					if (!empty($withdetail)) {
612 612
 						if (!empty($object->timespent_withhour)) {
613
-							$arrayoftasks[$object->timespent_id]['note'] = dol_concatdesc($arrayoftasks[$object->timespent_id]['note'], $langs->trans("Date") . ': ' . dol_print_date($object->timespent_datehour));
613
+							$arrayoftasks[$object->timespent_id]['note'] = dol_concatdesc($arrayoftasks[$object->timespent_id]['note'], $langs->trans("Date").': '.dol_print_date($object->timespent_datehour));
614 614
 						} else {
615
-							$arrayoftasks[$object->timespent_id]['note'] = dol_concatdesc($arrayoftasks[$object->timespent_id]['note'], $langs->trans("Date") . ': ' . dol_print_date($object->timespent_date));
615
+							$arrayoftasks[$object->timespent_id]['note'] = dol_concatdesc($arrayoftasks[$object->timespent_id]['note'], $langs->trans("Date").': '.dol_print_date($object->timespent_date));
616 616
 						}
617
-						$arrayoftasks[$object->timespent_id]['note'] = dol_concatdesc($arrayoftasks[$object->timespent_id]['note'], $langs->trans("Duration") . ': ' . convertSecondToTime($object->timespent_duration, 'all', $conf->global->MAIN_DURATION_OF_WORKDAY));
617
+						$arrayoftasks[$object->timespent_id]['note'] = dol_concatdesc($arrayoftasks[$object->timespent_id]['note'], $langs->trans("Duration").': '.convertSecondToTime($object->timespent_duration, 'all', $conf->global->MAIN_DURATION_OF_WORKDAY));
618 618
 					}
619 619
 					$arrayoftasks[$object->timespent_id]['user'] = $object->timespent_fk_user;
620 620
 					$arrayoftasks[$object->timespent_id]['fk_product'] = $object->timespent_fk_product;
@@ -692,7 +692,7 @@  discard block
 block discarded – undo
692 692
 				$arrayoftasks = array();
693 693
 				foreach ($toselect as $key => $value) {
694 694
 					// Get userid, timepent
695
-					$object->fetchTimeSpent($value);        // Call method to get list of timespent for a timespent line id (We use the utility method found into Task object)
695
+					$object->fetchTimeSpent($value); // Call method to get list of timespent for a timespent line id (We use the utility method found into Task object)
696 696
 					// $object->id is now the task id
697 697
 					$arrayoftasks[$object->id][(int) $object->timespent_fk_product]['timespent'] += $object->timespent_duration;
698 698
 					$arrayoftasks[$object->id][(int) $object->timespent_fk_product]['totalvaluetodivideby3600'] += ($object->timespent_duration * $object->timespent_thm);
@@ -768,7 +768,7 @@  discard block
 block discarded – undo
768 768
 						// Add lines
769 769
 						$date_start = '';
770 770
 						$date_end = '';
771
-						$lineName = $ftask->ref . ' - ' . $ftask->label;
771
+						$lineName = $ftask->ref.' - '.$ftask->label;
772 772
 						$lineid = $tmpinvoice->addline($lineName, (float) $pu_ht_for_task, (float) price2num($qtyhour / $prodDurationHours, 'MS'), $txtvaline, $localtax1line, $localtax2line, ($idprodline > 0 ? $idprodline : 0), (float) $remiseproject, $date_start, $date_end, 0, 0, 0, 'HT', 0, 1, -1, 0, '', 0, 0, 0, $pa_ht);
773 773
 						if ($lineid < 0) {
774 774
 							$error++;
@@ -778,8 +778,8 @@  discard block
 block discarded – undo
778 778
 
779 779
 						if (!$error) {
780 780
 							// Update lineid into line of timespent
781
-							$sql = 'UPDATE ' . MAIN_DB_PREFIX . 'element_time SET invoice_line_id = ' . ((int) $lineid) . ', invoice_id = ' . ((int) $tmpinvoice->id);
782
-							$sql .= ' WHERE rowid IN (' . $db->sanitize(implode(',', $toselect)) . ')';
781
+							$sql = 'UPDATE '.MAIN_DB_PREFIX.'element_time SET invoice_line_id = '.((int) $lineid).', invoice_id = '.((int) $tmpinvoice->id);
782
+							$sql .= ' WHERE rowid IN ('.$db->sanitize(implode(',', $toselect)).')';
783 783
 							$result = $db->query($sql);
784 784
 							if (!$result) {
785 785
 								$error++;
@@ -815,12 +815,12 @@  discard block
 block discarded – undo
815 815
 	if (!($projectstatic->thirdparty->id > 0)) {
816 816
 		setEventMessages($langs->trans("ThirdPartyRequiredToGenerateIntervention"), null, 'errors');
817 817
 	} else {
818
-		include_once DOL_DOCUMENT_ROOT . '/compta/facture/class/facture.class.php';
819
-		include_once DOL_DOCUMENT_ROOT . '/projet/class/project.class.php';
820
-		include_once DOL_DOCUMENT_ROOT . '/product/class/product.class.php';
818
+		include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
819
+		include_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
820
+		include_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
821 821
 
822 822
 
823
-		require_once DOL_DOCUMENT_ROOT . '/fichinter/class/fichinter.class.php';
823
+		require_once DOL_DOCUMENT_ROOT.'/fichinter/class/fichinter.class.php';
824 824
 		$tmpinter = new Fichinter($db);
825 825
 		$tmptimespent = new Task($db);
826 826
 		$fuser = new User($db);
@@ -832,7 +832,7 @@  discard block
 block discarded – undo
832 832
 		$tmpinter->socid = $projectstatic->thirdparty->id;
833 833
 		$tmpinter->date = dol_mktime(GETPOSTINT('rehour'), GETPOSTINT('remin'), GETPOSTINT('resec'), GETPOSTINT('remonth'), GETPOSTINT('reday'), GETPOSTINT('reyear'));
834 834
 		$tmpinter->fk_project = $projectstatic->id;
835
-		$tmpinter->description = $projectstatic->title . (!empty($projectstatic->description) ? '-' . $projectstatic->label : '');
835
+		$tmpinter->description = $projectstatic->title.(!empty($projectstatic->description) ? '-'.$projectstatic->label : '');
836 836
 
837 837
 		if ($interToUse) {
838 838
 			$tmpinter->fetch($interToUse);
@@ -865,7 +865,7 @@  discard block
 block discarded – undo
865 865
 				$qtyhourtext = convertSecondToTime($value['timespent'], 'all', $conf->global->MAIN_DURATION_OF_WORKDAY);
866 866
 
867 867
 				// Add lines
868
-				$lineid = $tmpinter->addline($user, $tmpinter->id, $ftask->label . (!empty($value['note']) ? ' - ' . $value['note'] : ''), (int) $value['date'], $value['timespent']);
868
+				$lineid = $tmpinter->addline($user, $tmpinter->id, $ftask->label.(!empty($value['note']) ? ' - '.$value['note'] : ''), (int) $value['date'], $value['timespent']);
869 869
 
870 870
 				if ($lineid > 0) {
871 871
 					// Link timespent to intervention
@@ -909,9 +909,9 @@  discard block
 block discarded – undo
909 909
 //$result = $projectstatic->fetch($object->fk_project);
910 910
 $arrayofselected = is_array($toselect) ? $toselect : array();
911 911
 
912
-$title = $object->ref . ' - ' . $langs->trans("TimeSpent");
912
+$title = $object->ref.' - '.$langs->trans("TimeSpent");
913 913
 if (!empty($withproject)) {
914
-	$title .= ' | ' . $langs->trans("Project") . (!empty($projectstatic->ref) ? ': ' . $projectstatic->ref : '');
914
+	$title .= ' | '.$langs->trans("Project").(!empty($projectstatic->ref) ? ': '.$projectstatic->ref : '');
915 915
 }
916 916
 $help_url = '';
917 917
 
@@ -920,13 +920,13 @@  discard block
 block discarded – undo
920 920
 
921 921
 $param = ((!empty($mode) && $mode == 'mine') ? '&mode=mine' : '');
922 922
 if ($search_user) {
923
-	$param .= '&search_user=' . ((int) $search_user);
923
+	$param .= '&search_user='.((int) $search_user);
924 924
 }
925 925
 if ($search_month) {
926
-	$param .= '&search_month=' . ((int) $search_month);
926
+	$param .= '&search_month='.((int) $search_month);
927 927
 }
928 928
 if ($search_year) {
929
-	$param .= '&search_year=' . ((int) $search_year);
929
+	$param .= '&search_year='.((int) $search_year);
930 930
 }
931 931
 
932 932
 
@@ -978,14 +978,14 @@  discard block
 block discarded – undo
978 978
 			$morehtmlref .= $projectstatic->title;
979 979
 			// Thirdparty
980 980
 			if (!empty($projectstatic->thirdparty->id) && $projectstatic->thirdparty->id > 0) {
981
-				$morehtmlref .= '<br>' . $projectstatic->thirdparty->getNomUrl(1, 'project');
981
+				$morehtmlref .= '<br>'.$projectstatic->thirdparty->getNomUrl(1, 'project');
982 982
 			}
983 983
 			$morehtmlref .= '</div>';
984 984
 
985 985
 			// Define a complementary filter for search of next/prev ref.
986 986
 			if (!$user->hasRight('projet', 'all', 'lire')) {
987 987
 				$objectsListId = $projectstatic->getProjectsAuthorizedForUser($user, 0, 0);
988
-				$projectstatic->next_prev_filter = "rowid:IN:" . $db->sanitize(count($objectsListId) ? implode(',', array_keys($objectsListId)) : '0');
988
+				$projectstatic->next_prev_filter = "rowid:IN:".$db->sanitize(count($objectsListId) ? implode(',', array_keys($objectsListId)) : '0');
989 989
 			}
990 990
 
991 991
 			dol_banner_tab($projectstatic, 'project_ref', $linkback, 1, 'ref', 'ref', $morehtmlref, $param);
@@ -1003,25 +1003,25 @@  discard block
 block discarded – undo
1003 1003
 				print '</td>';
1004 1004
 				print '<td>';
1005 1005
 				if (getDolGlobalString('PROJECT_USE_OPPORTUNITIES')) {
1006
-					print '<input type="checkbox" disabled name="usage_opportunity"' . (GETPOSTISSET('usage_opportunity') ? (GETPOST('usage_opportunity', 'alpha') != '' ? ' checked="checked"' : '') : ($projectstatic->usage_opportunity ? ' checked="checked"' : '')) . '"> ';
1006
+					print '<input type="checkbox" disabled name="usage_opportunity"'.(GETPOSTISSET('usage_opportunity') ? (GETPOST('usage_opportunity', 'alpha') != '' ? ' checked="checked"' : '') : ($projectstatic->usage_opportunity ? ' checked="checked"' : '')).'"> ';
1007 1007
 					$htmltext = $langs->trans("ProjectFollowOpportunity");
1008 1008
 					print $form->textwithpicto($langs->trans("ProjectFollowOpportunity"), $htmltext);
1009 1009
 					print '<br>';
1010 1010
 				}
1011 1011
 				if (!getDolGlobalString('PROJECT_HIDE_TASKS')) {
1012
-					print '<input type="checkbox" disabled name="usage_task"' . (GETPOSTISSET('usage_task') ? (GETPOST('usage_task', 'alpha') != '' ? ' checked="checked"' : '') : ($projectstatic->usage_task ? ' checked="checked"' : '')) . '"> ';
1012
+					print '<input type="checkbox" disabled name="usage_task"'.(GETPOSTISSET('usage_task') ? (GETPOST('usage_task', 'alpha') != '' ? ' checked="checked"' : '') : ($projectstatic->usage_task ? ' checked="checked"' : '')).'"> ';
1013 1013
 					$htmltext = $langs->trans("ProjectFollowTasks");
1014 1014
 					print $form->textwithpicto($langs->trans("ProjectFollowTasks"), $htmltext);
1015 1015
 					print '<br>';
1016 1016
 				}
1017 1017
 				if (!getDolGlobalString('PROJECT_HIDE_TASKS') && getDolGlobalString('PROJECT_BILL_TIME_SPENT')) {
1018
-					print '<input type="checkbox" disabled name="usage_bill_time"' . (GETPOSTISSET('usage_bill_time') ? (GETPOST('usage_bill_time', 'alpha') != '' ? ' checked="checked"' : '') : ($projectstatic->usage_bill_time ? ' checked="checked"' : '')) . '"> ';
1018
+					print '<input type="checkbox" disabled name="usage_bill_time"'.(GETPOSTISSET('usage_bill_time') ? (GETPOST('usage_bill_time', 'alpha') != '' ? ' checked="checked"' : '') : ($projectstatic->usage_bill_time ? ' checked="checked"' : '')).'"> ';
1019 1019
 					$htmltext = $langs->trans("ProjectBillTimeDescription");
1020 1020
 					print $form->textwithpicto($langs->trans("BillTime"), $htmltext);
1021 1021
 					print '<br>';
1022 1022
 				}
1023 1023
 				if (isModEnabled('eventorganization')) {
1024
-					print '<input type="checkbox" disabled name="usage_organize_event"' . (GETPOSTISSET('usage_organize_event') ? (GETPOST('usage_organize_event', 'alpha') != '' ? ' checked="checked"' : '') : ($projectstatic->usage_organize_event ? ' checked="checked"' : '')) . '"> ';
1024
+					print '<input type="checkbox" disabled name="usage_organize_event"'.(GETPOSTISSET('usage_organize_event') ? (GETPOST('usage_organize_event', 'alpha') != '' ? ' checked="checked"' : '') : ($projectstatic->usage_organize_event ? ' checked="checked"' : '')).'"> ';
1025 1025
 					$htmltext = $langs->trans("EventOrganizationDescriptionLong");
1026 1026
 					print $form->textwithpicto($langs->trans("ManageOrganizeEvent"), $htmltext);
1027 1027
 				}
@@ -1029,14 +1029,14 @@  discard block
 block discarded – undo
1029 1029
 			}
1030 1030
 
1031 1031
 			// Budget
1032
-			print '<tr><td>' . $langs->trans("Budget") . '</td><td>';
1032
+			print '<tr><td>'.$langs->trans("Budget").'</td><td>';
1033 1033
 			if (!is_null($projectstatic->budget_amount) && strcmp($projectstatic->budget_amount, '')) {
1034
-				print '<span class="amount">' . price($projectstatic->budget_amount, 0, $langs, 1, 0, 0, $conf->currency) . '</span>';
1034
+				print '<span class="amount">'.price($projectstatic->budget_amount, 0, $langs, 1, 0, 0, $conf->currency).'</span>';
1035 1035
 			}
1036 1036
 			print '</td></tr>';
1037 1037
 
1038 1038
 			// Date start - end project
1039
-			print '<tr><td>' . $langs->trans("Dates") . '</td><td>';
1039
+			print '<tr><td>'.$langs->trans("Dates").'</td><td>';
1040 1040
 			$start = dol_print_date($projectstatic->date_start, 'day');
1041 1041
 			print($start ? $start : '?');
1042 1042
 			$end = dol_print_date($projectstatic->date_end, 'day');
@@ -1048,7 +1048,7 @@  discard block
 block discarded – undo
1048 1048
 			print '</td></tr>';
1049 1049
 
1050 1050
 			// Visibility
1051
-			print '<tr><td class="titlefield">' . $langs->trans("Visibility") . '</td><td>';
1051
+			print '<tr><td class="titlefield">'.$langs->trans("Visibility").'</td><td>';
1052 1052
 			if ($projectstatic->public) {
1053 1053
 				print img_picto($langs->trans('SharedProject'), 'world', 'class="paddingrightonly"');
1054 1054
 				print $langs->trans('SharedProject');
@@ -1062,7 +1062,7 @@  discard block
 block discarded – undo
1062 1062
 			$cols = 2;
1063 1063
 			$savobject = $object;
1064 1064
 			$object = $projectstatic;
1065
-			include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_view.tpl.php';
1065
+			include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php';
1066 1066
 			$object = $savobject;
1067 1067
 
1068 1068
 			print '</table>';
@@ -1075,7 +1075,7 @@  discard block
 block discarded – undo
1075 1075
 
1076 1076
 			// Categories
1077 1077
 			if (isModEnabled('category')) {
1078
-				print '<tr><td class="valignmiddle">' . $langs->trans("Categories") . '</td><td>';
1078
+				print '<tr><td class="valignmiddle">'.$langs->trans("Categories").'</td><td>';
1079 1079
 				print $form->showCategories($projectstatic->id, 'project', 1);
1080 1080
 				print "</td></tr>";
1081 1081
 			}
@@ -1112,12 +1112,12 @@  discard block
 block discarded – undo
1112 1112
 
1113 1113
 				if (!empty($projectidforalltimes)) {
1114 1114
 					// We are on tab 'Time Spent' of project
1115
-					$backtourl = $_SERVER['PHP_SELF'] . '?projectid=' . $projectstatic->id . ($withproject ? '&withproject=1' : '');
1116
-					$linktocreatetimeUrl = $_SERVER['PHP_SELF'] . '?' . ($withproject ? 'withproject=1' : '') . '&projectid=' . $projectstatic->id . '&action=createtime&token=' . newToken() . $param . '&backtopage=' . urlencode($backtourl);
1115
+					$backtourl = $_SERVER['PHP_SELF'].'?projectid='.$projectstatic->id.($withproject ? '&withproject=1' : '');
1116
+					$linktocreatetimeUrl = $_SERVER['PHP_SELF'].'?'.($withproject ? 'withproject=1' : '').'&projectid='.$projectstatic->id.'&action=createtime&token='.newToken().$param.'&backtopage='.urlencode($backtourl);
1117 1117
 				} else {
1118 1118
 					// We are on tab 'Time Spent' of task
1119
-					$backtourl = $_SERVER['PHP_SELF'] . '?id=' . $object->id . ($withproject ? '&withproject=1' : '');
1120
-					$linktocreatetimeUrl = $_SERVER['PHP_SELF'] . '?' . ($withproject ? 'withproject=1' : '') . ($object->id > 0 ? '&id=' . $object->id : '&projectid=' . $projectstatic->id) . '&action=createtime&token=' . newToken() . $param . '&backtopage=' . urlencode($backtourl);
1119
+					$backtourl = $_SERVER['PHP_SELF'].'?id='.$object->id.($withproject ? '&withproject=1' : '');
1120
+					$linktocreatetimeUrl = $_SERVER['PHP_SELF'].'?'.($withproject ? 'withproject=1' : '').($object->id > 0 ? '&id='.$object->id : '&projectid='.$projectstatic->id).'&action=createtime&token='.newToken().$param.'&backtopage='.urlencode($backtourl);
1121 1121
 				}
1122 1122
 			} else {
1123 1123
 				$linktocreatetimeBtnStatus = -2;
@@ -1162,18 +1162,18 @@  discard block
 block discarded – undo
1162 1162
 		$head = task_prepare_head($object);
1163 1163
 		print dol_get_fiche_head($head, 'task_time', $langs->trans("Task"), -1, 'projecttask', 0, '', 'reposition');
1164 1164
 
1165
-		$linkback = $withproject ? '<a href="' . DOL_URL_ROOT . '/projet/tasks.php?id=' . $projectstatic->id . '">' . $langs->trans("BackToList") . '</a>' : '';
1165
+		$linkback = $withproject ? '<a href="'.DOL_URL_ROOT.'/projet/tasks.php?id='.$projectstatic->id.'">'.$langs->trans("BackToList").'</a>' : '';
1166 1166
 
1167 1167
 		if ($action == 'deleteline') {
1168
-			$urlafterconfirm = $_SERVER["PHP_SELF"] . "?" . ($object->id > 0 ? "id=" . $object->id : 'projectid=' . $projectstatic->id) . '&lineid=' . GETPOSTINT("lineid") . $param;
1168
+			$urlafterconfirm = $_SERVER["PHP_SELF"]."?".($object->id > 0 ? "id=".$object->id : 'projectid='.$projectstatic->id).'&lineid='.GETPOSTINT("lineid").$param;
1169 1169
 			$formconfirm .= $form->formconfirm($urlafterconfirm, $langs->trans("DeleteATimeSpent"), $langs->trans("ConfirmDeleteATimeSpent"), "confirm_deleteline", '', '', 1);
1170 1170
 		}
1171 1171
 
1172 1172
 		if (!GETPOST('withproject') || empty($projectstatic->id)) {
1173 1173
 			$projectsListId = $projectstatic->getProjectsAuthorizedForUser($user, 0, 1);
1174
-			$object->next_prev_filter = "fk_projet:IN:" . $db->sanitize($projectsListId);
1174
+			$object->next_prev_filter = "fk_projet:IN:".$db->sanitize($projectsListId);
1175 1175
 		} else {
1176
-			$object->next_prev_filter = "fk_projet:=:" . ((int) $projectstatic->id);
1176
+			$object->next_prev_filter = "fk_projet:=:".((int) $projectstatic->id);
1177 1177
 		}
1178 1178
 
1179 1179
 		$morehtmlref = '';
@@ -1181,12 +1181,12 @@  discard block
 block discarded – undo
1181 1181
 		// Project
1182 1182
 		if (empty($withproject)) {
1183 1183
 			$morehtmlref .= '<div class="refidno">';
1184
-			$morehtmlref .= $langs->trans("Project") . ': ';
1184
+			$morehtmlref .= $langs->trans("Project").': ';
1185 1185
 			$morehtmlref .= $projectstatic->getNomUrl(1);
1186 1186
 			$morehtmlref .= '<br>';
1187 1187
 
1188 1188
 			// Third party
1189
-			$morehtmlref .= $langs->trans("ThirdParty") . ': ';
1189
+			$morehtmlref .= $langs->trans("ThirdParty").': ';
1190 1190
 			if (!empty($projectstatic->thirdparty) && is_object($projectstatic->thirdparty)) {
1191 1191
 				$morehtmlref .= $projectstatic->thirdparty->getNomUrl(1);
1192 1192
 			}
@@ -1202,7 +1202,7 @@  discard block
 block discarded – undo
1202 1202
 		print '<table class="border centpercent tableforfield">';
1203 1203
 
1204 1204
 		// Task parent
1205
-		print '<tr><td>' . $langs->trans("ChildOfTask") . '</td><td>';
1205
+		print '<tr><td>'.$langs->trans("ChildOfTask").'</td><td>';
1206 1206
 		if ($object->fk_task_parent > 0) {
1207 1207
 			$tasktmp = new Task($db);
1208 1208
 			$tasktmp->fetch($object->fk_task_parent);
@@ -1211,7 +1211,7 @@  discard block
 block discarded – undo
1211 1211
 		print '</td></tr>';
1212 1212
 
1213 1213
 		// Date start - Date end task
1214
-		print '<tr><td class="titlefield">' . $langs->trans("DateStart") . ' - ' . $langs->trans("Deadline") . '</td><td>';
1214
+		print '<tr><td class="titlefield">'.$langs->trans("DateStart").' - '.$langs->trans("Deadline").'</td><td>';
1215 1215
 		$start = dol_print_date($object->date_start, 'dayhour');
1216 1216
 		print($start ? $start : '?');
1217 1217
 		$end = dol_print_date($object->date_end, 'dayhour');
@@ -1223,7 +1223,7 @@  discard block
 block discarded – undo
1223 1223
 		print '</td></tr>';
1224 1224
 
1225 1225
 		// Planned workload
1226
-		print '<tr><td>' . $langs->trans("PlannedWorkload") . '</td><td>';
1226
+		print '<tr><td>'.$langs->trans("PlannedWorkload").'</td><td>';
1227 1227
 		if ($object->planned_workload) {
1228 1228
 			print convertSecondToTime($object->planned_workload, 'allhourmin');
1229 1229
 		}
@@ -1238,21 +1238,21 @@  discard block
 block discarded – undo
1238 1238
 		print '<table class="border tableforfield centpercent">';
1239 1239
 
1240 1240
 		// Progress declared
1241
-		print '<tr><td class="titlefield">' . $langs->trans("ProgressDeclared") . '</td><td>';
1242
-		print $object->progress != '' ? $object->progress . ' %' : '';
1241
+		print '<tr><td class="titlefield">'.$langs->trans("ProgressDeclared").'</td><td>';
1242
+		print $object->progress != '' ? $object->progress.' %' : '';
1243 1243
 		print '</td></tr>';
1244 1244
 
1245 1245
 		// Progress calculated
1246
-		print '<tr><td>' . $langs->trans("ProgressCalculated") . '</td><td>';
1246
+		print '<tr><td>'.$langs->trans("ProgressCalculated").'</td><td>';
1247 1247
 		if ($object->planned_workload) {
1248 1248
 			$tmparray = $object->getSummaryOfTimeSpent();
1249 1249
 			if ($tmparray['total_duration'] > 0) {
1250
-				print round($tmparray['total_duration'] / $object->planned_workload * 100, 2) . ' %';
1250
+				print round($tmparray['total_duration'] / $object->planned_workload * 100, 2).' %';
1251 1251
 			} else {
1252 1252
 				print '0 %';
1253 1253
 			}
1254 1254
 		} else {
1255
-			print '<span class="opacitymedium">' . $langs->trans("WorkloadNotDefined") . '</span>';
1255
+			print '<span class="opacitymedium">'.$langs->trans("WorkloadNotDefined").'</span>';
1256 1256
 		}
1257 1257
 		print '</td>';
1258 1258
 
@@ -1268,7 +1268,7 @@  discard block
 block discarded – undo
1268 1268
 		print dol_get_fiche_end();
1269 1269
 	} else {
1270 1270
 		if ($action == 'deleteline') {
1271
-			$urlafterconfirm = $_SERVER["PHP_SELF"] . "?" . ($projectstatic->id > 0 ? 'projectid=' . $projectstatic->id : ($object->id > 0 ? "id=" . $object->id : '')) . '&lineid=' . GETPOSTINT("lineid") . ($withproject ? '&withproject=1' : ''). "&contextpage=" . urlencode($contextpage).$param;
1271
+			$urlafterconfirm = $_SERVER["PHP_SELF"]."?".($projectstatic->id > 0 ? 'projectid='.$projectstatic->id : ($object->id > 0 ? "id=".$object->id : '')).'&lineid='.GETPOSTINT("lineid").($withproject ? '&withproject=1' : '')."&contextpage=".urlencode($contextpage).$param;
1272 1272
 			$formconfirm .= $form->formconfirm($urlafterconfirm, $langs->trans("DeleteATimeSpent"), $langs->trans("ConfirmDeleteATimeSpent"), "confirm_deleteline", '', '', 1);
1273 1273
 		}
1274 1274
 	}
@@ -1293,10 +1293,10 @@  discard block
 block discarded – undo
1293 1293
 		// Definition of fields for list
1294 1294
 		$arrayfields = array();
1295 1295
 		$arrayfields['t.element_date'] = array('label' => $langs->trans("Date"), 'checked' => '1');
1296
-		$arrayfields['p.fk_soc'] = array('label' => $langs->trans("ThirdParty"), 'type' => 'integer:Societe:/societe/class/societe.class.php:1','checked' => '1');
1296
+		$arrayfields['p.fk_soc'] = array('label' => $langs->trans("ThirdParty"), 'type' => 'integer:Societe:/societe/class/societe.class.php:1', 'checked' => '1');
1297 1297
 		$arrayfields['s.name_alias'] = array('label' => $langs->trans("AliasNameShort"), 'type' => 'integer:Societe:/societe/class/societe.class.php:1');
1298 1298
 		if ((empty($id) && empty($ref)) || !empty($projectidforalltimes)) {	// Not a dedicated task
1299
-			if (! empty($allprojectforuser)) {
1299
+			if (!empty($allprojectforuser)) {
1300 1300
 				$arrayfields['p.project_ref'] = ['label' => $langs->trans('RefProject'), 'checked' => '1'];
1301 1301
 				$arrayfields['p.project_label'] = ['label' => $langs->trans('ProjectLabel'), 'checked' => '1'];
1302 1302
 			}
@@ -1312,82 +1312,82 @@  discard block
 block discarded – undo
1312 1312
 		$arrayfields['value'] = array('label' => $langs->trans("Value"), 'checked' => '1', 'enabled' => (string) (int) isModEnabled("salaries"));
1313 1313
 		$arrayfields['valuebilled'] = array('label' => $langs->trans("Billed"), 'checked' => '1', 'enabled' => (string) (int) (((getDolGlobalInt('PROJECT_HIDE_TASKS') || !getDolGlobalInt('PROJECT_BILL_TIME_SPENT')) ? 0 : 1) && $projectstatic->usage_bill_time));
1314 1314
 		// Extra fields
1315
-		include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_list_array_fields.tpl.php';
1315
+		include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_array_fields.tpl.php';
1316 1316
 
1317 1317
 		$arrayfields = dol_sort_array($arrayfields, 'position');
1318 1318
 
1319 1319
 		$param = '';
1320 1320
 		if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) {
1321
-			$param .= '&contextpage=' . urlencode($contextpage);
1321
+			$param .= '&contextpage='.urlencode($contextpage);
1322 1322
 		}
1323 1323
 		if ($limit > 0 && $limit != $conf->liste_limit) {
1324 1324
 			$param .= '&limit='.((int) $limit);
1325 1325
 		}
1326 1326
 		if ($search_month > 0) {
1327
-			$param .= '&search_month=' . urlencode((string) ($search_month));
1327
+			$param .= '&search_month='.urlencode((string) ($search_month));
1328 1328
 		}
1329 1329
 		if ($search_year > 0) {
1330
-			$param .= '&search_year=' . urlencode((string) ($search_year));
1330
+			$param .= '&search_year='.urlencode((string) ($search_year));
1331 1331
 		}
1332 1332
 		if (!empty($search_user)) { 	// We keep param if -1 because default value is forced to user id if not set
1333 1333
 			$param .= '&search_user='.urlencode($search_user);
1334 1334
 		}
1335 1335
 		if ($search_task_ref != '') {
1336
-			$param .= '&search_task_ref=' . urlencode($search_task_ref);
1336
+			$param .= '&search_task_ref='.urlencode($search_task_ref);
1337 1337
 		}
1338 1338
 		if ($search_company != '') {
1339
-			$param .= '&amp;$search_company=' . urlencode($search_company);
1339
+			$param .= '&amp;$search_company='.urlencode($search_company);
1340 1340
 		}
1341 1341
 		if ($search_company_alias != '') {
1342
-			$param .= '&amp;$search_company_alias=' . urlencode($search_company_alias);
1342
+			$param .= '&amp;$search_company_alias='.urlencode($search_company_alias);
1343 1343
 		}
1344 1344
 		if ($search_project_ref != '') {
1345
-			$param .= '&amp;$search_project_ref=' . urlencode($search_project_ref);
1345
+			$param .= '&amp;$search_project_ref='.urlencode($search_project_ref);
1346 1346
 		}
1347 1347
 		if ($search_project_label != '') {
1348
-			$param .= '&amp;$search_project_label=' . urlencode($search_project_label);
1348
+			$param .= '&amp;$search_project_label='.urlencode($search_project_label);
1349 1349
 		}
1350 1350
 		if ($search_task_label != '') {
1351
-			$param .= '&search_task_label=' . urlencode($search_task_label);
1351
+			$param .= '&search_task_label='.urlencode($search_task_label);
1352 1352
 		}
1353 1353
 		if ($search_note != '') {
1354
-			$param .= '&search_note=' . urlencode($search_note);
1354
+			$param .= '&search_note='.urlencode($search_note);
1355 1355
 		}
1356 1356
 		if ($search_duration != '') {
1357
-			$param .= '&amp;search_field2=' . urlencode((string) ($search_duration));
1357
+			$param .= '&amp;search_field2='.urlencode((string) ($search_duration));
1358 1358
 		}
1359 1359
 		if ($optioncss != '') {
1360
-			$param .= '&optioncss=' . urlencode($optioncss);
1360
+			$param .= '&optioncss='.urlencode($optioncss);
1361 1361
 		}
1362 1362
 		if ($search_date_startday) {
1363
-			$param .= '&search_date_startday=' . urlencode((string) ($search_date_startday));
1363
+			$param .= '&search_date_startday='.urlencode((string) ($search_date_startday));
1364 1364
 		}
1365 1365
 		if ($search_date_startmonth) {
1366
-			$param .= '&search_date_startmonth=' . urlencode((string) ($search_date_startmonth));
1366
+			$param .= '&search_date_startmonth='.urlencode((string) ($search_date_startmonth));
1367 1367
 		}
1368 1368
 		if ($search_date_startyear) {
1369
-			$param .= '&search_date_startyear=' . urlencode((string) ($search_date_startyear));
1369
+			$param .= '&search_date_startyear='.urlencode((string) ($search_date_startyear));
1370 1370
 		}
1371 1371
 		if ($search_date_endday) {
1372
-			$param .= '&search_date_endday=' . urlencode((string) ($search_date_endday));
1372
+			$param .= '&search_date_endday='.urlencode((string) ($search_date_endday));
1373 1373
 		}
1374 1374
 		if ($search_date_endmonth) {
1375
-			$param .= '&search_date_endmonth=' . urlencode((string) ($search_date_endmonth));
1375
+			$param .= '&search_date_endmonth='.urlencode((string) ($search_date_endmonth));
1376 1376
 		}
1377 1377
 		if ($search_date_endyear) {
1378
-			$param .= '&search_date_endyear=' . urlencode((string) ($search_date_endyear));
1378
+			$param .= '&search_date_endyear='.urlencode((string) ($search_date_endyear));
1379 1379
 		}
1380 1380
 		if ($search_timespent_starthour) {
1381
-			$param .= '&search_timespent_duration_starthour=' . urlencode((string) ($search_timespent_starthour));
1381
+			$param .= '&search_timespent_duration_starthour='.urlencode((string) ($search_timespent_starthour));
1382 1382
 		}
1383 1383
 		if ($search_timespent_startmin) {
1384
-			$param .= '&search_timespent_duration_startmin=' . urlencode((string) ($search_timespent_startmin));
1384
+			$param .= '&search_timespent_duration_startmin='.urlencode((string) ($search_timespent_startmin));
1385 1385
 		}
1386 1386
 		if ($search_timespent_endhour) {
1387
-			$param .= '&search_timespent_duration_endhour=' . urlencode((string) ($search_timespent_endhour));
1387
+			$param .= '&search_timespent_duration_endhour='.urlencode((string) ($search_timespent_endhour));
1388 1388
 		}
1389 1389
 		if ($search_timespent_endmin) {
1390
-			$param .= '&search_timespent_duration_endmin=' . urlencode((string) ($search_timespent_endmin));
1390
+			$param .= '&search_timespent_duration_endmin='.urlencode((string) ($search_timespent_endmin));
1391 1391
 		}
1392 1392
 
1393 1393
 		/*
@@ -1395,21 +1395,21 @@  discard block
 block discarded – undo
1395 1395
 		 include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php';
1396 1396
 		 */
1397 1397
 		if ($projectid) {
1398
-			$param .= '&projectid=' . urlencode((string) ($projectid));
1398
+			$param .= '&projectid='.urlencode((string) ($projectid));
1399 1399
 		}
1400 1400
 		if ($withproject) {
1401
-			$param .= '&withproject=' . urlencode((string) ($withproject));
1401
+			$param .= '&withproject='.urlencode((string) ($withproject));
1402 1402
 		}
1403 1403
 		// Add $param from hooks
1404 1404
 		$parameters = array('param' => &$param);
1405 1405
 		$reshook = $hookmanager->executeHooks('printFieldListSearchParam', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
1406 1406
 		$param .= $hookmanager->resPrint;
1407 1407
 
1408
-		print '<form method="POST" action="' . $_SERVER["PHP_SELF"] . '">';
1408
+		print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">';
1409 1409
 		if ($optioncss != '') {
1410
-			print '<input type="hidden" name="optioncss" value="' . $optioncss . '">';
1410
+			print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
1411 1411
 		}
1412
-		print '<input type="hidden" name="token" value="' . newToken() . '">';
1412
+		print '<input type="hidden" name="token" value="'.newToken().'">';
1413 1413
 		print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
1414 1414
 		if ($action == 'editline') {
1415 1415
 			print '<input type="hidden" name="action" value="updateline">';
@@ -1424,12 +1424,12 @@  discard block
 block discarded – undo
1424 1424
 		} else {
1425 1425
 			print '<input type="hidden" name="action" value="list">';
1426 1426
 		}
1427
-		print '<input type="hidden" name="sortfield" value="' . $sortfield . '">';
1428
-		print '<input type="hidden" name="sortorder" value="' . $sortorder . '">';
1427
+		print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
1428
+		print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
1429 1429
 
1430
-		print '<input type="hidden" name="projectid" value="' . $projectidforalltimes . '">';
1431
-		print '<input type="hidden" name="withproject" value="' . $withproject . '">';
1432
-		print '<input type="hidden" name="tab" value="' . $tab . '">';
1430
+		print '<input type="hidden" name="projectid" value="'.$projectidforalltimes.'">';
1431
+		print '<input type="hidden" name="withproject" value="'.$withproject.'">';
1432
+		print '<input type="hidden" name="tab" value="'.$tab.'">';
1433 1433
 		print '<input type="hidden" name="page_y" value="">';
1434 1434
 
1435 1435
 		// Form to convert time spent into invoice
@@ -1456,7 +1456,7 @@  discard block
 block discarded – undo
1456 1456
 					'onelineperperiod' => 'OneLinePerTimeSpentLine',
1457 1457
 				);
1458 1458
 				print $form->selectarray('generateinvoicemode', $tmparray, 'onelineperuser', 0, 0, 0, '', 1);
1459
-				print "\n" . '<script type="text/javascript">';
1459
+				print "\n".'<script type="text/javascript">';
1460 1460
 				print '
1461 1461
 				$(document).ready(function () {
1462 1462
 					setDetailVisibility();
@@ -1473,8 +1473,8 @@  discard block
 block discarded – undo
1473 1473
             		}
1474 1474
             	});
1475 1475
             			';
1476
-				print '</script>' . "\n";
1477
-				print '<span style="display:none" id="detail_time_duration"><input type="checkbox" value="detail" name="detail_time_duration"/>' . $langs->trans('AddDetailDateAndDuration') . '</span>';
1476
+				print '</script>'."\n";
1477
+				print '<span style="display:none" id="detail_time_duration"><input type="checkbox" value="detail" name="detail_time_duration"/>'.$langs->trans('AddDetailDateAndDuration').'</span>';
1478 1478
 				print '</td>';
1479 1479
 				print '</tr>';
1480 1480
 
@@ -1524,14 +1524,14 @@  discard block
 block discarded – undo
1524 1524
 
1525 1525
 				print '<br>';
1526 1526
 				print '<div class="center">';
1527
-				print '<input type="submit" class="button" id="createbills" name="createbills" value="' . $langs->trans('GenerateBill') . '">  ';
1528
-				print '<input type="submit" class="button button-cancel" id="cancel" name="cancel" value="' . $langs->trans("Cancel") . '">';
1527
+				print '<input type="submit" class="button" id="createbills" name="createbills" value="'.$langs->trans('GenerateBill').'">  ';
1528
+				print '<input type="submit" class="button button-cancel" id="cancel" name="cancel" value="'.$langs->trans("Cancel").'">';
1529 1529
 				print '</div>';
1530 1530
 				print '<br>';
1531 1531
 			} else {
1532
-				print '<div class="warning">' . $langs->trans("ThirdPartyRequiredToGenerateInvoice") . '</div>';
1532
+				print '<div class="warning">'.$langs->trans("ThirdPartyRequiredToGenerateInvoice").'</div>';
1533 1533
 				print '<div class="center">';
1534
-				print '<input type="submit" class="button button-cancel" id="cancel" name="cancel" value="' . $langs->trans("Cancel") . '">';
1534
+				print '<input type="submit" class="button button-cancel" id="cancel" name="cancel" value="'.$langs->trans("Cancel").'">';
1535 1535
 				print '</div>';
1536 1536
 				$massaction = '';
1537 1537
 			}
@@ -1544,7 +1544,7 @@  discard block
 block discarded – undo
1544 1544
 				print '<table class="noborder centpercent">';
1545 1545
 				print '<tr>';
1546 1546
 				print '<td class="titlefield">';
1547
-				print img_picto('', 'intervention', 'class="pictofixedwidth"') . $langs->trans('InterToUse');
1547
+				print img_picto('', 'intervention', 'class="pictofixedwidth"').$langs->trans('InterToUse');
1548 1548
 				print '</td>';
1549 1549
 				print '<td>';
1550 1550
 				$forminter = new FormIntervention($db);
@@ -1554,14 +1554,14 @@  discard block
 block discarded – undo
1554 1554
 				print '</table>';
1555 1555
 
1556 1556
 				print '<div class="center">';
1557
-				print '<input type="submit" class="button" id="createinter" name="createinter" value="' . $langs->trans('GenerateInter') . '">  ';
1558
-				print '<input type="submit" class="button" id="cancel" name="cancel" value="' . $langs->trans('Cancel') . '">';
1557
+				print '<input type="submit" class="button" id="createinter" name="createinter" value="'.$langs->trans('GenerateInter').'">  ';
1558
+				print '<input type="submit" class="button" id="cancel" name="cancel" value="'.$langs->trans('Cancel').'">';
1559 1559
 				print '</div>';
1560 1560
 				print '<br>';
1561 1561
 			} else {
1562
-				print '<div class="warning">' . $langs->trans("ThirdPartyRequiredToGenerateIntervention") . '</div>';
1562
+				print '<div class="warning">'.$langs->trans("ThirdPartyRequiredToGenerateIntervention").'</div>';
1563 1563
 				print '<div class="center">';
1564
-				print '<input type="submit" class="button" id="cancel" name="cancel" value="' . $langs->trans('Cancel') . '">';
1564
+				print '<input type="submit" class="button" id="cancel" name="cancel" value="'.$langs->trans('Cancel').'">';
1565 1565
 				print '</div>';
1566 1566
 				$massaction = '';
1567 1567
 			}
@@ -1631,14 +1631,14 @@  discard block
 block discarded – undo
1631 1631
 			$sql .= " AND t.fk_element =".((int) $object->id);
1632 1632
 		} elseif (!empty($projectidforalltimes)) {
1633 1633
 			// Limit on one project
1634
-			$sql .= " AND pt.fk_projet IN (" . $db->sanitize((string) $projectidforalltimes) . ")";
1634
+			$sql .= " AND pt.fk_projet IN (".$db->sanitize((string) $projectidforalltimes).")";
1635 1635
 		} elseif (!empty($allprojectforuser)) {
1636 1636
 			// Limit on on user
1637 1637
 			if (empty($search_user) && !empty($arrayfields['author']['checked'])) {
1638 1638
 				$search_user = $user->id;
1639 1639
 			}
1640 1640
 			if ($search_user > 0) {
1641
-				$sql .= " AND t.fk_user = " . ((int) $search_user);
1641
+				$sql .= " AND t.fk_user = ".((int) $search_user);
1642 1642
 			}
1643 1643
 		}
1644 1644
 
@@ -1691,13 +1691,13 @@  discard block
 block discarded – undo
1691 1691
 			if ($search_timespent_starthour || $search_timespent_startmin) {
1692 1692
 				$timespent_duration_start = $search_timespent_starthour * 60 * 60; // We store duration in seconds
1693 1693
 				$timespent_duration_start += ($search_timespent_startmin ? $search_timespent_startmin : 0) * 60; // We store duration in seconds
1694
-				$sql .= " AND t.element_duration >= " . $timespent_duration_start;
1694
+				$sql .= " AND t.element_duration >= ".$timespent_duration_start;
1695 1695
 			}
1696 1696
 
1697 1697
 			if ($search_timespent_endhour || $search_timespent_endmin) {
1698 1698
 				$timespent_duration_end = $search_timespent_endhour * 60 * 60; // We store duration in seconds
1699 1699
 				$timespent_duration_end += ($search_timespent_endmin ? $search_timespent_endmin : 0) * 60; // We store duration in seconds
1700
-				$sql .= " AND t.element_duration <= " . $timespent_duration_end;
1700
+				$sql .= " AND t.element_duration <= ".$timespent_duration_end;
1701 1701
 			}
1702 1702
 		}
1703 1703
 
@@ -1745,13 +1745,13 @@  discard block
 block discarded – undo
1745 1745
 
1746 1746
 		if ($num >= 0) {
1747 1747
 			if (!empty($projectidforalltimes)) {
1748
-				print '<!-- List of time spent for project -->' . "\n";
1748
+				print '<!-- List of time spent for project -->'."\n";
1749 1749
 
1750 1750
 				$title = $langs->trans("ListTaskTimeUserProject");
1751 1751
 
1752 1752
 				print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'clock', 0, $linktocreatetime, '', $limit, 0, 0, 1);
1753 1753
 			} else {
1754
-				print '<!-- List of time spent -->' . "\n";
1754
+				print '<!-- List of time spent -->'."\n";
1755 1755
 
1756 1756
 				$title = $langs->trans("ListTaskTimeForTask");
1757 1757
 
@@ -1775,26 +1775,26 @@  discard block
 block discarded – undo
1775 1775
 		 * Form to add a new line of time spent
1776 1776
 		 */
1777 1777
 		if ($action == 'createtime' && $user->hasRight('projet', 'time')) {
1778
-			print '<!-- table to add time spent -->' . "\n";
1778
+			print '<!-- table to add time spent -->'."\n";
1779 1779
 			if (!empty($id)) {
1780
-				print '<input type="hidden" name="taskid" value="' . $id . '">';
1780
+				print '<input type="hidden" name="taskid" value="'.$id.'">';
1781 1781
 			}
1782 1782
 
1783 1783
 			print '<div class="div-table-responsive-no-min">'; // You can use div-table-responsive-no-min if you don't need reserved height for your table
1784 1784
 			print '<table class="noborder nohover centpercent">';
1785 1785
 
1786 1786
 			print '<tr class="liste_titre">';
1787
-			print '<td>' . $langs->trans("Date") . '</td>';
1787
+			print '<td>'.$langs->trans("Date").'</td>';
1788 1788
 			if (!empty($allprojectforuser)) {
1789
-				print '<td>' . $langs->trans("Project") . '</td>';
1789
+				print '<td>'.$langs->trans("Project").'</td>';
1790 1790
 			}
1791 1791
 			if (empty($id)) {
1792
-				print '<td>' . $langs->trans("Task") . '</td>';
1792
+				print '<td>'.$langs->trans("Task").'</td>';
1793 1793
 			}
1794
-			print '<td>' . $langs->trans("By") . '</td>';
1795
-			print '<td>' . $langs->trans("Note") . '</td>';
1796
-			print '<td>' . $langs->trans("NewTimeSpent") . '</td>';
1797
-			print '<td>' . $langs->trans("ProgressDeclared") . '</td>';
1794
+			print '<td>'.$langs->trans("By").'</td>';
1795
+			print '<td>'.$langs->trans("Note").'</td>';
1796
+			print '<td>'.$langs->trans("NewTimeSpent").'</td>';
1797
+			print '<td>'.$langs->trans("ProgressDeclared").'</td>';
1798 1798
 			if (!getDolGlobalString('PROJECT_HIDE_TASKS') && getDolGlobalString('PROJECT_BILL_TIME_SPENT')) {
1799 1799
 				print '<td></td>';
1800 1800
 
@@ -1848,14 +1848,14 @@  discard block
 block discarded – undo
1848 1848
 				print $form->select_dolusers((GETPOSTINT('userid') ? GETPOSTINT('userid') : $userid), 'userid', 0, null, 0, '', $contactsofproject, '0', 0, 0, '', 0, $langs->trans("ResourceNotAssignedToProject"), 'minwidth150imp maxwidth200');
1849 1849
 			} else {
1850 1850
 				if ($nboftasks) {
1851
-					print img_error($langs->trans('FirstAddRessourceToAllocateTime')) . ' ' . $langs->trans('FirstAddRessourceToAllocateTime');
1851
+					print img_error($langs->trans('FirstAddRessourceToAllocateTime')).' '.$langs->trans('FirstAddRessourceToAllocateTime');
1852 1852
 				}
1853 1853
 			}
1854 1854
 			print '</td>';
1855 1855
 
1856 1856
 			// Note
1857 1857
 			print '<td>';
1858
-			print '<textarea name="timespent_note" class="maxwidth100onsmartphone" rows="' . ROWS_2 . '">' . (GETPOST('timespent_note') ? GETPOST('timespent_note') : '') . '</textarea>';
1858
+			print '<textarea name="timespent_note" class="maxwidth100onsmartphone" rows="'.ROWS_2.'">'.(GETPOST('timespent_note') ? GETPOST('timespent_note') : '').'</textarea>';
1859 1859
 			print '</td>';
1860 1860
 
1861 1861
 			// Duration - Time spent
@@ -1924,7 +1924,7 @@  discard block
 block discarded – undo
1924 1924
 
1925 1925
 		print '<!-- Liste of time spent -->'."\n";
1926 1926
 		print '<div class="div-table-responsive">';
1927
-		print '<table class="tagtable nobottomiftotal liste' . ($moreforfilter ? " listwithfilterbefore" : "") . '">' . "\n";
1927
+		print '<table class="tagtable nobottomiftotal liste'.($moreforfilter ? " listwithfilterbefore" : "").'">'."\n";
1928 1928
 
1929 1929
 		// Fields title search
1930 1930
 		// --------------------------------------------------------------------
@@ -1949,20 +1949,20 @@  discard block
 block discarded – undo
1949 1949
 		}
1950 1950
 		// Thirdparty
1951 1951
 		if (!empty($arrayfields['p.fk_soc']['checked'])) {
1952
-			print '<td class="liste_titre"><input type="text" class="flat maxwidth100" name="$search_company" value="' . dol_escape_htmltag($search_company) . '"></td>';
1952
+			print '<td class="liste_titre"><input type="text" class="flat maxwidth100" name="$search_company" value="'.dol_escape_htmltag($search_company).'"></td>';
1953 1953
 		}
1954 1954
 
1955 1955
 		// Thirdparty alias
1956 1956
 		if (!empty($arrayfields['s.name_alias']['checked'])) {
1957
-			print '<td class="liste_titre"><input type="text" class="flat maxwidth100" name="$search_company_alias" value="' . dol_escape_htmltag($search_company_alias) . '"></td>';
1957
+			print '<td class="liste_titre"><input type="text" class="flat maxwidth100" name="$search_company_alias" value="'.dol_escape_htmltag($search_company_alias).'"></td>';
1958 1958
 		}
1959 1959
 
1960 1960
 		if (!empty($allprojectforuser)) {
1961 1961
 			if (!empty($arrayfields['p.project_ref']['checked'])) {
1962
-				print '<td class="liste_titre"><input type="text" class="flat maxwidth125" name="$search_project_ref" value="' . dol_escape_htmltag($search_project_ref) . '"></td>';
1962
+				print '<td class="liste_titre"><input type="text" class="flat maxwidth125" name="$search_project_ref" value="'.dol_escape_htmltag($search_project_ref).'"></td>';
1963 1963
 			}
1964 1964
 			if (!empty($arrayfields['p.project_label']['checked'])) {
1965
-				print '<td class="liste_titre"><input type="text" class="flat maxwidth125" name="$search_project_label" value="' . dol_escape_htmltag($search_project_label) . '"></td>';
1965
+				print '<td class="liste_titre"><input type="text" class="flat maxwidth125" name="$search_project_label" value="'.dol_escape_htmltag($search_project_label).'"></td>';
1966 1966
 			}
1967 1967
 		}
1968 1968
 		// Task
@@ -1980,7 +1980,7 @@  discard block
 block discarded – undo
1980 1980
 		}
1981 1981
 		// Note
1982 1982
 		if (!empty($arrayfields['t.note']['checked'])) {
1983
-			print '<td class="liste_titre"><input type="text" class="flat maxwidth75" name="search_note" value="' . dol_escape_htmltag($search_note) . '"></td>';
1983
+			print '<td class="liste_titre"><input type="text" class="flat maxwidth75" name="search_note" value="'.dol_escape_htmltag($search_note).'"></td>';
1984 1984
 		}
1985 1985
 		// Duration
1986 1986
 		if (!empty($arrayfields['t.element_duration']['checked'])) {
@@ -1991,7 +1991,7 @@  discard block
 block discarded – undo
1991 1991
 			if ($search_timespent_starthour || $search_timespent_startmin) {
1992 1992
 				$durationtouse_start = ($search_timespent_starthour * 3600 + $search_timespent_startmin * 60);
1993 1993
 			}
1994
-			print '<div class="nowraponall">' . $langs->trans('from') . ' ';
1994
+			print '<div class="nowraponall">'.$langs->trans('from').' ';
1995 1995
 			print $form->select_duration('search_timespent_duration_start', $durationtouse_start, 0, 'text', 0, 1);
1996 1996
 			print '</div>';
1997 1997
 
@@ -1999,7 +1999,7 @@  discard block
 block discarded – undo
1999 1999
 			if ($search_timespent_endhour || $search_timespent_endmin) {
2000 2000
 				$durationtouse_end = ($search_timespent_endhour * 3600 + $search_timespent_endmin * 60);
2001 2001
 			}
2002
-			print '<div class="nowraponall">' . $langs->trans('to') . ' ';
2002
+			print '<div class="nowraponall">'.$langs->trans('to').' ';
2003 2003
 			print $form->select_duration('search_timespent_duration_end', $durationtouse_end, 0, 'text', 0, 1);
2004 2004
 			print '</div>';
2005 2005
 
@@ -2015,7 +2015,7 @@  discard block
 block discarded – undo
2015 2015
 		}
2016 2016
 		// Value billed
2017 2017
 		if (!empty($arrayfields['valuebilled']['checked'])) {
2018
-			print '<td class="liste_titre center">' . $form->selectyesno('search_valuebilled', $search_valuebilled, 1, false, 1) . '</td>';
2018
+			print '<td class="liste_titre center">'.$form->selectyesno('search_valuebilled', $search_valuebilled, 1, false, 1).'</td>';
2019 2019
 		}
2020 2020
 
2021 2021
 		/*
@@ -2033,7 +2033,7 @@  discard block
 block discarded – undo
2033 2033
 			print $searchpicto;
2034 2034
 			print '</td>';
2035 2035
 		}
2036
-		print '</tr>' . "\n";
2036
+		print '</tr>'."\n";
2037 2037
 
2038 2038
 
2039 2039
 		$totalarray = array();
@@ -2151,9 +2151,9 @@  discard block
 block discarded – undo
2151 2151
 			if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
2152 2152
 				print '<td class="center nowraponall">';
2153 2153
 				if (($action == 'editline' || $action == 'splitline') && GETPOSTINT('lineid') == $task_time->rowid) {
2154
-					print '<input type="hidden" name="lineid" value="' . GETPOSTINT('lineid') . '">';
2154
+					print '<input type="hidden" name="lineid" value="'.GETPOSTINT('lineid').'">';
2155 2155
 					if ($id) {
2156
-						print '<input type="hidden" name="id" value="' . $id . '">';	// If you enable this, the edit will go beack to task view
2156
+						print '<input type="hidden" name="id" value="'.$id.'">'; // If you enable this, the edit will go beack to task view
2157 2157
 					}
2158 2158
 					print '<input type="submit" class="button buttongen reposition smallpaddingimp margintoponlyshort marginbottomonlyshort button-save" name="save" value="'.$langs->trans("Save").'">';
2159 2159
 					print '<br>';
@@ -2165,7 +2165,7 @@  discard block
 block discarded – undo
2165 2165
 						print '</a>';
2166 2166
 
2167 2167
 						if (getDolGlobalString('PROJECT_ALLOW_SPLIT_TIMESPENT')) {
2168
-							print '<a class="reposition editfielda paddingleft" href="' . $_SERVER["PHP_SELF"] . '?action=splitline&token=' . newToken() . '&lineid=' . $task_time->rowid . $param . ((empty($id) || $tab == 'timespent') ? '&tab=timespent' : '') . '">';
2168
+							print '<a class="reposition editfielda paddingleft" href="'.$_SERVER["PHP_SELF"].'?action=splitline&token='.newToken().'&lineid='.$task_time->rowid.$param.((empty($id) || $tab == 'timespent') ? '&tab=timespent' : '').'">';
2169 2169
 							print img_split('', 'class="pictofixedwidth paddingleft"');
2170 2170
 							print '</a>';
2171 2171
 						}
@@ -2183,12 +2183,12 @@  discard block
 block discarded – undo
2183 2183
 
2184 2184
 							// Disable select if task not billable or already invoiced
2185 2185
 							$disabled = (intval($task_time->billable) != 1 || $invoiced);
2186
-							$ctrl = '<input '.($disabled ? 'disabled' : '').' id="cb' . $task_time->rowid . '" class="flat checkforselect marginleftonly" type="checkbox" name="toselect[]" value="' . $task_time->rowid . '"' . ($selected ? ' checked="checked"' : '') . '>';
2186
+							$ctrl = '<input '.($disabled ? 'disabled' : '').' id="cb'.$task_time->rowid.'" class="flat checkforselect marginleftonly" type="checkbox" name="toselect[]" value="'.$task_time->rowid.'"'.($selected ? ' checked="checked"' : '').'>';
2187 2187
 							if ($disabled) {
2188 2188
 								// If disabled, a dbl-click very close outside the control
2189 2189
 								// will re-enable it, so that user is not blocked if needed.
2190
-								print '<span id="cbsp'. $task_time->rowid . '">'.$ctrl.'</span>';
2191
-								print '<script>$("#cbsp' . $task_time->rowid . '").dblclick(()=>{ $("#cb' . $task_time->rowid . '").removeAttr("disabled") })</script>';
2190
+								print '<span id="cbsp'.$task_time->rowid.'">'.$ctrl.'</span>';
2191
+								print '<script>$("#cbsp'.$task_time->rowid.'").dblclick(()=>{ $("#cb'.$task_time->rowid.'").removeAttr("disabled") })</script>';
2192 2192
 							} else {
2193 2193
 								print $ctrl;
2194 2194
 							}
@@ -2316,7 +2316,7 @@  discard block
 block discarded – undo
2316 2316
 					}
2317 2317
 				}
2318 2318
 			} elseif ($action !== 'createtime') {
2319
-				print '<input type="hidden" name="taskid" value="' . $id . '">';
2319
+				print '<input type="hidden" name="taskid" value="'.$id.'">';
2320 2320
 			}
2321 2321
 
2322 2322
 			// Task label
@@ -2352,9 +2352,9 @@  discard block
 block discarded – undo
2352 2352
 					}
2353 2353
 					if (count($contactsoftask) > 0) {
2354 2354
 						print img_object('', 'user', 'class="pictofixedwidth hideonsmartphone"');
2355
-						print $form->select_dolusers($task_time->fk_user, 'userid_line', 0, null, 0, '', $contactsoftask, '0', 0, 0, '', 0, '', 'minwidth100 maxwidth100');	// maxwidth must be lowed than minwidth of the td
2355
+						print $form->select_dolusers($task_time->fk_user, 'userid_line', 0, null, 0, '', $contactsoftask, '0', 0, 0, '', 0, '', 'minwidth100 maxwidth100'); // maxwidth must be lowed than minwidth of the td
2356 2356
 					} else {
2357
-						print img_error($langs->trans('FirstAddRessourceToAllocateTime')) . $langs->trans('FirstAddRessourceToAllocateTime');
2357
+						print img_error($langs->trans('FirstAddRessourceToAllocateTime')).$langs->trans('FirstAddRessourceToAllocateTime');
2358 2358
 					}
2359 2359
 				} else {
2360 2360
 					$userstatic->id = $task_time->fk_user;
@@ -2376,7 +2376,7 @@  discard block
 block discarded – undo
2376 2376
 			if (!empty($arrayfields['t.note']['checked'])) {
2377 2377
 				if ($action == 'editline' && GETPOSTINT('lineid') == $task_time->rowid) {
2378 2378
 					print '<td class="small">';
2379
-					print '<textarea name="timespent_note_line" class="centpercentimp" rows="' . ROWS_2 . '">' . dol_escape_htmltag($task_time->note, 0, 1) . '</textarea>';
2379
+					print '<textarea name="timespent_note_line" class="centpercentimp" rows="'.ROWS_2.'">'.dol_escape_htmltag($task_time->note, 0, 1).'</textarea>';
2380 2380
 					print '</td>';
2381 2381
 				} else {
2382 2382
 					print '<td class="small tdoverflowmax150 classfortooltip" title="'.dol_string_onlythesehtmltags(dol_htmlentitiesbr($task_time->note)).'">';
@@ -2387,7 +2387,7 @@  discard block
 block discarded – undo
2387 2387
 					$totalarray['nbfield']++;
2388 2388
 				}
2389 2389
 			} elseif ($action == 'editline' && GETPOSTINT('lineid') == $task_time->rowid) {
2390
-				print '<input type="hidden" name="timespent_note_line" value="' . dol_escape_htmltag($task_time->note, 0, 1) . '">';
2390
+				print '<input type="hidden" name="timespent_note_line" value="'.dol_escape_htmltag($task_time->note, 0, 1).'">';
2391 2391
 			}
2392 2392
 
2393 2393
 			// Time spent
@@ -2448,7 +2448,7 @@  discard block
 block discarded – undo
2448 2448
 				$value = price2num($task_time->thm * $task_time->element_duration / 3600, 'MT', 1);
2449 2449
 
2450 2450
 				print '<td class="nowraponall right">';
2451
-				print '<span class="amount" title="' . $langs->trans("THM") . ': ' . price($task_time->thm) . '">';
2451
+				print '<span class="amount" title="'.$langs->trans("THM").': '.price($task_time->thm).'">';
2452 2452
 				print price($value, 1, $langs, 1, -1, -1, $conf->currency);
2453 2453
 				print '</span>';
2454 2454
 				print '</td>';
@@ -2504,7 +2504,7 @@  discard block
 block discarded – undo
2504 2504
 							}
2505 2505
 						}
2506 2506
 					} else {
2507
-						print '<span class="opacitymedium">' . $langs->trans("NA") . '</span>';
2507
+						print '<span class="opacitymedium">'.$langs->trans("NA").'</span>';
2508 2508
 					}
2509 2509
 				}
2510 2510
 				print '</td>';
@@ -2538,7 +2538,7 @@  discard block
 block discarded – undo
2538 2538
 						print '</a>';
2539 2539
 
2540 2540
 						if (getDolGlobalString('PROJECT_ALLOW_SPLIT_TIMESPENT')) {
2541
-							print '<a class="reposition editfielda paddingleft" href="' . $_SERVER["PHP_SELF"] . '?action=splitline&token=' . newToken() . '&lineid=' . $task_time->rowid . $param . ((empty($id) || $tab == 'timespent') ? '&tab=timespent' : '') . '">';
2541
+							print '<a class="reposition editfielda paddingleft" href="'.$_SERVER["PHP_SELF"].'?action=splitline&token='.newToken().'&lineid='.$task_time->rowid.$param.((empty($id) || $tab == 'timespent') ? '&tab=timespent' : '').'">';
2542 2542
 							print img_split('', 'class="pictofixedwidth paddingleft"');
2543 2543
 							print '</a>';
2544 2544
 						}
@@ -2556,12 +2556,12 @@  discard block
 block discarded – undo
2556 2556
 
2557 2557
 							// Disable select if task not billable or already invoiced
2558 2558
 							$disabled = (intval($task_time->billable) != 1 || $invoiced);
2559
-							$ctrl = '<input '.($disabled ? 'disabled' : '').' id="cb' . $task_time->rowid . '" class="flat checkforselect marginleftonly" type="checkbox" name="toselect[]" value="' . $task_time->rowid . '"' . ($selected ? ' checked="checked"' : '') . '>';
2559
+							$ctrl = '<input '.($disabled ? 'disabled' : '').' id="cb'.$task_time->rowid.'" class="flat checkforselect marginleftonly" type="checkbox" name="toselect[]" value="'.$task_time->rowid.'"'.($selected ? ' checked="checked"' : '').'>';
2560 2560
 							if ($disabled) {
2561 2561
 								// If disabled, a dbl-click very close outside the control
2562 2562
 								// will re-enable it, so that user is not blocked if needed.
2563
-								print '<span id="cbsp'. $task_time->rowid . '">'.$ctrl.'</span>';
2564
-								print '<script>$("#cbsp' . $task_time->rowid . '").dblclick(()=>{ $("#cb' . $task_time->rowid . '").removeAttr("disabled") })</script>';
2563
+								print '<span id="cbsp'.$task_time->rowid.'">'.$ctrl.'</span>';
2564
+								print '<script>$("#cbsp'.$task_time->rowid.'").dblclick(()=>{ $("#cb'.$task_time->rowid.'").removeAttr("disabled") })</script>';
2565 2565
 							} else {
2566 2566
 								print $ctrl;
2567 2567
 							}
@@ -2660,7 +2660,7 @@  discard block
 block discarded – undo
2660 2660
 							print img_object('', 'user', 'class="hideonsmartphone"');
2661 2661
 							print $form->select_dolusers($task_time->fk_user, 'userid_line', 0, null, 0, '', $contactsoftask);
2662 2662
 						} else {
2663
-							print img_error($langs->trans('FirstAddRessourceToAllocateTime')) . $langs->trans('FirstAddRessourceToAllocateTime');
2663
+							print img_error($langs->trans('FirstAddRessourceToAllocateTime')).$langs->trans('FirstAddRessourceToAllocateTime');
2664 2664
 						}
2665 2665
 					} else {
2666 2666
 						$userstatic->id = $task_time->fk_user;
@@ -2677,13 +2677,13 @@  discard block
 block discarded – undo
2677 2677
 				if (!empty($arrayfields['t.note']['checked'])) {
2678 2678
 					print '<td class="tdoverflowmax300">';
2679 2679
 					if ($action == 'splitline' && GETPOSTINT('lineid') == $task_time->rowid) {
2680
-						print '<textarea name="timespent_note_line" class="centpercentimp" rows="' . ROWS_2 . '">' . dol_escape_htmltag($task_time->note, 0, 1) . '</textarea>';
2680
+						print '<textarea name="timespent_note_line" class="centpercentimp" rows="'.ROWS_2.'">'.dol_escape_htmltag($task_time->note, 0, 1).'</textarea>';
2681 2681
 					} else {
2682 2682
 						print dol_nl2br($task_time->note);
2683 2683
 					}
2684 2684
 					print '</td>';
2685 2685
 				} elseif ($action == 'splitline' && GETPOSTINT('lineid') == $task_time->rowid) {
2686
-					print '<input type="hidden" name="timespent_note_line" rows="' . ROWS_2 . '" value="' . dol_escape_htmltag($task_time->note, 0, 1) . '">';
2686
+					print '<input type="hidden" name="timespent_note_line" rows="'.ROWS_2.'" value="'.dol_escape_htmltag($task_time->note, 0, 1).'">';
2687 2687
 				}
2688 2688
 
2689 2689
 				// Time spent
@@ -2825,7 +2825,7 @@  discard block
 block discarded – undo
2825 2825
 							print img_object('', 'user', 'class="hideonsmartphone"');
2826 2826
 							print $form->select_dolusers($task_time->fk_user, 'userid_line_2', 0, null, 0, '', $contactsoftask);
2827 2827
 						} else {
2828
-							print img_error($langs->trans('FirstAddRessourceToAllocateTime')) . $langs->trans('FirstAddRessourceToAllocateTime');
2828
+							print img_error($langs->trans('FirstAddRessourceToAllocateTime')).$langs->trans('FirstAddRessourceToAllocateTime');
2829 2829
 						}
2830 2830
 					} else {
2831 2831
 						$userstatic->id = $task_time->fk_user;
@@ -2842,13 +2842,13 @@  discard block
 block discarded – undo
2842 2842
 				if (!empty($arrayfields['t.note']['checked'])) {
2843 2843
 					print '<td class="small tdoverflowmax300"">';
2844 2844
 					if ($action == 'splitline' && GETPOSTINT('lineid') == $task_time->rowid) {
2845
-						print '<textarea name="timespent_note_line_2" class="centpercentimp" rows="' . ROWS_2 . '">' . dol_escape_htmltag($task_time->note, 0, 1) . '</textarea>';
2845
+						print '<textarea name="timespent_note_line_2" class="centpercentimp" rows="'.ROWS_2.'">'.dol_escape_htmltag($task_time->note, 0, 1).'</textarea>';
2846 2846
 					} else {
2847 2847
 						print dol_nl2br($task_time->note);
2848 2848
 					}
2849 2849
 					print '</td>';
2850 2850
 				} elseif ($action == 'splitline' && GETPOSTINT('lineid') == $task_time->rowid) {
2851
-					print '<input type="hidden" name="timespent_note_line_2" value="' . dol_escape_htmltag($task_time->note, 0, 1) . '">';
2851
+					print '<input type="hidden" name="timespent_note_line_2" value="'.dol_escape_htmltag($task_time->note, 0, 1).'">';
2852 2852
 				}
2853 2853
 
2854 2854
 				// Time spent
@@ -2923,14 +2923,14 @@  discard block
 block discarded – undo
2923 2923
 				$i++;
2924 2924
 				if ($i == 1) {
2925 2925
 					if ($num < $limit && empty($offset)) {
2926
-						print '<td class="left">' . $langs->trans("Total") . '</td>';
2926
+						print '<td class="left">'.$langs->trans("Total").'</td>';
2927 2927
 					} else {
2928 2928
 						print '<td class="left">'.$form->textwithpicto($langs->trans("Total"), $langs->trans("Totalforthispage")).'</td>';
2929 2929
 					}
2930 2930
 				} elseif (isset($totalarray['totaldurationfield']) && $totalarray['totaldurationfield'] == $i) {
2931
-					print '<td class="right">' . convertSecondToTime($totalarray['totalduration'], 'allhourmin') . '</td>';
2931
+					print '<td class="right">'.convertSecondToTime($totalarray['totalduration'], 'allhourmin').'</td>';
2932 2932
 				} elseif (isset($totalarray['totalvaluefield']) && $totalarray['totalvaluefield'] == $i) {
2933
-					print '<td class="right">' . price($totalarray['totalvalue']) . '</td>';
2933
+					print '<td class="right">'.price($totalarray['totalvalue']).'</td>';
2934 2934
 					//} elseif ($totalarray['totalvaluebilledfield'] == $i) { print '<td class="center">'.price($totalarray['totalvaluebilled']).'</td>';
2935 2935
 				} else {
2936 2936
 					print '<td></td>';
@@ -2946,8 +2946,8 @@  discard block
 block discarded – undo
2946 2946
 					$totalnboffields++;
2947 2947
 				}
2948 2948
 			}
2949
-			print '<tr class="oddeven"><td colspan="' . $totalnboffields . '">';
2950
-			print '<span class="opacitymedium">' . $langs->trans("None") . '</span>';
2949
+			print '<tr class="oddeven"><td colspan="'.$totalnboffields.'">';
2950
+			print '<span class="opacitymedium">'.$langs->trans("None").'</span>';
2951 2951
 			print '</td></tr>';
2952 2952
 		}
2953 2953
 
Please login to merge, or discard this patch.
htdocs/projet/tasks.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
 $confirm = GETPOST('confirm', 'alpha');
60 60
 $cancel = GETPOST('cancel');
61 61
 $contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'projecttasklist';
62
-$backtopage = GETPOST('backtopage', 'alpha');					// if not set, a default page will be used
62
+$backtopage = GETPOST('backtopage', 'alpha'); // if not set, a default page will be used
63 63
 //$backtopageforcancel = GETPOST('backtopageforcancel', 'alpha');	// if not set, $backtopage will be used
64 64
 $optioncss  = GETPOST('optioncss', 'aZ');
65 65
 $backtopage = GETPOST('backtopage', 'alpha');
@@ -102,20 +102,20 @@  discard block
 block discarded – undo
102 102
 $search_date_start_startmonth = GETPOSTINT('search_date_start_startmonth');
103 103
 $search_date_start_startyear = GETPOSTINT('search_date_start_startyear');
104 104
 $search_date_start_startday = GETPOSTINT('search_date_start_startday');
105
-$search_date_start_start = dol_mktime(0, 0, 0, $search_date_start_startmonth, $search_date_start_startday, $search_date_start_startyear);	// Use tzserver
105
+$search_date_start_start = dol_mktime(0, 0, 0, $search_date_start_startmonth, $search_date_start_startday, $search_date_start_startyear); // Use tzserver
106 106
 $search_date_start_endmonth = GETPOSTINT('search_date_start_endmonth');
107 107
 $search_date_start_endyear = GETPOSTINT('search_date_start_endyear');
108 108
 $search_date_start_endday = GETPOSTINT('search_date_start_endday');
109
-$search_date_start_end = dol_mktime(23, 59, 59, $search_date_start_endmonth, $search_date_start_endday, $search_date_start_endyear);	// Use tzserver
109
+$search_date_start_end = dol_mktime(23, 59, 59, $search_date_start_endmonth, $search_date_start_endday, $search_date_start_endyear); // Use tzserver
110 110
 
111 111
 $search_date_end_startmonth = GETPOSTINT('search_date_end_startmonth');
112 112
 $search_date_end_startyear = GETPOSTINT('search_date_end_startyear');
113 113
 $search_date_end_startday = GETPOSTINT('search_date_end_startday');
114
-$search_date_end_start = dol_mktime(0, 0, 0, $search_date_end_startmonth, $search_date_end_startday, $search_date_end_startyear);	// Use tzserver
114
+$search_date_end_start = dol_mktime(0, 0, 0, $search_date_end_startmonth, $search_date_end_startday, $search_date_end_startyear); // Use tzserver
115 115
 $search_date_end_endmonth = GETPOSTINT('search_date_end_endmonth');
116 116
 $search_date_end_endyear = GETPOSTINT('search_date_end_endyear');
117 117
 $search_date_end_endday = GETPOSTINT('search_date_end_endday');
118
-$search_date_end_end = dol_mktime(23, 59, 59, $search_date_end_endmonth, $search_date_end_endday, $search_date_end_endyear);	// Use tzserver
118
+$search_date_end_end = dol_mktime(23, 59, 59, $search_date_end_endmonth, $search_date_end_endday, $search_date_end_endyear); // Use tzserver
119 119
 
120 120
 $object = new Project($db);
121 121
 $taskstatic = new Task($db);
@@ -575,7 +575,7 @@  discard block
 block discarded – undo
575 575
 		$param .= '&search_date_end_endday='.urlencode((string) ($search_date_end_endday));
576 576
 	}
577 577
 	if ($search_date_end_end) {
578
-		$param .= '&search_date_end_end=' . urlencode((string) $search_date_end_end);
578
+		$param .= '&search_date_end_end='.urlencode((string) $search_date_end_end);
579 579
 	}
580 580
 	if ($search_planedworkload) {
581 581
 		$param .= '&search_planedworkload='.urlencode($search_planedworkload);
@@ -621,7 +621,7 @@  discard block
 block discarded – undo
621 621
 	if (!empty($_SESSION['pageforbacktolist']) && !empty($_SESSION['pageforbacktolist']['project'])) {
622 622
 		$tmpurl = $_SESSION['pageforbacktolist']['project'];
623 623
 		$tmpurl = preg_replace('/__SOCID__/', (string) $object->socid, $tmpurl);
624
-		$linkback = '<a href="'.$tmpurl.(preg_match('/\?/', $tmpurl) ? '&' : '?'). 'restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>';
624
+		$linkback = '<a href="'.$tmpurl.(preg_match('/\?/', $tmpurl) ? '&' : '?').'restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>';
625 625
 	} else {
626 626
 		$linkback = '<a href="'.DOL_URL_ROOT.'/projet/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>';
627 627
 	}
@@ -791,8 +791,8 @@  discard block
 block discarded – undo
791 791
 
792 792
 	$defaultref = '';
793 793
 	$classnamemodtask = getDolGlobalString('PROJECT_TASK_ADDON', 'mod_task_simple');
794
-	if (getDolGlobalString('PROJECT_TASK_ADDON') && is_readable(DOL_DOCUMENT_ROOT."/core/modules/project/task/" . getDolGlobalString('PROJECT_TASK_ADDON').".php")) {
795
-		require_once DOL_DOCUMENT_ROOT."/core/modules/project/task/" . getDolGlobalString('PROJECT_TASK_ADDON').'.php';
794
+	if (getDolGlobalString('PROJECT_TASK_ADDON') && is_readable(DOL_DOCUMENT_ROOT."/core/modules/project/task/".getDolGlobalString('PROJECT_TASK_ADDON').".php")) {
795
+		require_once DOL_DOCUMENT_ROOT."/core/modules/project/task/".getDolGlobalString('PROJECT_TASK_ADDON').'.php';
796 796
 		$modTask = new $classnamemodtask();
797 797
 		'@phan-var-force ModeleNumRefTask $modTask';
798 798
 		$defaultref = $modTask->getNextValue($object->thirdparty, $object);
Please login to merge, or discard this patch.
htdocs/projet/class/task.class.php 1 patch
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -589,7 +589,7 @@  discard block
 block discarded – undo
589 589
 				$this->date_end = $this->db->jdate($obj->date_end);
590 590
 				$this->fk_user_creat		= $obj->fk_user_creat;
591 591
 				$this->fk_user_valid		= $obj->fk_user_valid;
592
-				$this->status			    = $obj->status;
592
+				$this->status = $obj->status;
593 593
 				$this->progress				= $obj->progress;
594 594
 				$this->budget_amount		= $obj->budget_amount;
595 595
 				$this->priority				= $obj->priority;
@@ -725,7 +725,7 @@  discard block
 block discarded – undo
725 725
 						 * @param Task $task
726 726
 						 * @return bool
727 727
 						 */
728
-						static function ($allTasksCompleted, $task) {
728
+						static function($allTasksCompleted, $task) {
729 729
 							return $allTasksCompleted && $task->progress >= 100;
730 730
 						},
731 731
 						1
@@ -1359,14 +1359,14 @@  discard block
 block discarded – undo
1359 1359
 						$tasks[$i]->billed = $obj->billed;
1360 1360
 					}
1361 1361
 
1362
-					$tasks[$i]->progress		= $obj->progress;
1362
+					$tasks[$i]->progress = $obj->progress;
1363 1363
 					$tasks[$i]->fk_statut		= $obj->status;
1364
-					$tasks[$i]->status 		    = $obj->status;
1364
+					$tasks[$i]->status = $obj->status;
1365 1365
 					$tasks[$i]->public = $obj->public;
1366 1366
 					$tasks[$i]->date_start = $this->db->jdate($obj->date_start);
1367 1367
 					$tasks[$i]->date_end		= $this->db->jdate($obj->date_end);
1368 1368
 					$tasks[$i]->rang	   		= $obj->rang;
1369
-					$tasks[$i]->priority   		= $obj->priority;
1369
+					$tasks[$i]->priority = $obj->priority;
1370 1370
 
1371 1371
 					$tasks[$i]->socid           = $obj->thirdparty_id; // For backward compatibility
1372 1372
 					$tasks[$i]->thirdparty_id = $obj->thirdparty_id;
@@ -1710,7 +1710,7 @@  discard block
 block discarded – undo
1710 1710
 			}
1711 1711
 
1712 1712
 			// Update hourly rate of this time spent entry
1713
-			$resql_thm_user = $this->db->query("SELECT thm FROM " . MAIN_DB_PREFIX . "user WHERE rowid = " . ((int) $timespent->fk_user));
1713
+			$resql_thm_user = $this->db->query("SELECT thm FROM ".MAIN_DB_PREFIX."user WHERE rowid = ".((int) $timespent->fk_user));
1714 1714
 			if (!empty($resql_thm_user)) {
1715 1715
 				$obj_thm_user = $this->db->fetch_object($resql_thm_user);
1716 1716
 				$timespent->thm = $obj_thm_user->thm;
@@ -1791,8 +1791,8 @@  discard block
 block discarded – undo
1791 1791
 				$newobj->fk_project			= $obj->project_id;
1792 1792
 				$newobj->project_ref		= $obj->project_ref;
1793 1793
 				$newobj->project_label = $obj->project_label;
1794
-				$newobj->project_public		= $obj->project_public;
1795
-				$newobj->public				= $obj->project_public;		// deprecated
1794
+				$newobj->project_public = $obj->project_public;
1795
+				$newobj->public				= $obj->project_public; // deprecated
1796 1796
 
1797 1797
 				$newobj->fk_task			= $obj->task_id;
1798 1798
 				$newobj->task_ref = $obj->task_ref;
@@ -1805,7 +1805,7 @@  discard block
 block discarded – undo
1805 1805
 				$newobj->timespent_line_withhour = $obj->task_date_withhour;
1806 1806
 				$newobj->timespent_line_duration = $obj->task_duration;
1807 1807
 				$newobj->timespent_line_fk_user = $obj->fk_user;
1808
-				$newobj->timespent_line_thm = $obj->thm;	// hourly rate
1808
+				$newobj->timespent_line_thm = $obj->thm; // hourly rate
1809 1809
 				$newobj->timespent_line_note = $obj->note;
1810 1810
 
1811 1811
 				$arrayres[] = $newobj;
@@ -2044,7 +2044,7 @@  discard block
 block discarded – undo
2044 2044
 				$newobj->timespent_withhour = $obj->task_date_withhour;
2045 2045
 				$newobj->timespent_duration = $obj->task_duration;
2046 2046
 				$newobj->timespent_fk_user = $obj->fk_user;
2047
-				$newobj->timespent_thm = $obj->thm;	// hourly rate
2047
+				$newobj->timespent_thm = $obj->thm; // hourly rate
2048 2048
 				$newobj->timespent_note = $obj->note;
2049 2049
 
2050 2050
 				$arrayres[] = $newobj;
@@ -2108,7 +2108,7 @@  discard block
 block discarded – undo
2108 2108
 		$timespent->element_date = $this->timespent_date;
2109 2109
 		$timespent->element_datehour = $this->timespent_datehour;
2110 2110
 
2111
-		$timespent->element_date_withhour = $this->timespent_withhour;		// 0 or 1
2111
+		$timespent->element_date_withhour = $this->timespent_withhour; // 0 or 1
2112 2112
 		$timespent->element_duration = $this->timespent_duration;
2113 2113
 		if ($this->timespent_fk_user > 0) {
2114 2114
 			$timespent->fk_user = $this->timespent_fk_user;
@@ -2144,14 +2144,14 @@  discard block
 block discarded – undo
2144 2144
 		if ($ret == 1 && (($this->timespent_old_duration != $this->timespent_duration) || getDolGlobalString('TIMESPENT_ALWAYS_UPDATE_THM'))) {
2145 2145
 			if ($this->timespent_old_duration != $this->timespent_duration) {
2146 2146
 				// Recalculate amount of time spent for task and update denormalized field
2147
-				$sql = "UPDATE " . MAIN_DB_PREFIX . "projet_task";
2148
-				$sql .= " SET duration_effective = (SELECT SUM(element_duration) FROM " . MAIN_DB_PREFIX . "element_time as ptt where ptt.elementtype = 'task' AND ptt.fk_element = " . ((int) $this->id) . ")";
2147
+				$sql = "UPDATE ".MAIN_DB_PREFIX."projet_task";
2148
+				$sql .= " SET duration_effective = (SELECT SUM(element_duration) FROM ".MAIN_DB_PREFIX."element_time as ptt where ptt.elementtype = 'task' AND ptt.fk_element = ".((int) $this->id).")";
2149 2149
 				if (isset($this->progress)) {
2150
-					$sql .= ", progress = " . ((float) $this->progress); // Do not overwrite value if not provided
2150
+					$sql .= ", progress = ".((float) $this->progress); // Do not overwrite value if not provided
2151 2151
 				}
2152
-				$sql .= " WHERE rowid = " . ((int) $this->id);
2152
+				$sql .= " WHERE rowid = ".((int) $this->id);
2153 2153
 
2154
-				dol_syslog(get_class($this) . "::updateTimeSpent", LOG_DEBUG);
2154
+				dol_syslog(get_class($this)."::updateTimeSpent", LOG_DEBUG);
2155 2155
 				if (!$this->db->query($sql)) {
2156 2156
 					$this->error = $this->db->lasterror();
2157 2157
 					$this->db->rollback();
@@ -2162,7 +2162,7 @@  discard block
 block discarded – undo
2162 2162
 			// Update hourly rate of this time spent entry, but only if it was not set initially
2163 2163
 			$res_update = 1;
2164 2164
 			if (empty($timespent->thm) || getDolGlobalString('TIMESPENT_ALWAYS_UPDATE_THM')) {
2165
-				$resql_thm_user = $this->db->query("SELECT thm FROM " . MAIN_DB_PREFIX . "user WHERE rowid = " . ((int) $timespent->fk_user));
2165
+				$resql_thm_user = $this->db->query("SELECT thm FROM ".MAIN_DB_PREFIX."user WHERE rowid = ".((int) $timespent->fk_user));
2166 2166
 				if (!empty($resql_thm_user)) {
2167 2167
 					$obj_thm_user = $this->db->fetch_object($resql_thm_user);
2168 2168
 					$timespent->thm = $obj_thm_user->thm;
@@ -2299,8 +2299,8 @@  discard block
 block discarded – undo
2299 2299
 
2300 2300
 		$defaultref = '';
2301 2301
 		$obj = !getDolGlobalString('PROJECT_TASK_ADDON') ? 'mod_task_simple' : $conf->global->PROJECT_TASK_ADDON;
2302
-		if (getDolGlobalString('PROJECT_TASK_ADDON') && is_readable(DOL_DOCUMENT_ROOT."/core/modules/project/task/" . getDolGlobalString('PROJECT_TASK_ADDON').".php")) {
2303
-			require_once DOL_DOCUMENT_ROOT."/core/modules/project/task/" . getDolGlobalString('PROJECT_TASK_ADDON').'.php';
2302
+		if (getDolGlobalString('PROJECT_TASK_ADDON') && is_readable(DOL_DOCUMENT_ROOT."/core/modules/project/task/".getDolGlobalString('PROJECT_TASK_ADDON').".php")) {
2303
+			require_once DOL_DOCUMENT_ROOT."/core/modules/project/task/".getDolGlobalString('PROJECT_TASK_ADDON').'.php';
2304 2304
 			$modTask = new $obj();
2305 2305
 			'@phan-var-force ModeleNumRefTask $modTask';
2306 2306
 			$defaultref = $modTask->getNextValue(null, $clone_task);
@@ -2350,7 +2350,7 @@  discard block
 block discarded – undo
2350 2350
 		}
2351 2351
 		// End
2352 2352
 		if ($error) {
2353
-			$clone_task_id = 0;  // For static tool check
2353
+			$clone_task_id = 0; // For static tool check
2354 2354
 		} else {
2355 2355
 			$clone_task_id = $clone_task->id;
2356 2356
 			$clone_task_ref = $clone_task->ref;
@@ -2790,7 +2790,7 @@  discard block
 block discarded – undo
2790 2790
 		global $langs, $hookmanager, $user, $action;
2791 2791
 
2792 2792
 		$error = 0;
2793
-		$task_origin = new Task($this->db);		// The thirdparty that we will delete
2793
+		$task_origin = new Task($this->db); // The thirdparty that we will delete
2794 2794
 
2795 2795
 		dol_syslog("mergeTask merge task id=".$task_origin_id." (will be deleted) into the task id=".$this->id);
2796 2796
 
Please login to merge, or discard this patch.
htdocs/product/stock/stocktransfer/stocktransfer_card.php 1 patch
Spacing   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -60,8 +60,8 @@  discard block
 block discarded – undo
60 60
 $confirm = GETPOST('confirm', 'alpha');
61 61
 $cancel     = GETPOST('cancel');
62 62
 $contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : str_replace('_', '', basename(dirname(__FILE__)).basename(__FILE__, '.php')); // To manage different context of search
63
-$backtopage = GETPOST('backtopage', 'alpha');					// if not set, a default page will be used
64
-$backtopageforcancel = GETPOST('backtopageforcancel', 'alpha');	// if not set, $backtopage will be used
63
+$backtopage = GETPOST('backtopage', 'alpha'); // if not set, a default page will be used
64
+$backtopageforcancel = GETPOST('backtopageforcancel', 'alpha'); // if not set, $backtopage will be used
65 65
 $qty = GETPOSTINT('qty');
66 66
 $fk_product = GETPOSTINT('fk_product');
67 67
 $fk_warehouse_source = GETPOSTINT('fk_warehouse_source');
@@ -432,7 +432,7 @@  discard block
 block discarded – undo
432 432
 $date_prevue_depart = $object->date_prevue_depart;
433 433
 $date_prevue_depart_plus_delai = $date_prevue_depart;
434 434
 if ($object->lead_time_for_warning > 0) {
435
-	$date_prevue_depart_plus_delai = strtotime(date('Y-m-d', $date_prevue_depart) . ' + '.$object->lead_time_for_warning.' day');
435
+	$date_prevue_depart_plus_delai = strtotime(date('Y-m-d', $date_prevue_depart).' + '.$object->lead_time_for_warning.' day');
436 436
 }
437 437
 if (!empty($date_prevue_depart) && $date_prevue_depart_plus_delai < strtotime(date('Y-m-d'))) {
438 438
 	print "$('.valuefield.fieldname_date_prevue_depart').append('";
@@ -507,28 +507,28 @@  discard block
 block discarded – undo
507 507
 
508 508
 // Part to edit record
509 509
 if (($id || $ref) && $action == 'edit') {
510
-	print load_fiche_titre($langs->trans("StockTransfer"), '', 'object_' . $object->picto);
510
+	print load_fiche_titre($langs->trans("StockTransfer"), '', 'object_'.$object->picto);
511 511
 
512
-	print '<form method="POST" action="' . $_SERVER["PHP_SELF"] . '">';
513
-	print '<input type="hidden" name="token" value="' . newToken() . '">';
512
+	print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">';
513
+	print '<input type="hidden" name="token" value="'.newToken().'">';
514 514
 	print '<input type="hidden" name="action" value="update">';
515
-	print '<input type="hidden" name="id" value="' . $object->id . '">';
515
+	print '<input type="hidden" name="id" value="'.$object->id.'">';
516 516
 	if ($backtopage) {
517
-		print '<input type="hidden" name="backtopage" value="' . $backtopage . '">';
517
+		print '<input type="hidden" name="backtopage" value="'.$backtopage.'">';
518 518
 	}
519 519
 	if ($backtopageforcancel) {
520
-		print '<input type="hidden" name="backtopageforcancel" value="' . $backtopageforcancel . '">';
520
+		print '<input type="hidden" name="backtopageforcancel" value="'.$backtopageforcancel.'">';
521 521
 	}
522 522
 
523 523
 	print dol_get_fiche_head();
524 524
 
525
-	print '<table class="border centpercent tableforfieldedit">' . "\n";
525
+	print '<table class="border centpercent tableforfieldedit">'."\n";
526 526
 
527 527
 	// Common attributes
528
-	include DOL_DOCUMENT_ROOT . '/core/tpl/commonfields_edit.tpl.php';
528
+	include DOL_DOCUMENT_ROOT.'/core/tpl/commonfields_edit.tpl.php';
529 529
 
530 530
 	// Other attributes
531
-	include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_edit.tpl.php';
531
+	include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_edit.tpl.php';
532 532
 
533 533
 	print '</table>';
534 534
 
@@ -564,28 +564,28 @@  discard block
 block discarded – undo
564 564
 		$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ToClone'), $langs->trans('ConfirmCloneAsk', $object->ref), 'confirm_clone', $formquestion, 'yes', 1);
565 565
 	} elseif ($action == 'destock') { // Destock confirmation
566 566
 		// Create an array for form
567
-		$formquestion = array(	'text' => '',
567
+		$formquestion = array('text' => '',
568 568
 			0 => array('type' => 'text', 'name' => 'label', 'label' => $langs->trans("Label"), 'value' => $langs->trans('ConfirmDestock', $object->ref), 'size' => 40),
569 569
 			1 => array('type' => 'text', 'name' => 'inventorycode', 'label' => $langs->trans("InventoryCode"), 'value' => dol_print_date(dol_now(), '%y%m%d%H%M%S'), 'size' => 25)
570 570
 		);
571 571
 		$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('DestockAllProduct'), '', 'confirm_destock', $formquestion, 'yes', 1);
572 572
 	} elseif ($action == 'destockcancel') { // Destock confirmation cancel
573 573
 		// Create an array for form
574
-		$formquestion = array(	'text' => '',
574
+		$formquestion = array('text' => '',
575 575
 			0 => array('type' => 'text', 'name' => 'label', 'label' => $langs->trans("Label"), 'value' => $langs->trans('ConfirmDestockCancel', $object->ref), 'size' => 40),
576 576
 			1 => array('type' => 'text', 'name' => 'inventorycode', 'label' => $langs->trans("InventoryCode"), 'value' => dol_print_date(dol_now(), '%y%m%d%H%M%S'), 'size' => 25)
577 577
 		);
578 578
 		$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('DestockAllProductCancel'), '', 'confirm_destockcancel', $formquestion, 'yes', 1);
579 579
 	} elseif ($action == 'addstock') { // Addstock confirmation
580 580
 		// Create an array for form
581
-		$formquestion = array(	'text' => '',
581
+		$formquestion = array('text' => '',
582 582
 			0 => array('type' => 'text', 'name' => 'label', 'label' => $langs->trans("Label").'&nbsp;:', 'value' => $langs->trans('ConfirmAddStock', $object->ref), 'size' => 40),
583 583
 			1 => array('type' => 'text', 'name' => 'inventorycode', 'label' => $langs->trans("InventoryCode"), 'value' => dol_print_date(dol_now(), '%y%m%d%H%M%S'), 'size' => 25)
584 584
 		);
585 585
 		$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('AddStockAllProduct'), '', 'confirm_addstock', $formquestion, 'yes', 1);
586 586
 	} elseif ($action == 'addstockcancel') { // Addstock confirmation cancel
587 587
 		// Create an array for form
588
-		$formquestion = array(	'text' => '',
588
+		$formquestion = array('text' => '',
589 589
 			0 => array('type' => 'text', 'name' => 'label', 'label' => $langs->trans("Label").'&nbsp;:', 'value' => $langs->trans('ConfirmAddStockCancel', $object->ref), 'size' => 40),
590 590
 			1 => array('type' => 'text', 'name' => 'inventorycode', 'label' => $langs->trans("InventoryCode"), 'value' => dol_print_date(dol_now(), '%y%m%d%H%M%S'), 'size' => 25)
591 591
 		);
@@ -882,13 +882,13 @@  discard block
 block discarded – undo
882 882
 				print '<input type="submit" class="button buttongen marginbottomonly" id="cancellinebutton" name="cancel" value="'.$langs->trans("Cancel").'"></td>';
883 883
 			} else {
884 884
 				print '<td class="right">';
885
-				print '<a class="editfielda reposition" href="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&amp;action=editline&amp;lineid=' . $line->id . '#line_' . $line->id . '">';
886
-				print img_edit() . '</a>';
885
+				print '<a class="editfielda reposition" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;action=editline&amp;lineid='.$line->id.'#line_'.$line->id.'">';
886
+				print img_edit().'</a>';
887 887
 				print '</td>';
888 888
 				print '<td class="right">';
889 889
 				// Ensure the delete line link embeds a CSRF token.
890
-				$deleteLineUrl = $_SERVER["PHP_SELF"] . '?id=' . $id . '&action=deleteline&lineid=' . $line->id . '&token=' . newToken();
891
-				print '<a href="' . $deleteLineUrl . '">' . img_delete($langs->trans("Remove")) . '</a>';
890
+				$deleteLineUrl = $_SERVER["PHP_SELF"].'?id='.$id.'&action=deleteline&lineid='.$line->id.'&token='.newToken();
891
+				print '<a href="'.$deleteLineUrl.'">'.img_delete($langs->trans("Remove")).'</a>';
892 892
 				print '</td>';
893 893
 			}
894 894
 
@@ -912,7 +912,7 @@  discard block
 block discarded – undo
912 912
 			}
913 913
 		}
914 914
 
915
-		$i ++;
915
+		$i++;
916 916
 		print '</tr>';
917 917
 	}
918 918
 
@@ -993,7 +993,7 @@  discard block
 block discarded – undo
993 993
 		print '<td></td>';
994 994
 
995 995
 		// Button to add line
996
-		print '<td class="right" colspan="2"><input type="submit" class="button" name="addline" value="' . dol_escape_htmltag($langs->trans('Add')) . '"></td>';
996
+		print '<td class="right" colspan="2"><input type="submit" class="button" name="addline" value="'.dol_escape_htmltag($langs->trans('Add')).'"></td>';
997 997
 
998 998
 		// Grad and drop lines
999 999
 		print '<td></td>';
@@ -1097,9 +1097,9 @@  discard block
 block discarded – undo
1097 1097
 		// Documents
1098 1098
 		if ($includedocgeneration) {
1099 1099
 			$objref = dol_sanitizeFileName($object->ref);
1100
-			$relativepath = $objref . '/' . $objref . '.pdf';
1100
+			$relativepath = $objref.'/'.$objref.'.pdf';
1101 1101
 			$filedir = $conf->stocktransfer->dir_output.'/'.$object->element.'/'.$objref;
1102
-			$urlsource = $_SERVER["PHP_SELF"] . "?id=" . $object->id;
1102
+			$urlsource = $_SERVER["PHP_SELF"]."?id=".$object->id;
1103 1103
 			$genallowed = $permissiontoread; // If you can read, you can build the PDF to read content
1104 1104
 			$delallowed = $permissiontoadd; // If you can create/edit, you can remove a file on card
1105 1105
 			print $formfile->showdocuments('stocktransfer:StockTransfer', $object->element.'/'.$objref, $filedir, $urlsource, $genallowed, $delallowed, $object->model_pdf, 1, 0, 0, 28, 0, '', '', '', $langs->defaultlang);
Please login to merge, or discard this patch.
htdocs/hrm/position_card.php 1 patch
Spacing   +43 added lines, -43 removed lines patch added patch discarded remove patch
@@ -31,12 +31,12 @@  discard block
 block discarded – undo
31 31
 // Load Dolibarr environment
32 32
 require '../main.inc.php';
33 33
 
34
-require_once DOL_DOCUMENT_ROOT . '/core/class/html.formcompany.class.php';
35
-require_once DOL_DOCUMENT_ROOT . '/core/class/html.formfile.class.php';
36
-require_once DOL_DOCUMENT_ROOT . '/core/class/html.formprojet.class.php';
37
-require_once DOL_DOCUMENT_ROOT . '/hrm/class/position.class.php';
38
-require_once DOL_DOCUMENT_ROOT . '/hrm/class/job.class.php';
39
-require_once DOL_DOCUMENT_ROOT . '/hrm/lib/hrm_position.lib.php';
34
+require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
35
+require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
36
+require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php';
37
+require_once DOL_DOCUMENT_ROOT.'/hrm/class/position.class.php';
38
+require_once DOL_DOCUMENT_ROOT.'/hrm/class/job.class.php';
39
+require_once DOL_DOCUMENT_ROOT.'/hrm/lib/hrm_position.lib.php';
40 40
 //dol_include_once('/hrm/position.php');
41 41
 
42 42
 /**
@@ -48,10 +48,10 @@  discard block
 block discarded – undo
48 48
  */
49 49
 
50 50
 // Get Parameters
51
-$action 	= GETPOST('action', 'aZ09') ? GETPOST('action', 'aZ09') : 'view'; // The action 'add', 'create', 'edit', 'update', 'view', ...
51
+$action = GETPOST('action', 'aZ09') ? GETPOST('action', 'aZ09') : 'view'; // The action 'add', 'create', 'edit', 'update', 'view', ...
52 52
 $backtopage = GETPOST('backtopage', 'alpha');
53 53
 $backtopageforcancel = GETPOST('backtopageforcancel', 'alpha');
54
-$id 	= GETPOSTINT('id');
54
+$id = GETPOSTINT('id');
55 55
 
56 56
 // Initialize a technical objects
57 57
 $form = new Form($db);
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
 $permissiontoadd = $user->hasRight('hrm', 'all', 'write'); // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php
67 67
 $permissiontodelete = $user->hasRight('hrm', 'all', 'delete');
68 68
 $permissiondellink = $user->hasRight('hrm', 'all', 'write'); // Used by the include of actions_dellink.inc.php
69
-$upload_dir = $conf->hrm->multidir_output[isset($object->entity) ? $object->entity : 1] . '/position';
69
+$upload_dir = $conf->hrm->multidir_output[isset($object->entity) ? $object->entity : 1].'/position';
70 70
 
71 71
 // Security check (enable the most restrictive one)
72 72
 //if ($user->socid > 0) accessforbidden();
@@ -85,10 +85,10 @@  discard block
 block discarded – undo
85 85
 
86 86
 
87 87
 // Get parameters
88
-$id 	= GETPOSTINT('id');
88
+$id = GETPOSTINT('id');
89 89
 $fk_job = GETPOSTINT('fk_job');
90 90
 
91
-$ref 	= GETPOST('ref', 'alpha');
91
+$ref = GETPOST('ref', 'alpha');
92 92
 $action = GETPOST('action', 'aZ09');
93 93
 $confirm = GETPOST('confirm', 'alpha');
94 94
 $cancel = GETPOST('cancel');
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
 
107 107
 $extrafields = new ExtraFields($db);
108 108
 
109
-$diroutputmassaction = $conf->hrm->dir_output . '/temp/massgeneration/' . $user->id;
109
+$diroutputmassaction = $conf->hrm->dir_output.'/temp/massgeneration/'.$user->id;
110 110
 $hookmanager->initHooks(array('positioncard', 'globalcard')); // Note that conf->hooks_modules contains array
111 111
 
112 112
 // Fetch optionals attributes and labels
@@ -118,8 +118,8 @@  discard block
 block discarded – undo
118 118
 $search_all = GETPOST("search_all", 'alpha');
119 119
 $search = array();
120 120
 foreach ($object->fields as $key => $val) {
121
-	if (GETPOST('search_' . $key, 'alpha')) {
122
-		$search[$key] = GETPOST('search_' . $key, 'alpha');
121
+	if (GETPOST('search_'.$key, 'alpha')) {
122
+		$search[$key] = GETPOST('search_'.$key, 'alpha');
123 123
 	}
124 124
 }
125 125
 
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
 }
129 129
 
130 130
 // Load object
131
-include DOL_DOCUMENT_ROOT . '/core/actions_fetchobject.inc.php'; // Must be 'include', not 'include_once'.
131
+include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be 'include', not 'include_once'.
132 132
 
133 133
 
134 134
 /*
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
 			if (empty($id) && (($action != 'add' && $action != 'create') || $cancel)) {
152 152
 				$backtopage = $backurlforlist;
153 153
 			} else {
154
-				$backtopage = dol_buildpath('/hrm/position_card.php', 1) . '?id=' . ($id > 0 ? $id : '__ID__');
154
+				$backtopage = dol_buildpath('/hrm/position_card.php', 1).'?id='.($id > 0 ? $id : '__ID__');
155 155
 			}
156 156
 		}
157 157
 	}
@@ -159,19 +159,19 @@  discard block
 block discarded – undo
159 159
 	$triggermodname = 'HRM_POSITION_MODIFY'; // Name of trigger action code to execute when we modify record
160 160
 
161 161
 	// Actions cancel, add, update, update_extras, confirm_validate, confirm_delete, confirm_deleteline, confirm_clone, confirm_close, confirm_setdraft, confirm_reopen
162
-	include DOL_DOCUMENT_ROOT . '/core/actions_addupdatedelete.inc.php';
162
+	include DOL_DOCUMENT_ROOT.'/core/actions_addupdatedelete.inc.php';
163 163
 
164 164
 	// Actions when linking object each other
165
-	include DOL_DOCUMENT_ROOT . '/core/actions_dellink.inc.php';
165
+	include DOL_DOCUMENT_ROOT.'/core/actions_dellink.inc.php';
166 166
 
167 167
 	// Actions when printing a doc from card
168
-	include DOL_DOCUMENT_ROOT . '/core/actions_printing.inc.php';
168
+	include DOL_DOCUMENT_ROOT.'/core/actions_printing.inc.php';
169 169
 
170 170
 	// Action to move up and down lines of object
171 171
 	//include DOL_DOCUMENT_ROOT.'/core/actions_lineupdown.inc.php';
172 172
 
173 173
 	// Action to build doc
174
-	include DOL_DOCUMENT_ROOT . '/core/actions_builddoc.inc.php';
174
+	include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php';
175 175
 
176 176
 	if ($action == 'set_thirdparty' && $permissiontoadd) {
177 177
 		$object->setValueFrom('fk_soc', GETPOSTINT('fk_soc'), '', null, 'date', '', $user, $triggermodname);
@@ -183,8 +183,8 @@  discard block
 block discarded – undo
183 183
 	// Actions to send emails
184 184
 	$triggersendname = 'HRM_POSITION_SENTBYMAIL';
185 185
 	$autocopy = 'MAIN_MAIL_AUTOCOPY_POSITION_TO';
186
-	$trackid = 'position' . $object->id;
187
-	include DOL_DOCUMENT_ROOT . '/core/actions_sendmails.inc.php';
186
+	$trackid = 'position'.$object->id;
187
+	include DOL_DOCUMENT_ROOT.'/core/actions_sendmails.inc.php';
188 188
 }
189 189
 
190 190
 
@@ -229,36 +229,36 @@  discard block
 block discarded – undo
229 229
 
230 230
 	// Part to edit record
231 231
 	if (($id || $ref) && $action == 'edit') {
232
-		print load_fiche_titre($langs->trans("Position"), '', 'object_' . $object->picto);
232
+		print load_fiche_titre($langs->trans("Position"), '', 'object_'.$object->picto);
233 233
 
234
-		print '<form method="POST" action="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '">';
235
-		print '<input type="hidden" name="token" value="' . newToken() . '">';
234
+		print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'">';
235
+		print '<input type="hidden" name="token" value="'.newToken().'">';
236 236
 		print '<input type="hidden" name="action" value="update">';
237
-		print '<input type="hidden" name="id" value="' . $object->id . '">';
237
+		print '<input type="hidden" name="id" value="'.$object->id.'">';
238 238
 
239 239
 		if ($backtopage) {
240
-			print '<input type="hidden" name="backtopage" value="' . $backtopage . '">';
240
+			print '<input type="hidden" name="backtopage" value="'.$backtopage.'">';
241 241
 		}
242 242
 		if ($backtopageforcancel) {
243
-			print '<input type="hidden" name="backtopageforcancel" value="' . $backtopageforcancel . '">';
243
+			print '<input type="hidden" name="backtopageforcancel" value="'.$backtopageforcancel.'">';
244 244
 		}
245 245
 
246 246
 		print dol_get_fiche_head();
247 247
 
248
-		print '<table class="border centpercent tableforfieldedit">' . "\n";
248
+		print '<table class="border centpercent tableforfieldedit">'."\n";
249 249
 
250 250
 		// Common attributes
251
-		include DOL_DOCUMENT_ROOT . '/core/tpl/commonfields_edit.tpl.php';
251
+		include DOL_DOCUMENT_ROOT.'/core/tpl/commonfields_edit.tpl.php';
252 252
 
253 253
 		// Other attributes
254
-		include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_edit.tpl.php';
254
+		include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_edit.tpl.php';
255 255
 
256 256
 		print '</table>';
257 257
 
258 258
 		print dol_get_fiche_end();
259 259
 
260
-		print '<div class="center"><input type="submit" class="button button-save" name="save" value="' . $langs->trans("Save") . '">';
261
-		print ' &nbsp; <input type="submit" class="button button-cancel" name="cancel" value="' . $langs->trans("Cancel") . '">';
260
+		print '<div class="center"><input type="submit" class="button button-save" name="save" value="'.$langs->trans("Save").'">';
261
+		print ' &nbsp; <input type="submit" class="button button-cancel" name="cancel" value="'.$langs->trans("Cancel").'">';
262 262
 		print '</div>';
263 263
 
264 264
 		print '</form>';
@@ -312,7 +312,7 @@  discard block
 block discarded – undo
312 312
 		print '<div class="fichecenter">';
313 313
 		print '<div class="fichehalfleft">';
314 314
 		print '<div class="underbanner clearboth"></div>';
315
-		print '<table class="border centpercent tableforfield">' . "\n";
315
+		print '<table class="border centpercent tableforfield">'."\n";
316 316
 
317 317
 		// Common attributes
318 318
 		//$keyforbreak='fieldkeytoswitchonsecondcolumn';	// We change column just before this field
@@ -320,10 +320,10 @@  discard block
 block discarded – undo
320 320
 		//unset($object->fields['fk_soc']);					// Hide field already shown in banner
321 321
 		$object->fields['fk_user']['visible'] = 0; // Already in banner
322 322
 		$object->fields['fk_job']['visible'] = 0; // Already in banner
323
-		include DOL_DOCUMENT_ROOT . '/core/tpl/commonfields_view.tpl.php';
323
+		include DOL_DOCUMENT_ROOT.'/core/tpl/commonfields_view.tpl.php';
324 324
 
325 325
 		// Other attributes. Fields from hook formObjectOptions and Extrafields.
326
-		include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_view.tpl.php';
326
+		include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php';
327 327
 
328 328
 		print '</table>';
329 329
 		print '</div>';
@@ -342,10 +342,10 @@  discard block
 block discarded – undo
342 342
 		$reshook = $hookmanager->executeHooks('addMoreActionsButtons', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
343 343
 
344 344
 
345
-		print dolGetButtonAction($langs->trans('Modify'), '', 'default', $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&action=edit&token=' . newToken(), '', $permissiontoadd);
345
+		print dolGetButtonAction($langs->trans('Modify'), '', 'default', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=edit&token='.newToken(), '', $permissiontoadd);
346 346
 
347 347
 		// Delete (need delete permission, or if draft, just need create/modify permission)
348
-		print dolGetButtonAction($langs->trans('Delete'), '', 'delete', $_SERVER['PHP_SELF'] . '?id=' . $object->id . '&action=delete&token=' . newToken(), '', $permissiontodelete);
348
+		print dolGetButtonAction($langs->trans('Delete'), '', 'delete', $_SERVER['PHP_SELF'].'?id='.$object->id.'&action=delete&token='.newToken(), '', $permissiontodelete);
349 349
 	}
350 350
 }
351 351
 
@@ -383,10 +383,10 @@  discard block
 block discarded – undo
383 383
 //}
384 384
 
385 385
 
386
-print '</table>' . "\n";
387
-print '</div>' . "\n";
386
+print '</table>'."\n";
387
+print '</div>'."\n";
388 388
 
389
-print '</form>' . "\n";
389
+print '</form>'."\n";
390 390
 
391 391
 
392 392
 if ($action !== 'edit' && $action !== 'create') {
@@ -407,9 +407,9 @@  discard block
 block discarded – undo
407 407
 	$morehtmlcenter = dolGetButtonTitle($langs->trans('SeeAll'), '', 'fa fa-bars imgforviewmode', DOL_URL_ROOT.'/hrm/position_agenda.php?id='.$object->id);
408 408
 
409 409
 	// List of actions on element
410
-	include_once DOL_DOCUMENT_ROOT . '/core/class/html.formactions.class.php';
410
+	include_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php';
411 411
 	$formactions = new FormActions($db);
412
-	$somethingshown = $formactions->showactions($object, $object->element . '@' . $object->module, (is_object($object->thirdparty) ? $object->thirdparty->id : 0), 1, '', $MAXEVENT, '', $morehtmlcenter);
412
+	$somethingshown = $formactions->showactions($object, $object->element.'@'.$object->module, (is_object($object->thirdparty) ? $object->thirdparty->id : 0), 1, '', $MAXEVENT, '', $morehtmlcenter);
413 413
 
414 414
 	print '</div></div>';
415 415
 }
Please login to merge, or discard this patch.
htdocs/modulebuilder/template/myobject_card.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -101,15 +101,15 @@
 block discarded – undo
101 101
 // Get parameters
102 102
 $id = GETPOSTINT('id');
103 103
 $ref = GETPOST('ref', 'alpha');
104
-$lineid   = GETPOSTINT('lineid');
104
+$lineid = GETPOSTINT('lineid');
105 105
 //$socid = GETPOSTINT('socid');
106 106
 
107 107
 $action = GETPOST('action', 'aZ09');
108 108
 $confirm = GETPOST('confirm', 'alpha');
109 109
 $cancel = GETPOST('cancel');
110 110
 $contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : getDolDefaultContextPage(__FILE__); // To manage different context of search
111
-$backtopage = GETPOST('backtopage', 'alpha');					// if not set, a default page will be used
112
-$backtopageforcancel = GETPOST('backtopageforcancel', 'alpha');	// if not set, $backtopage will be used
111
+$backtopage = GETPOST('backtopage', 'alpha'); // if not set, a default page will be used
112
+$backtopageforcancel = GETPOST('backtopageforcancel', 'alpha'); // if not set, $backtopage will be used
113 113
 $optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print')
114 114
 $dol_openinpopup = GETPOST('dol_openinpopup', 'aZ09');
115 115
 
Please login to merge, or discard this patch.
admin/tools/ui/experimental/experiments/dolibarr-context/langs-tool.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
 }
34 34
 
35 35
 // Includes
36
-require_once DOL_DOCUMENT_ROOT . '/admin/tools/ui/class/documentation.class.php';
36
+require_once DOL_DOCUMENT_ROOT.'/admin/tools/ui/class/documentation.class.php';
37 37
 
38 38
 // Load documentation translations
39 39
 $langs->load('uxdocumentation');
@@ -43,14 +43,14 @@  discard block
 block discarded – undo
43 43
 $group = 'ExperimentalUx';
44 44
 $experimentName = 'UxDolibarrContextLangsTool';
45 45
 
46
-$experimentAssetsPath = $documentation->baseUrl . '/experimental/experiments/dolibarr-context/assets/';
46
+$experimentAssetsPath = $documentation->baseUrl.'/experimental/experiments/dolibarr-context/assets/';
47 47
 $js = [
48 48
 	'/includes/ace/src/ace.js',
49 49
 	'/includes/ace/src/ext-statusbar.js',
50 50
 	'/includes/ace/src/ext-language_tools.js',
51
-	$experimentAssetsPath . '/dolibarr-context.umd.js',
52
-	$experimentAssetsPath . '/dolibarr-tool.langs.js',
53
-	$experimentAssetsPath . '/dolibarr-tool.seteventmessage.js',
51
+	$experimentAssetsPath.'/dolibarr-context.umd.js',
52
+	$experimentAssetsPath.'/dolibarr-tool.langs.js',
53
+	$experimentAssetsPath.'/dolibarr-tool.seteventmessage.js',
54 54
 ];
55 55
 $css = [];
56 56
 
Please login to merge, or discard this patch.