Completed
Branch develop (300f3a)
by
unknown
17:22
created
htdocs/core/modules/hrm/doc/pdf_standard.modules.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -210,7 +210,7 @@  discard block
 block discarded – undo
210 210
 				$pdf->SetFont(pdf_getPDFFont($outputlangs));
211 211
 				// Set path to the background PDF File
212 212
 				if (!empty($conf->global->MAIN_ADD_PDF_BACKGROUND)) {
213
-					$pagecount = $pdf->setSourceFile($conf->mycompany->dir_output.'/' . getDolGlobalString('MAIN_ADD_PDF_BACKGROUND'));
213
+					$pagecount = $pdf->setSourceFile($conf->mycompany->dir_output.'/'.getDolGlobalString('MAIN_ADD_PDF_BACKGROUND'));
214 214
 					$tplidx = $pdf->importPage(1);
215 215
 				}
216 216
 
@@ -250,8 +250,8 @@  discard block
 block discarded – undo
250 250
 					$tab_top = 65;
251 251
 
252 252
 					$pdf->SetFont('', 'B', $default_font_size);
253
-					$pdf->MultiCell(190, 4, $outputlangs->transnoentities("Notes") . ":", 0, 'L', 0, '', 12, $tab_top);
254
-					$tab_top +=4;
253
+					$pdf->MultiCell(190, 4, $outputlangs->transnoentities("Notes").":", 0, 'L', 0, '', 12, $tab_top);
254
+					$tab_top += 4;
255 255
 					$pdf->SetFont('', '', $default_font_size - 1);
256 256
 					$pdf->writeHTMLCell(190, 3, $this->posxnotes + 1, $tab_top + 1, dol_htmlentitiesbr($object->note_public), 0, 1);
257 257
 					$nexY = $pdf->GetY();
@@ -484,7 +484,7 @@  discard block
 block discarded – undo
484 484
 			// No fill color
485 485
 			$pdf->SetFillColor(255, 255, 255);
486 486
 		}
487
-		$result = (($objectligne->required_rank != 0 && $objectligne->rankorder != 0) ? $objectligne->rankorder . "/" . $objectligne->required_rank : "-");
487
+		$result = (($objectligne->required_rank != 0 && $objectligne->rankorder != 0) ? $objectligne->rankorder."/".$objectligne->required_rank : "-");
488 488
 		$pdf->MultiCell($this->posxresult - 210 - 0.8 - 4, 4, $result, 0, 'C', 1);
489 489
 
490 490
 
@@ -503,7 +503,7 @@  discard block
 block discarded – undo
503 503
 		$comment = $skill->label;
504 504
 
505 505
 		if (!empty($skill->description)) {
506
-			$comment .= '<br>' . $outputlangs->trans("Description").': '.$skill->description;
506
+			$comment .= '<br>'.$outputlangs->trans("Description").': '.$skill->description;
507 507
 		}
508 508
 		$pdf->writeHTMLCell($this->posxrankemp - $this->posxskill - 0.8, 4, $this->posxskill - 1, $curY, $comment, 0, 1);
509 509
 
@@ -587,7 +587,7 @@  discard block
 block discarded – undo
587 587
 			// employee informations
588 588
 			$employee = new User($this->db);
589 589
 			$employee->fetch($object->fk_user);
590
-			$carac_emetteur .= ($carac_emetteur ? "\n" : '').$outputlangs->transnoentities('Employee').' : '.$outputlangs->convToOutputCharset(ucfirst($employee->firstname) . ' ' . strtoupper($employee->lastname));
590
+			$carac_emetteur .= ($carac_emetteur ? "\n" : '').$outputlangs->transnoentities('Employee').' : '.$outputlangs->convToOutputCharset(ucfirst($employee->firstname).' '.strtoupper($employee->lastname));
591 591
 
592 592
 			// Position
593 593
 			$job = new Job($db);
Please login to merge, or discard this patch.
htdocs/projet/tasks/time.php 1 patch
Spacing   +168 added lines, -168 removed lines patch added patch discarded remove patch
@@ -30,14 +30,14 @@  discard block
 block discarded – undo
30 30
 
31 31
 // Load Dolibarr environment
32 32
 require '../../main.inc.php';
33
-require_once DOL_DOCUMENT_ROOT . '/projet/class/project.class.php';
34
-require_once DOL_DOCUMENT_ROOT . '/projet/class/task.class.php';
35
-require_once DOL_DOCUMENT_ROOT . '/compta/facture/class/facture.class.php';
36
-require_once DOL_DOCUMENT_ROOT . '/core/lib/project.lib.php';
37
-require_once DOL_DOCUMENT_ROOT . '/core/lib/date.lib.php';
38
-require_once DOL_DOCUMENT_ROOT . '/core/class/html.formother.class.php';
39
-require_once DOL_DOCUMENT_ROOT . '/core/class/html.formprojet.class.php';
40
-require_once DOL_DOCUMENT_ROOT . '/core/class/html.formintervention.class.php';
33
+require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
34
+require_once DOL_DOCUMENT_ROOT.'/projet/class/task.class.php';
35
+require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
36
+require_once DOL_DOCUMENT_ROOT.'/core/lib/project.lib.php';
37
+require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
38
+require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
39
+require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php';
40
+require_once DOL_DOCUMENT_ROOT.'/core/class/html.formintervention.class.php';
41 41
 
42 42
 // Load translation files required by the page
43 43
 $langsLoad = array('projects', 'bills', 'orders', 'companies');
@@ -161,10 +161,10 @@  discard block
 block discarded – undo
161 161
 // Definition of fields for list
162 162
 $arrayfields = array();
163 163
 $arrayfields['t.element_date'] = array('label'=>$langs->trans("Date"), 'checked'=>1);
164
-$arrayfields['p.fk_soc'] = array('label'=>$langs->trans("ThirdParty"), 'type'=>'integer:Societe:/societe/class/societe.class.php:1','checked'=>1);
164
+$arrayfields['p.fk_soc'] = array('label'=>$langs->trans("ThirdParty"), 'type'=>'integer:Societe:/societe/class/societe.class.php:1', 'checked'=>1);
165 165
 $arrayfields['s.name_alias'] = array('label'=>$langs->trans("AliasNameShort"), 'type'=>'integer:Societe:/societe/class/societe.class.php:1');
166 166
 if ((empty($id) && empty($ref)) || !empty($projectidforalltimes)) {	// Not a dedicated task
167
-	if (! empty($allprojectforuser)) {
167
+	if (!empty($allprojectforuser)) {
168 168
 		$arrayfields['p.project_ref'] = ['label' => $langs->trans('RefProject'), 'checked' => 1];
169 169
 		$arrayfields['p.project_label'] = ['label' => $langs->trans('ProjectLabel'), 'checked' => 1];
170 170
 	}
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
 $arrayfields['value'] = array('label'=>$langs->trans("Value"), 'checked'=>1, 'enabled'=>isModEnabled("salaries"));
181 181
 $arrayfields['valuebilled'] = array('label'=>$langs->trans("Billed"), 'checked'=>1, 'enabled'=>(((getDolGlobalInt('PROJECT_HIDE_TASKS') || !getDolGlobalInt('PROJECT_BILL_TIME_SPENT')) ? 0 : 1) && $projectstatic->usage_bill_time));
182 182
 // Extra fields
183
-include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_list_array_fields.tpl.php';
183
+include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_array_fields.tpl.php';
184 184
 
185 185
 $arrayfields = dol_sort_array($arrayfields, 'position');
186 186
 
@@ -191,7 +191,7 @@  discard block
 block discarded – undo
191 191
 	setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
192 192
 }
193 193
 
194
-include DOL_DOCUMENT_ROOT . '/core/actions_changeselectedfields.inc.php';
194
+include DOL_DOCUMENT_ROOT.'/core/actions_changeselectedfields.inc.php';
195 195
 
196 196
 // Purge search criteria
197 197
 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
@@ -381,10 +381,10 @@  discard block
 block discarded – undo
381 381
 }
382 382
 
383 383
 if ($action == 'confirm_deleteline' && $confirm == "yes" && ($user->hasRight('projet', 'time') || $user->hasRight('projet', 'all', 'creer'))) {
384
-	$object->fetchTimeSpent(GETPOST('lineid', 'int'));    // load properties like $object->timespent_xxx
384
+	$object->fetchTimeSpent(GETPOST('lineid', 'int')); // load properties like $object->timespent_xxx
385 385
 
386 386
 	if (in_array($object->timespent_fk_user, $childids) || $user->hasRight('projet', 'all', 'creer')) {
387
-		$result = $object->delTimeSpent($user);    // delete line with $object->timespent_id
387
+		$result = $object->delTimeSpent($user); // delete line with $object->timespent_id
388 388
 
389 389
 		if ($result < 0) {
390 390
 			$langs->load("errors");
@@ -404,7 +404,7 @@  discard block
 block discarded – undo
404 404
 		if (count($tasksarray) > 0) {
405 405
 			$id = $tasksarray[0]->id;
406 406
 		} else {
407
-			header("Location: " . DOL_URL_ROOT . '/projet/tasks.php?id=' . $projectstatic->id . ($withproject ? '&withproject=1' : '') . (empty($mode) ? '' : '&mode=' . $mode));
407
+			header("Location: ".DOL_URL_ROOT.'/projet/tasks.php?id='.$projectstatic->id.($withproject ? '&withproject=1' : '').(empty($mode) ? '' : '&mode='.$mode));
408 408
 			exit;
409 409
 		}
410 410
 	}
@@ -441,9 +441,9 @@  discard block
 block discarded – undo
441 441
 	if (!($projectstatic->thirdparty->id > 0)) {
442 442
 		setEventMessages($langs->trans("ThirdPartyRequiredToGenerateInvoice"), null, 'errors');
443 443
 	} else {
444
-		include_once DOL_DOCUMENT_ROOT . '/compta/facture/class/facture.class.php';
445
-		include_once DOL_DOCUMENT_ROOT . '/projet/class/project.class.php';
446
-		include_once DOL_DOCUMENT_ROOT . '/product/class/product.class.php';
444
+		include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
445
+		include_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
446
+		include_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
447 447
 
448 448
 		$tmpinvoice = new Facture($db);
449 449
 		$tmptimespent = new Task($db);
@@ -508,7 +508,7 @@  discard block
 block discarded – undo
508 508
 				$arrayoftasks = array();
509 509
 				foreach ($toselect as $key => $value) {
510 510
 					// Get userid, timepent
511
-					$object->fetchTimeSpent($value);    // $value is ID of 1 line in timespent table
511
+					$object->fetchTimeSpent($value); // $value is ID of 1 line in timespent table
512 512
 					$arrayoftasks[$object->timespent_fk_user][(int) $object->timespent_fk_product]['timespent'] += $object->timespent_duration;
513 513
 					$arrayoftasks[$object->timespent_fk_user][(int) $object->timespent_fk_product]['totalvaluetodivideby3600'] += ($object->timespent_duration * $object->timespent_thm);
514 514
 				}
@@ -580,7 +580,7 @@  discard block
 block discarded – undo
580 580
 						}
581 581
 
582 582
 						// Add lines
583
-						$lineid = $tmpinvoice->addline($langs->trans("TimeSpentForInvoice", $username) . ' : ' . $qtyhourtext, $pu_htline, round($qtyhour / $prodDurationHours, 2), $txtvaline, $localtax1line, $localtax2line, ($idprodline > 0 ? $idprodline : 0));
583
+						$lineid = $tmpinvoice->addline($langs->trans("TimeSpentForInvoice", $username).' : '.$qtyhourtext, $pu_htline, round($qtyhour / $prodDurationHours, 2), $txtvaline, $localtax1line, $localtax2line, ($idprodline > 0 ? $idprodline : 0));
584 584
 						if ($lineid < 0) {
585 585
 							$error++;
586 586
 							setEventMessages(null, $tmpinvoice->errors, 'errors');
@@ -613,16 +613,16 @@  discard block
 block discarded – undo
613 613
 
614 614
 					$arrayoftasks[$object->timespent_id]['timespent'] = $object->timespent_duration;
615 615
 					$arrayoftasks[$object->timespent_id]['totalvaluetodivideby3600'] = $object->timespent_duration * $object->timespent_thm;
616
-					$arrayoftasks[$object->timespent_id]['note'] = $ftask->ref . ' - ' . $ftask->label . ' - ' . $username;
616
+					$arrayoftasks[$object->timespent_id]['note'] = $ftask->ref.' - '.$ftask->label.' - '.$username;
617 617
 					$arrayoftasks[$object->timespent_id]['note'] = dol_concatdesc($arrayoftasks[$object->timespent_id]['note'], $object->timespent_note);
618 618
 
619 619
 					if (!empty($withdetail)) {
620 620
 						if (!empty($object->timespent_withhour)) {
621
-							$arrayoftasks[$object->timespent_id]['note'] = dol_concatdesc($arrayoftasks[$object->timespent_id]['note'], $langs->trans("Date") . ': ' . dol_print_date($object->timespent_datehour));
621
+							$arrayoftasks[$object->timespent_id]['note'] = dol_concatdesc($arrayoftasks[$object->timespent_id]['note'], $langs->trans("Date").': '.dol_print_date($object->timespent_datehour));
622 622
 						} else {
623
-							$arrayoftasks[$object->timespent_id]['note'] = dol_concatdesc($arrayoftasks[$object->timespent_id]['note'], $langs->trans("Date") . ': ' . dol_print_date($object->timespent_date));
623
+							$arrayoftasks[$object->timespent_id]['note'] = dol_concatdesc($arrayoftasks[$object->timespent_id]['note'], $langs->trans("Date").': '.dol_print_date($object->timespent_date));
624 624
 						}
625
-						$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));
625
+						$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));
626 626
 					}
627 627
 					$arrayoftasks[$object->timespent_id]['user'] = $object->timespent_fk_user;
628 628
 					$arrayoftasks[$object->timespent_id]['fk_product'] = $object->timespent_fk_product;
@@ -700,7 +700,7 @@  discard block
 block discarded – undo
700 700
 				$arrayoftasks = array();
701 701
 				foreach ($toselect as $key => $value) {
702 702
 					// Get userid, timepent
703
-					$object->fetchTimeSpent($value);        // Call method to get list of timespent for a timespent line id (We use the utiliy method found into Task object)
703
+					$object->fetchTimeSpent($value); // Call method to get list of timespent for a timespent line id (We use the utiliy method found into Task object)
704 704
 					// $object->id is now the task id
705 705
 					$arrayoftasks[$object->id][(int) $object->timespent_fk_product]['timespent'] += $object->timespent_duration;
706 706
 					$arrayoftasks[$object->id][(int) $object->timespent_fk_product]['totalvaluetodivideby3600'] += ($object->timespent_duration * $object->timespent_thm);
@@ -776,7 +776,7 @@  discard block
 block discarded – undo
776 776
 						// Add lines
777 777
 						$date_start = '';
778 778
 						$date_end = '';
779
-						$lineName = $ftask->ref . ' - ' . $ftask->label;
779
+						$lineName = $ftask->ref.' - '.$ftask->label;
780 780
 						$lineid = $tmpinvoice->addline($lineName, $pu_ht_for_task, price2num($qtyhour / $prodDurationHours, 'MS'), $txtvaline, $localtax1line, $localtax2line, ($idprodline > 0 ? $idprodline : 0), 0, $date_start, $date_end, 0, 0, '', 'HT', 0, 1, -1, 0, '', 0, 0, null, $pa_ht);
781 781
 						if ($lineid < 0) {
782 782
 							$error++;
@@ -786,8 +786,8 @@  discard block
 block discarded – undo
786 786
 
787 787
 						if (!$error) {
788 788
 							// Update lineid into line of timespent
789
-							$sql = 'UPDATE ' . MAIN_DB_PREFIX . 'element_time SET invoice_line_id = ' . ((int) $lineid) . ', invoice_id = ' . ((int) $tmpinvoice->id);
790
-							$sql .= ' WHERE rowid IN (' . $db->sanitize(join(',', $toselect)) . ')';
789
+							$sql = 'UPDATE '.MAIN_DB_PREFIX.'element_time SET invoice_line_id = '.((int) $lineid).', invoice_id = '.((int) $tmpinvoice->id);
790
+							$sql .= ' WHERE rowid IN ('.$db->sanitize(join(',', $toselect)).')';
791 791
 							$result = $db->query($sql);
792 792
 							if (!$result) {
793 793
 								$error++;
@@ -823,12 +823,12 @@  discard block
 block discarded – undo
823 823
 	if (!($projectstatic->thirdparty->id > 0)) {
824 824
 		setEventMessages($langs->trans("ThirdPartyRequiredToGenerateIntervention"), null, 'errors');
825 825
 	} else {
826
-		include_once DOL_DOCUMENT_ROOT . '/compta/facture/class/facture.class.php';
827
-		include_once DOL_DOCUMENT_ROOT . '/projet/class/project.class.php';
828
-		include_once DOL_DOCUMENT_ROOT . '/product/class/product.class.php';
826
+		include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
827
+		include_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
828
+		include_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
829 829
 
830 830
 
831
-		require_once DOL_DOCUMENT_ROOT . '/fichinter/class/fichinter.class.php';
831
+		require_once DOL_DOCUMENT_ROOT.'/fichinter/class/fichinter.class.php';
832 832
 		$tmpinter = new Fichinter($db);
833 833
 		$tmptimespent = new Task($db);
834 834
 		$fuser = new User($db);
@@ -840,7 +840,7 @@  discard block
 block discarded – undo
840 840
 		$tmpinter->socid = $projectstatic->thirdparty->id;
841 841
 		$tmpinter->date = dol_mktime(GETPOST('rehour', 'int'), GETPOST('remin', 'int'), GETPOST('resec', 'int'), GETPOST('remonth', 'int'), GETPOST('reday', 'int'), GETPOST('reyear', 'int'));
842 842
 		$tmpinter->fk_project = $projectstatic->id;
843
-		$tmpinter->description = $projectstatic->title . (!empty($projectstatic->description) ? '-' . $projectstatic->label : '');
843
+		$tmpinter->description = $projectstatic->title.(!empty($projectstatic->description) ? '-'.$projectstatic->label : '');
844 844
 
845 845
 		if ($interToUse) {
846 846
 			$tmpinter->fetch($interToUse);
@@ -873,7 +873,7 @@  discard block
 block discarded – undo
873 873
 				$qtyhourtext = convertSecondToTime($value['timespent'], 'all', $conf->global->MAIN_DURATION_OF_WORKDAY);
874 874
 
875 875
 				// Add lines
876
-				$lineid = $tmpinter->addline($user, $tmpinter->id, $ftask->label . (!empty($value['note']) ? ' - ' . $value['note'] : ''), $value['date'], $value['timespent']);
876
+				$lineid = $tmpinter->addline($user, $tmpinter->id, $ftask->label.(!empty($value['note']) ? ' - '.$value['note'] : ''), $value['date'], $value['timespent']);
877 877
 			}
878 878
 		}
879 879
 
@@ -904,9 +904,9 @@  discard block
 block discarded – undo
904 904
 //$result = $projectstatic->fetch($object->fk_project);
905 905
 $arrayofselected = is_array($toselect) ? $toselect : array();
906 906
 
907
-$title = $object->ref . ' - ' . $langs->trans("TimeSpent");
907
+$title = $object->ref.' - '.$langs->trans("TimeSpent");
908 908
 if (!empty($withproject)) {
909
-	$title .= ' | ' . $langs->trans("Project") . (!empty($projectstatic->ref) ? ': ' . $projectstatic->ref : '');
909
+	$title .= ' | '.$langs->trans("Project").(!empty($projectstatic->ref) ? ': '.$projectstatic->ref : '');
910 910
 }
911 911
 $help_url = '';
912 912
 
@@ -955,13 +955,13 @@  discard block
 block discarded – undo
955 955
 
956 956
 			$param = ((!empty($mode) && $mode == 'mine') ? '&mode=mine' : '');
957 957
 			if ($search_user) {
958
-				$param .= '&search_user=' . ((int) $search_user);
958
+				$param .= '&search_user='.((int) $search_user);
959 959
 			}
960 960
 			if ($search_month) {
961
-				$param .= '&search_month=' . ((int) $search_month);
961
+				$param .= '&search_month='.((int) $search_month);
962 962
 			}
963 963
 			if ($search_year) {
964
-				$param .= '&search_year=' . ((int) $search_year);
964
+				$param .= '&search_year='.((int) $search_year);
965 965
 			}
966 966
 
967 967
 			// Project card
@@ -973,14 +973,14 @@  discard block
 block discarded – undo
973 973
 			$morehtmlref .= $projectstatic->title;
974 974
 			// Thirdparty
975 975
 			if (!empty($projectstatic->thirdparty->id) && $projectstatic->thirdparty->id > 0) {
976
-				$morehtmlref .= '<br>' . $projectstatic->thirdparty->getNomUrl(1, 'project');
976
+				$morehtmlref .= '<br>'.$projectstatic->thirdparty->getNomUrl(1, 'project');
977 977
 			}
978 978
 			$morehtmlref .= '</div>';
979 979
 
980 980
 			// Define a complementary filter for search of next/prev ref.
981 981
 			if (!$user->hasRight('projet', 'all', 'lire')) {
982 982
 				$objectsListId = $projectstatic->getProjectsAuthorizedForUser($user, 0, 0);
983
-				$projectstatic->next_prev_filter = "rowid IN (" . $db->sanitize(count($objectsListId) ? join(',', array_keys($objectsListId)) : '0') . ")";
983
+				$projectstatic->next_prev_filter = "rowid IN (".$db->sanitize(count($objectsListId) ? join(',', array_keys($objectsListId)) : '0').")";
984 984
 			}
985 985
 
986 986
 			dol_banner_tab($projectstatic, 'project_ref', $linkback, 1, 'ref', 'ref', $morehtmlref, $param);
@@ -998,25 +998,25 @@  discard block
 block discarded – undo
998 998
 				print '</td>';
999 999
 				print '<td>';
1000 1000
 				if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES)) {
1001
-					print '<input type="checkbox" disabled name="usage_opportunity"' . (GETPOSTISSET('usage_opportunity') ? (GETPOST('usage_opportunity', 'alpha') != '' ? ' checked="checked"' : '') : ($projectstatic->usage_opportunity ? ' checked="checked"' : '')) . '"> ';
1001
+					print '<input type="checkbox" disabled name="usage_opportunity"'.(GETPOSTISSET('usage_opportunity') ? (GETPOST('usage_opportunity', 'alpha') != '' ? ' checked="checked"' : '') : ($projectstatic->usage_opportunity ? ' checked="checked"' : '')).'"> ';
1002 1002
 					$htmltext = $langs->trans("ProjectFollowOpportunity");
1003 1003
 					print $form->textwithpicto($langs->trans("ProjectFollowOpportunity"), $htmltext);
1004 1004
 					print '<br>';
1005 1005
 				}
1006 1006
 				if (empty($conf->global->PROJECT_HIDE_TASKS)) {
1007
-					print '<input type="checkbox" disabled name="usage_task"' . (GETPOSTISSET('usage_task') ? (GETPOST('usage_task', 'alpha') != '' ? ' checked="checked"' : '') : ($projectstatic->usage_task ? ' checked="checked"' : '')) . '"> ';
1007
+					print '<input type="checkbox" disabled name="usage_task"'.(GETPOSTISSET('usage_task') ? (GETPOST('usage_task', 'alpha') != '' ? ' checked="checked"' : '') : ($projectstatic->usage_task ? ' checked="checked"' : '')).'"> ';
1008 1008
 					$htmltext = $langs->trans("ProjectFollowTasks");
1009 1009
 					print $form->textwithpicto($langs->trans("ProjectFollowTasks"), $htmltext);
1010 1010
 					print '<br>';
1011 1011
 				}
1012 1012
 				if (empty($conf->global->PROJECT_HIDE_TASKS) && !empty($conf->global->PROJECT_BILL_TIME_SPENT)) {
1013
-					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"' : '')) . '"> ';
1013
+					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"' : '')).'"> ';
1014 1014
 					$htmltext = $langs->trans("ProjectBillTimeDescription");
1015 1015
 					print $form->textwithpicto($langs->trans("BillTime"), $htmltext);
1016 1016
 					print '<br>';
1017 1017
 				}
1018 1018
 				if (isModEnabled('eventorganization')) {
1019
-					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"' : '')) . '"> ';
1019
+					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"' : '')).'"> ';
1020 1020
 					$htmltext = $langs->trans("EventOrganizationDescriptionLong");
1021 1021
 					print $form->textwithpicto($langs->trans("ManageOrganizeEvent"), $htmltext);
1022 1022
 				}
@@ -1024,7 +1024,7 @@  discard block
 block discarded – undo
1024 1024
 			}
1025 1025
 
1026 1026
 			// Visibility
1027
-			print '<tr><td class="titlefield">' . $langs->trans("Visibility") . '</td><td>';
1027
+			print '<tr><td class="titlefield">'.$langs->trans("Visibility").'</td><td>';
1028 1028
 			if ($projectstatic->public) {
1029 1029
 				print img_picto($langs->trans('SharedProject'), 'world', 'class="paddingrightonly"');
1030 1030
 				print $langs->trans('SharedProject');
@@ -1035,14 +1035,14 @@  discard block
 block discarded – undo
1035 1035
 			print '</td></tr>';
1036 1036
 
1037 1037
 			// Budget
1038
-			print '<tr><td>' . $langs->trans("Budget") . '</td><td>';
1038
+			print '<tr><td>'.$langs->trans("Budget").'</td><td>';
1039 1039
 			if (!is_null($projectstatic->budget_amount) && strcmp($projectstatic->budget_amount, '')) {
1040
-				print '<span class="amount">' . price($projectstatic->budget_amount, '', $langs, 1, 0, 0, $conf->currency) . '</span>';
1040
+				print '<span class="amount">'.price($projectstatic->budget_amount, '', $langs, 1, 0, 0, $conf->currency).'</span>';
1041 1041
 			}
1042 1042
 			print '</td></tr>';
1043 1043
 
1044 1044
 			// Date start - end project
1045
-			print '<tr><td>' . $langs->trans("Dates") . '</td><td>';
1045
+			print '<tr><td>'.$langs->trans("Dates").'</td><td>';
1046 1046
 			$start = dol_print_date($projectstatic->date_start, 'day');
1047 1047
 			print ($start ? $start : '?');
1048 1048
 			$end = dol_print_date($projectstatic->date_end, 'day');
@@ -1057,7 +1057,7 @@  discard block
 block discarded – undo
1057 1057
 			$cols = 2;
1058 1058
 			$savobject = $object;
1059 1059
 			$object = $projectstatic;
1060
-			include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_view.tpl.php';
1060
+			include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php';
1061 1061
 			$object = $savobject;
1062 1062
 
1063 1063
 			print '</table>';
@@ -1075,7 +1075,7 @@  discard block
 block discarded – undo
1075 1075
 
1076 1076
 			// Categories
1077 1077
 			if (isModEnabled('categorie')) {
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
 			}
@@ -1104,12 +1104,12 @@  discard block
 block discarded – undo
1104 1104
 
1105 1105
 				if (!empty($projectidforalltimes)) {
1106 1106
 					// We are on tab 'Time Spent' of project
1107
-					$backtourl = $_SERVER['PHP_SELF'] . '?projectid=' . $projectstatic->id . ($withproject ? '&withproject=1' : '');
1108
-					$linktocreatetimeUrl = $_SERVER['PHP_SELF'] . '?' . ($withproject ? 'withproject=1' : '') . '&projectid=' . $projectstatic->id . '&action=createtime&token=' . newToken() . $param . '&backtopage=' . urlencode($backtourl);
1107
+					$backtourl = $_SERVER['PHP_SELF'].'?projectid='.$projectstatic->id.($withproject ? '&withproject=1' : '');
1108
+					$linktocreatetimeUrl = $_SERVER['PHP_SELF'].'?'.($withproject ? 'withproject=1' : '').'&projectid='.$projectstatic->id.'&action=createtime&token='.newToken().$param.'&backtopage='.urlencode($backtourl);
1109 1109
 				} else {
1110 1110
 					// We are on tab 'Time Spent' of task
1111
-					$backtourl = $_SERVER['PHP_SELF'] . '?id=' . $object->id . ($withproject ? '&withproject=1' : '');
1112
-					$linktocreatetimeUrl = $_SERVER['PHP_SELF'] . '?' . ($withproject ? 'withproject=1' : '') . ($object->id > 0 ? '&id=' . $object->id : '&projectid=' . $projectstatic->id) . '&action=createtime&token=' . newToken() . $param . '&backtopage=' . urlencode($backtourl);
1111
+					$backtourl = $_SERVER['PHP_SELF'].'?id='.$object->id.($withproject ? '&withproject=1' : '');
1112
+					$linktocreatetimeUrl = $_SERVER['PHP_SELF'].'?'.($withproject ? 'withproject=1' : '').($object->id > 0 ? '&id='.$object->id : '&projectid='.$projectstatic->id).'&action=createtime&token='.newToken().$param.'&backtopage='.urlencode($backtourl);
1113 1113
 				}
1114 1114
 			} else {
1115 1115
 				$linktocreatetimeBtnStatus = -2;
@@ -1154,19 +1154,19 @@  discard block
 block discarded – undo
1154 1154
 		print dol_get_fiche_head($head, 'task_time', $langs->trans("Task"), -1, 'projecttask', 0, '', 'reposition');
1155 1155
 
1156 1156
 		if ($action == 'deleteline') {
1157
-			$urlafterconfirm = $_SERVER["PHP_SELF"] . "?" . ($object->id > 0 ? "id=" . $object->id : 'projectid=' . $projectstatic->id) . '&lineid=' . GETPOST("lineid", 'int') . ($withproject ? '&withproject=1' : '');
1157
+			$urlafterconfirm = $_SERVER["PHP_SELF"]."?".($object->id > 0 ? "id=".$object->id : 'projectid='.$projectstatic->id).'&lineid='.GETPOST("lineid", 'int').($withproject ? '&withproject=1' : '');
1158 1158
 			print $form->formconfirm($urlafterconfirm, $langs->trans("DeleteATimeSpent"), $langs->trans("ConfirmDeleteATimeSpent"), "confirm_deleteline", '', '', 1);
1159 1159
 		}
1160 1160
 
1161 1161
 		$param = ($withproject ? '&withproject=1' : '');
1162
-		$param .= ($param ? '&' : '') . 'id=' . $object->id;        // ID of task
1163
-		$linkback = $withproject ? '<a href="' . DOL_URL_ROOT . '/projet/tasks.php?id=' . $projectstatic->id . '">' . $langs->trans("BackToList") . '</a>' : '';
1162
+		$param .= ($param ? '&' : '').'id='.$object->id; // ID of task
1163
+		$linkback = $withproject ? '<a href="'.DOL_URL_ROOT.'/projet/tasks.php?id='.$projectstatic->id.'">'.$langs->trans("BackToList").'</a>' : '';
1164 1164
 
1165 1165
 		if (!GETPOST('withproject') || empty($projectstatic->id)) {
1166 1166
 			$projectsListId = $projectstatic->getProjectsAuthorizedForUser($user, 0, 1);
1167
-			$object->next_prev_filter = "fk_projet IN (" . $db->sanitize($projectsListId) . ")";
1167
+			$object->next_prev_filter = "fk_projet IN (".$db->sanitize($projectsListId).")";
1168 1168
 		} else {
1169
-			$object->next_prev_filter = "fk_projet = " . ((int) $projectstatic->id);
1169
+			$object->next_prev_filter = "fk_projet = ".((int) $projectstatic->id);
1170 1170
 		}
1171 1171
 
1172 1172
 		$morehtmlref = '';
@@ -1174,12 +1174,12 @@  discard block
 block discarded – undo
1174 1174
 		// Project
1175 1175
 		if (empty($withproject)) {
1176 1176
 			$morehtmlref .= '<div class="refidno">';
1177
-			$morehtmlref .= $langs->trans("Project") . ': ';
1177
+			$morehtmlref .= $langs->trans("Project").': ';
1178 1178
 			$morehtmlref .= $projectstatic->getNomUrl(1);
1179 1179
 			$morehtmlref .= '<br>';
1180 1180
 
1181 1181
 			// Third party
1182
-			$morehtmlref .= $langs->trans("ThirdParty") . ': ';
1182
+			$morehtmlref .= $langs->trans("ThirdParty").': ';
1183 1183
 			if (!empty($projectstatic->thirdparty) && is_object($projectstatic->thirdparty)) {
1184 1184
 				$morehtmlref .= $projectstatic->thirdparty->getNomUrl(1);
1185 1185
 			}
@@ -1195,7 +1195,7 @@  discard block
 block discarded – undo
1195 1195
 		print '<table class="border centpercent tableforfield">';
1196 1196
 
1197 1197
 		// Task parent
1198
-		print '<tr><td>' . $langs->trans("ChildOfTask") . '</td><td>';
1198
+		print '<tr><td>'.$langs->trans("ChildOfTask").'</td><td>';
1199 1199
 		if ($object->fk_task_parent > 0) {
1200 1200
 			$tasktmp = new Task($db);
1201 1201
 			$tasktmp->fetch($object->fk_task_parent);
@@ -1204,7 +1204,7 @@  discard block
 block discarded – undo
1204 1204
 		print '</td></tr>';
1205 1205
 
1206 1206
 		// Date start - Date end task
1207
-		print '<tr><td class="titlefield">' . $langs->trans("DateStart") . ' - ' . $langs->trans("Deadline") . '</td><td>';
1207
+		print '<tr><td class="titlefield">'.$langs->trans("DateStart").' - '.$langs->trans("Deadline").'</td><td>';
1208 1208
 		$start = dol_print_date($object->date_start, 'dayhour');
1209 1209
 		print ($start ? $start : '?');
1210 1210
 		$end = dol_print_date($object->date_end, 'dayhour');
@@ -1216,7 +1216,7 @@  discard block
 block discarded – undo
1216 1216
 		print '</td></tr>';
1217 1217
 
1218 1218
 		// Planned workload
1219
-		print '<tr><td>' . $langs->trans("PlannedWorkload") . '</td><td>';
1219
+		print '<tr><td>'.$langs->trans("PlannedWorkload").'</td><td>';
1220 1220
 		if ($object->planned_workload) {
1221 1221
 			print convertSecondToTime($object->planned_workload, 'allhourmin');
1222 1222
 		}
@@ -1231,21 +1231,21 @@  discard block
 block discarded – undo
1231 1231
 		print '<table class="border tableforfield centpercent">';
1232 1232
 
1233 1233
 		// Progress declared
1234
-		print '<tr><td class="titlefield">' . $langs->trans("ProgressDeclared") . '</td><td>';
1235
-		print $object->progress != '' ? $object->progress . ' %' : '';
1234
+		print '<tr><td class="titlefield">'.$langs->trans("ProgressDeclared").'</td><td>';
1235
+		print $object->progress != '' ? $object->progress.' %' : '';
1236 1236
 		print '</td></tr>';
1237 1237
 
1238 1238
 		// Progress calculated
1239
-		print '<tr><td>' . $langs->trans("ProgressCalculated") . '</td><td>';
1239
+		print '<tr><td>'.$langs->trans("ProgressCalculated").'</td><td>';
1240 1240
 		if ($object->planned_workload) {
1241 1241
 			$tmparray = $object->getSummaryOfTimeSpent();
1242 1242
 			if ($tmparray['total_duration'] > 0) {
1243
-				print round($tmparray['total_duration'] / $object->planned_workload * 100, 2) . ' %';
1243
+				print round($tmparray['total_duration'] / $object->planned_workload * 100, 2).' %';
1244 1244
 			} else {
1245 1245
 				print '0 %';
1246 1246
 			}
1247 1247
 		} else {
1248
-			print '<span class="opacitymedium">' . $langs->trans("WorkloadNotDefined") . '</span>';
1248
+			print '<span class="opacitymedium">'.$langs->trans("WorkloadNotDefined").'</span>';
1249 1249
 		}
1250 1250
 		print '</td>';
1251 1251
 
@@ -1261,7 +1261,7 @@  discard block
 block discarded – undo
1261 1261
 		print dol_get_fiche_end();
1262 1262
 	} else {
1263 1263
 		if ($action == 'deleteline') {
1264
-			$urlafterconfirm = $_SERVER["PHP_SELF"] . "?" . ($object->id > 0 ? "id=" . $object->id : 'projectid=' . $projectstatic->id) . '&lineid=' . GETPOST("lineid", 'int') . ($withproject ? '&withproject=1' : '');
1264
+			$urlafterconfirm = $_SERVER["PHP_SELF"]."?".($object->id > 0 ? "id=".$object->id : 'projectid='.$projectstatic->id).'&lineid='.GETPOST("lineid", 'int').($withproject ? '&withproject=1' : '');
1265 1265
 			print $form->formconfirm($urlafterconfirm, $langs->trans("DeleteATimeSpent"), $langs->trans("ConfirmDeleteATimeSpent"), "confirm_deleteline", '', '', 1);
1266 1266
 		}
1267 1267
 	}
@@ -1275,7 +1275,7 @@  discard block
 block discarded – undo
1275 1275
 
1276 1276
 		if ($action == 'deleteline' && !empty($projectidforalltimes)) {
1277 1277
 			// We must use projectidprojectid if on list of timespent of project and id=taskid if on list of timespent of a task
1278
-			$urlafterconfirm = $_SERVER["PHP_SELF"] . "?" . ($projectstatic->id > 0 ? 'projectid=' . $projectstatic->id : ($object->id > 0 ? "id=" . $object->id : '')) . '&lineid=' . GETPOST('lineid', 'int') . ($withproject ? '&withproject=1' : '') . "&contextpage=" . urlencode($contextpage);
1278
+			$urlafterconfirm = $_SERVER["PHP_SELF"]."?".($projectstatic->id > 0 ? 'projectid='.$projectstatic->id : ($object->id > 0 ? "id=".$object->id : '')).'&lineid='.GETPOST('lineid', 'int').($withproject ? '&withproject=1' : '')."&contextpage=".urlencode($contextpage);
1279 1279
 			$formconfirm = $form->formconfirm($urlafterconfirm, $langs->trans("DeleteATimeSpent"), $langs->trans("ConfirmDeleteATimeSpent"), "confirm_deleteline", '', '', 1);
1280 1280
 		}
1281 1281
 
@@ -1295,76 +1295,76 @@  discard block
 block discarded – undo
1295 1295
 
1296 1296
 		$param = '';
1297 1297
 		if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) {
1298
-			$param .= '&contextpage=' . urlencode($contextpage);
1298
+			$param .= '&contextpage='.urlencode($contextpage);
1299 1299
 		}
1300 1300
 		if ($limit > 0 && $limit != $conf->liste_limit) {
1301 1301
 			$param .= '&limit='.((int) $limit);
1302 1302
 		}
1303 1303
 		if ($search_month > 0) {
1304
-			$param .= '&search_month=' . urlencode($search_month);
1304
+			$param .= '&search_month='.urlencode($search_month);
1305 1305
 		}
1306 1306
 		if ($search_year > 0) {
1307
-			$param .= '&search_year=' . urlencode($search_year);
1307
+			$param .= '&search_year='.urlencode($search_year);
1308 1308
 		}
1309 1309
 		if (!empty($search_user)) { 	// We keep param if -1 because default value is forced to user id if not set
1310 1310
 			$param .= '&search_user='.urlencode($search_user);
1311 1311
 		}
1312 1312
 		if ($search_task_ref != '') {
1313
-			$param .= '&search_task_ref=' . urlencode($search_task_ref);
1313
+			$param .= '&search_task_ref='.urlencode($search_task_ref);
1314 1314
 		}
1315 1315
 		if ($search_company != '') {
1316
-			$param .= '&amp;$search_company=' . urlencode($search_company);
1316
+			$param .= '&amp;$search_company='.urlencode($search_company);
1317 1317
 		}
1318 1318
 		if ($search_company_alias != '') {
1319
-			$param .= '&amp;$search_company_alias=' . urlencode($search_company_alias);
1319
+			$param .= '&amp;$search_company_alias='.urlencode($search_company_alias);
1320 1320
 		}
1321 1321
 		if ($search_project_ref != '') {
1322
-			$param .= '&amp;$search_project_ref=' . urlencode($search_project_ref);
1322
+			$param .= '&amp;$search_project_ref='.urlencode($search_project_ref);
1323 1323
 		}
1324 1324
 		if ($search_project_label != '') {
1325
-			$param .= '&amp;$search_project_label=' . urlencode($search_project_label);
1325
+			$param .= '&amp;$search_project_label='.urlencode($search_project_label);
1326 1326
 		}
1327 1327
 		if ($search_task_label != '') {
1328
-			$param .= '&search_task_label=' . urlencode($search_task_label);
1328
+			$param .= '&search_task_label='.urlencode($search_task_label);
1329 1329
 		}
1330 1330
 		if ($search_note != '') {
1331
-			$param .= '&search_note=' . urlencode($search_note);
1331
+			$param .= '&search_note='.urlencode($search_note);
1332 1332
 		}
1333 1333
 		if ($search_duration != '') {
1334
-			$param .= '&amp;search_field2=' . urlencode($search_duration);
1334
+			$param .= '&amp;search_field2='.urlencode($search_duration);
1335 1335
 		}
1336 1336
 		if ($optioncss != '') {
1337
-			$param .= '&optioncss=' . urlencode($optioncss);
1337
+			$param .= '&optioncss='.urlencode($optioncss);
1338 1338
 		}
1339 1339
 		if ($search_date_startday) {
1340
-			$param .= '&search_date_startday=' . urlencode($search_date_startday);
1340
+			$param .= '&search_date_startday='.urlencode($search_date_startday);
1341 1341
 		}
1342 1342
 		if ($search_date_startmonth) {
1343
-			$param .= '&search_date_startmonth=' . urlencode($search_date_startmonth);
1343
+			$param .= '&search_date_startmonth='.urlencode($search_date_startmonth);
1344 1344
 		}
1345 1345
 		if ($search_date_startyear) {
1346
-			$param .= '&search_date_startyear=' . urlencode($search_date_startyear);
1346
+			$param .= '&search_date_startyear='.urlencode($search_date_startyear);
1347 1347
 		}
1348 1348
 		if ($search_date_endday) {
1349
-			$param .= '&search_date_endday=' . urlencode($search_date_endday);
1349
+			$param .= '&search_date_endday='.urlencode($search_date_endday);
1350 1350
 		}
1351 1351
 		if ($search_date_endmonth) {
1352
-			$param .= '&search_date_endmonth=' . urlencode($search_date_endmonth);
1352
+			$param .= '&search_date_endmonth='.urlencode($search_date_endmonth);
1353 1353
 		}
1354 1354
 		if ($search_date_endyear) {
1355
-			$param .= '&search_date_endyear=' . urlencode($search_date_endyear);
1355
+			$param .= '&search_date_endyear='.urlencode($search_date_endyear);
1356 1356
 		}
1357 1357
 		if ($search_timespent_starthour) {
1358
-			$param .= '&search_timespent_duration_starthour=' . urlencode($search_timespent_starthour);
1358
+			$param .= '&search_timespent_duration_starthour='.urlencode($search_timespent_starthour);
1359 1359
 		}
1360 1360
 		if ($search_timespent_startmin) {
1361
-			$param .= '&search_timespent_duration_startmin=' . urlencode($search_timespent_startmin);
1361
+			$param .= '&search_timespent_duration_startmin='.urlencode($search_timespent_startmin);
1362 1362
 		}
1363 1363
 		if ($search_timespent_endhour) {
1364
-			$param .= '&search_timespent_duration_endhour=' . urlencode($search_timespent_endhour);
1364
+			$param .= '&search_timespent_duration_endhour='.urlencode($search_timespent_endhour);
1365 1365
 		}
1366 1366
 		if ($search_timespent_endmin) {
1367
-			$param .= '&search_timespent_duration_endmin=' . urlencode($search_timespent_endmin);
1367
+			$param .= '&search_timespent_duration_endmin='.urlencode($search_timespent_endmin);
1368 1368
 		}
1369 1369
 
1370 1370
 		/*
@@ -1372,24 +1372,24 @@  discard block
 block discarded – undo
1372 1372
 		 include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php';
1373 1373
 		 */
1374 1374
 		if ($id) {
1375
-			$param .= '&id=' . urlencode($id);
1375
+			$param .= '&id='.urlencode($id);
1376 1376
 		}
1377 1377
 		if ($projectid) {
1378
-			$param .= '&projectid=' . urlencode($projectid);
1378
+			$param .= '&projectid='.urlencode($projectid);
1379 1379
 		}
1380 1380
 		if ($withproject) {
1381
-			$param .= '&withproject=' . urlencode($withproject);
1381
+			$param .= '&withproject='.urlencode($withproject);
1382 1382
 		}
1383 1383
 		// Add $param from hooks
1384 1384
 		$parameters = array();
1385 1385
 		$reshook = $hookmanager->executeHooks('printFieldListSearchParam', $parameters, $object); // Note that $action and $object may have been modified by hook
1386 1386
 		$param .= $hookmanager->resPrint;
1387 1387
 
1388
-		print '<form method="POST" action="' . $_SERVER["PHP_SELF"] . '">';
1388
+		print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">';
1389 1389
 		if ($optioncss != '') {
1390
-			print '<input type="hidden" name="optioncss" value="' . $optioncss . '">';
1390
+			print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
1391 1391
 		}
1392
-		print '<input type="hidden" name="token" value="' . newToken() . '">';
1392
+		print '<input type="hidden" name="token" value="'.newToken().'">';
1393 1393
 		print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
1394 1394
 		if ($action == 'editline') {
1395 1395
 			print '<input type="hidden" name="action" value="updateline">';
@@ -1404,13 +1404,13 @@  discard block
 block discarded – undo
1404 1404
 		} else {
1405 1405
 			print '<input type="hidden" name="action" value="list">';
1406 1406
 		}
1407
-		print '<input type="hidden" name="sortfield" value="' . $sortfield . '">';
1408
-		print '<input type="hidden" name="sortorder" value="' . $sortorder . '">';
1407
+		print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
1408
+		print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
1409 1409
 
1410
-		print '<input type="hidden" name="id" value="' . $id . '">';
1411
-		print '<input type="hidden" name="projectid" value="' . $projectidforalltimes . '">';
1412
-		print '<input type="hidden" name="withproject" value="' . $withproject . '">';
1413
-		print '<input type="hidden" name="tab" value="' . $tab . '">';
1410
+		print '<input type="hidden" name="id" value="'.$id.'">';
1411
+		print '<input type="hidden" name="projectid" value="'.$projectidforalltimes.'">';
1412
+		print '<input type="hidden" name="withproject" value="'.$withproject.'">';
1413
+		print '<input type="hidden" name="tab" value="'.$tab.'">';
1414 1414
 		print '<input type="hidden" name="page_y" value="">';
1415 1415
 
1416 1416
 		// Form to convert time spent into invoice
@@ -1437,7 +1437,7 @@  discard block
 block discarded – undo
1437 1437
 					'onelineperperiod' => 'OneLinePerTimeSpentLine',
1438 1438
 				);
1439 1439
 				print $form->selectarray('generateinvoicemode', $tmparray, 'onelineperuser', 0, 0, 0, '', 1);
1440
-				print "\n" . '<script type="text/javascript">';
1440
+				print "\n".'<script type="text/javascript">';
1441 1441
 				print '
1442 1442
 				$(document).ready(function () {
1443 1443
 					setDetailVisibility();
@@ -1454,8 +1454,8 @@  discard block
 block discarded – undo
1454 1454
             		}
1455 1455
             	});
1456 1456
             			';
1457
-				print '</script>' . "\n";
1458
-				print '<span style="display:none" id="detail_time_duration"><input type="checkbox" value="detail" name="detail_time_duration"/>' . $langs->trans('AddDetailDateAndDuration') . '</span>';
1457
+				print '</script>'."\n";
1458
+				print '<span style="display:none" id="detail_time_duration"><input type="checkbox" value="detail" name="detail_time_duration"/>'.$langs->trans('AddDetailDateAndDuration').'</span>';
1459 1459
 				print '</td>';
1460 1460
 				print '</tr>';
1461 1461
 
@@ -1490,14 +1490,14 @@  discard block
 block discarded – undo
1490 1490
 
1491 1491
 				print '<br>';
1492 1492
 				print '<div class="center">';
1493
-				print '<input type="submit" class="button" id="createbills" name="createbills" value="' . $langs->trans('GenerateBill') . '">  ';
1494
-				print '<input type="submit" class="button button-cancel" id="cancel" name="cancel" value="' . $langs->trans("Cancel") . '">';
1493
+				print '<input type="submit" class="button" id="createbills" name="createbills" value="'.$langs->trans('GenerateBill').'">  ';
1494
+				print '<input type="submit" class="button button-cancel" id="cancel" name="cancel" value="'.$langs->trans("Cancel").'">';
1495 1495
 				print '</div>';
1496 1496
 				print '<br>';
1497 1497
 			} else {
1498
-				print '<div class="warning">' . $langs->trans("ThirdPartyRequiredToGenerateInvoice") . '</div>';
1498
+				print '<div class="warning">'.$langs->trans("ThirdPartyRequiredToGenerateInvoice").'</div>';
1499 1499
 				print '<div class="center">';
1500
-				print '<input type="submit" class="button button-cancel" id="cancel" name="cancel" value="' . $langs->trans("Cancel") . '">';
1500
+				print '<input type="submit" class="button button-cancel" id="cancel" name="cancel" value="'.$langs->trans("Cancel").'">';
1501 1501
 				print '</div>';
1502 1502
 				$massaction = '';
1503 1503
 			}
@@ -1510,7 +1510,7 @@  discard block
 block discarded – undo
1510 1510
 				print '<table class="noborder centpercent">';
1511 1511
 				print '<tr>';
1512 1512
 				print '<td class="titlefield">';
1513
-				print img_picto('', 'intervention', 'class="pictofixedwidth"') . $langs->trans('InterToUse');
1513
+				print img_picto('', 'intervention', 'class="pictofixedwidth"').$langs->trans('InterToUse');
1514 1514
 				print '</td>';
1515 1515
 				print '<td>';
1516 1516
 				$forminter = new FormIntervention($db);
@@ -1520,14 +1520,14 @@  discard block
 block discarded – undo
1520 1520
 				print '</table>';
1521 1521
 
1522 1522
 				print '<div class="center">';
1523
-				print '<input type="submit" class="button" id="createinter" name="createinter" value="' . $langs->trans('GenerateInter') . '">  ';
1524
-				print '<input type="submit" class="button" id="cancel" name="cancel" value="' . $langs->trans('Cancel') . '">';
1523
+				print '<input type="submit" class="button" id="createinter" name="createinter" value="'.$langs->trans('GenerateInter').'">  ';
1524
+				print '<input type="submit" class="button" id="cancel" name="cancel" value="'.$langs->trans('Cancel').'">';
1525 1525
 				print '</div>';
1526 1526
 				print '<br>';
1527 1527
 			} else {
1528
-				print '<div class="warning">' . $langs->trans("ThirdPartyRequiredToGenerateIntervention") . '</div>';
1528
+				print '<div class="warning">'.$langs->trans("ThirdPartyRequiredToGenerateIntervention").'</div>';
1529 1529
 				print '<div class="center">';
1530
-				print '<input type="submit" class="button" id="cancel" name="cancel" value="' . $langs->trans('Cancel') . '">';
1530
+				print '<input type="submit" class="button" id="cancel" name="cancel" value="'.$langs->trans('Cancel').'">';
1531 1531
 				print '</div>';
1532 1532
 				$massaction = '';
1533 1533
 			}
@@ -1589,13 +1589,13 @@  discard block
 block discarded – undo
1589 1589
 			$sql .= " AND t.fk_element =".((int) $object->id);
1590 1590
 		} elseif (!empty($projectidforalltimes)) {
1591 1591
 			// Limit on one project
1592
-			$sql .= " AND pt.fk_projet IN (" . $db->sanitize($projectidforalltimes) . ")";
1592
+			$sql .= " AND pt.fk_projet IN (".$db->sanitize($projectidforalltimes).")";
1593 1593
 		} elseif (!empty($allprojectforuser)) {
1594 1594
 			// Limit on on user
1595 1595
 			if (empty($search_user)) {
1596 1596
 				$search_user = $user->id;
1597 1597
 			}
1598
-			if ($search_user > 0) $sql .= " AND t.fk_user = " . ((int) $search_user);
1598
+			if ($search_user > 0) $sql .= " AND t.fk_user = ".((int) $search_user);
1599 1599
 		}
1600 1600
 
1601 1601
 		if ($search_note) {
@@ -1647,13 +1647,13 @@  discard block
 block discarded – undo
1647 1647
 			if ($search_timespent_starthour || $search_timespent_startmin) {
1648 1648
 				$timespent_duration_start = $search_timespent_starthour * 60 * 60; // We store duration in seconds
1649 1649
 				$timespent_duration_start += ($search_timespent_startmin ? $search_timespent_startmin : 0) * 60; // We store duration in seconds
1650
-				$sql .= " AND t.element_duration >= " . $timespent_duration_start;
1650
+				$sql .= " AND t.element_duration >= ".$timespent_duration_start;
1651 1651
 			}
1652 1652
 
1653 1653
 			if ($search_timespent_endhour || $search_timespent_endmin) {
1654 1654
 				$timespent_duration_end = $search_timespent_endhour * 60 * 60; // We store duration in seconds
1655 1655
 				$timespent_duration_end += ($search_timespent_endmin ? $search_timespent_endmin : 0) * 60; // We store duration in seconds
1656
-				$sql .= " AND t.element_duration <= " . $timespent_duration_end;
1656
+				$sql .= " AND t.element_duration <= ".$timespent_duration_end;
1657 1657
 			}
1658 1658
 		}
1659 1659
 
@@ -1701,13 +1701,13 @@  discard block
 block discarded – undo
1701 1701
 
1702 1702
 		if ($num >= 0) {
1703 1703
 			if (!empty($projectidforalltimes)) {
1704
-				print '<!-- List of time spent for project -->' . "\n";
1704
+				print '<!-- List of time spent for project -->'."\n";
1705 1705
 
1706 1706
 				$title = $langs->trans("ListTaskTimeUserProject");
1707 1707
 
1708 1708
 				print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'clock', 0, $linktocreatetime, '', $limit, 0, 0, 1);
1709 1709
 			} else {
1710
-				print '<!-- List of time spent -->' . "\n";
1710
+				print '<!-- List of time spent -->'."\n";
1711 1711
 
1712 1712
 				$title = $langs->trans("ListTaskTimeForTask");
1713 1713
 
@@ -1729,26 +1729,26 @@  discard block
 block discarded – undo
1729 1729
 		 * Form to add a new line of time spent
1730 1730
 		 */
1731 1731
 		if ($action == 'createtime' && $user->hasRight('projet', 'time')) {
1732
-			print '<!-- table to add time spent -->' . "\n";
1732
+			print '<!-- table to add time spent -->'."\n";
1733 1733
 			if (!empty($id)) {
1734
-				print '<input type="hidden" name="taskid" value="' . $id . '">';
1734
+				print '<input type="hidden" name="taskid" value="'.$id.'">';
1735 1735
 			}
1736 1736
 
1737 1737
 			print '<div class="div-table-responsive-no-min">'; // You can use div-table-responsive-no-min if you dont need reserved height for your table
1738 1738
 			print '<table class="noborder nohover centpercent">';
1739 1739
 
1740 1740
 			print '<tr class="liste_titre">';
1741
-			print '<td>' . $langs->trans("Date") . '</td>';
1741
+			print '<td>'.$langs->trans("Date").'</td>';
1742 1742
 			if (!empty($allprojectforuser)) {
1743
-				print '<td>' . $langs->trans("Project") . '</td>';
1743
+				print '<td>'.$langs->trans("Project").'</td>';
1744 1744
 			}
1745 1745
 			if (empty($id)) {
1746
-				print '<td>' . $langs->trans("Task") . '</td>';
1746
+				print '<td>'.$langs->trans("Task").'</td>';
1747 1747
 			}
1748
-			print '<td>' . $langs->trans("By") . '</td>';
1749
-			print '<td>' . $langs->trans("Note") . '</td>';
1750
-			print '<td>' . $langs->trans("NewTimeSpent") . '</td>';
1751
-			print '<td>' . $langs->trans("ProgressDeclared") . '</td>';
1748
+			print '<td>'.$langs->trans("By").'</td>';
1749
+			print '<td>'.$langs->trans("Note").'</td>';
1750
+			print '<td>'.$langs->trans("NewTimeSpent").'</td>';
1751
+			print '<td>'.$langs->trans("ProgressDeclared").'</td>';
1752 1752
 			if (empty($conf->global->PROJECT_HIDE_TASKS) && !empty($conf->global->PROJECT_BILL_TIME_SPENT)) {
1753 1753
 				print '<td></td>';
1754 1754
 
@@ -1802,14 +1802,14 @@  discard block
 block discarded – undo
1802 1802
 				print $form->select_dolusers((GETPOST('userid', 'int') ? GETPOST('userid', 'int') : $userid), 'userid', 0, '', 0, '', $contactsofproject, 0, 0, 0, '', 0, $langs->trans("ResourceNotAssignedToProject"), 'minwidth150imp maxwidth200');
1803 1803
 			} else {
1804 1804
 				if ($nboftasks) {
1805
-					print img_error($langs->trans('FirstAddRessourceToAllocateTime')) . ' ' . $langs->trans('FirstAddRessourceToAllocateTime');
1805
+					print img_error($langs->trans('FirstAddRessourceToAllocateTime')).' '.$langs->trans('FirstAddRessourceToAllocateTime');
1806 1806
 				}
1807 1807
 			}
1808 1808
 			print '</td>';
1809 1809
 
1810 1810
 			// Note
1811 1811
 			print '<td>';
1812
-			print '<textarea name="timespent_note" class="maxwidth100onsmartphone" rows="' . ROWS_2 . '">' . (GETPOST('timespent_note') ? GETPOST('timespent_note') : '') . '</textarea>';
1812
+			print '<textarea name="timespent_note" class="maxwidth100onsmartphone" rows="'.ROWS_2.'">'.(GETPOST('timespent_note') ? GETPOST('timespent_note') : '').'</textarea>';
1813 1813
 			print '</td>';
1814 1814
 
1815 1815
 			// Duration - Time spent
@@ -1877,7 +1877,7 @@  discard block
 block discarded – undo
1877 1877
 		$selectedfields .= (is_array($arrayofmassactions) && count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : '');
1878 1878
 
1879 1879
 		print '<div class="div-table-responsive">';
1880
-		print '<table class="tagtable nobottomiftotal liste' . ($moreforfilter ? " listwithfilterbefore" : "") . '">' . "\n";
1880
+		print '<table class="tagtable nobottomiftotal liste'.($moreforfilter ? " listwithfilterbefore" : "").'">'."\n";
1881 1881
 
1882 1882
 		// Fields title search
1883 1883
 		// --------------------------------------------------------------------
@@ -1902,20 +1902,20 @@  discard block
 block discarded – undo
1902 1902
 		}
1903 1903
 		// Thirdparty
1904 1904
 		if (!empty($arrayfields['p.fk_soc']['checked'])) {
1905
-			print '<td class="liste_titre"><input type="text" class="flat maxwidth100" name="$search_company" value="' . dol_escape_htmltag($search_company) . '"></td>';
1905
+			print '<td class="liste_titre"><input type="text" class="flat maxwidth100" name="$search_company" value="'.dol_escape_htmltag($search_company).'"></td>';
1906 1906
 		}
1907 1907
 
1908 1908
 		// Thirdparty alias
1909 1909
 		if (!empty($arrayfields['s.name_alias']['checked'])) {
1910
-			print '<td class="liste_titre"><input type="text" class="flat maxwidth100" name="$search_company_alias" value="' . dol_escape_htmltag($search_company_alias) . '"></td>';
1910
+			print '<td class="liste_titre"><input type="text" class="flat maxwidth100" name="$search_company_alias" value="'.dol_escape_htmltag($search_company_alias).'"></td>';
1911 1911
 		}
1912 1912
 
1913 1913
 		if (!empty($allprojectforuser)) {
1914 1914
 			if (!empty($arrayfields['p.project_ref']['checked'])) {
1915
-				print '<td class="liste_titre"><input type="text" class="flat maxwidth100" name="$search_project_ref" value="' . dol_escape_htmltag($search_project_ref) . '"></td>';
1915
+				print '<td class="liste_titre"><input type="text" class="flat maxwidth100" name="$search_project_ref" value="'.dol_escape_htmltag($search_project_ref).'"></td>';
1916 1916
 			}
1917 1917
 			if (!empty($arrayfields['p.project_label']['checked'])) {
1918
-				print '<td class="liste_titre"><input type="text" class="flat maxwidth100" name="$search_project_label" value="' . dol_escape_htmltag($search_project_label) . '"></td>';
1918
+				print '<td class="liste_titre"><input type="text" class="flat maxwidth100" name="$search_project_label" value="'.dol_escape_htmltag($search_project_label).'"></td>';
1919 1919
 			}
1920 1920
 		}
1921 1921
 		// Task
@@ -1933,7 +1933,7 @@  discard block
 block discarded – undo
1933 1933
 		}
1934 1934
 		// Note
1935 1935
 		if (!empty($arrayfields['t.note']['checked'])) {
1936
-			print '<td class="liste_titre"><input type="text" class="flat maxwidth100" name="search_note" value="' . dol_escape_htmltag($search_note) . '"></td>';
1936
+			print '<td class="liste_titre"><input type="text" class="flat maxwidth100" name="search_note" value="'.dol_escape_htmltag($search_note).'"></td>';
1937 1937
 		}
1938 1938
 		// Duration
1939 1939
 		if (!empty($arrayfields['t.element_duration']['checked'])) {
@@ -1944,7 +1944,7 @@  discard block
 block discarded – undo
1944 1944
 			if ($search_timespent_starthour || $search_timespent_startmin) {
1945 1945
 				$durationtouse_start = ($search_timespent_starthour * 3600 + $search_timespent_startmin * 60);
1946 1946
 			}
1947
-			print '<div class="nowraponall">' . $langs->trans('from') . ' ';
1947
+			print '<div class="nowraponall">'.$langs->trans('from').' ';
1948 1948
 			print $form->select_duration('search_timespent_duration_start', $durationtouse_start, 0, 'text', 0, 1);
1949 1949
 			print '</div>';
1950 1950
 
@@ -1952,7 +1952,7 @@  discard block
 block discarded – undo
1952 1952
 			if ($search_timespent_endhour || $search_timespent_endmin) {
1953 1953
 				$durationtouse_end = ($search_timespent_endhour * 3600 + $search_timespent_endmin * 60);
1954 1954
 			}
1955
-			print '<div class="nowraponall">' . $langs->trans('at') . ' ';
1955
+			print '<div class="nowraponall">'.$langs->trans('at').' ';
1956 1956
 			print $form->select_duration('search_timespent_duration_end', $durationtouse_end, 0, 'text', 0, 1);
1957 1957
 			print '</div>';
1958 1958
 
@@ -1968,7 +1968,7 @@  discard block
 block discarded – undo
1968 1968
 		}
1969 1969
 		// Value billed
1970 1970
 		if (!empty($arrayfields['valuebilled']['checked'])) {
1971
-			print '<td class="liste_titre center">' . $form->selectyesno('search_valuebilled', $search_valuebilled, 1, false, 1) . '</td>';
1971
+			print '<td class="liste_titre center">'.$form->selectyesno('search_valuebilled', $search_valuebilled, 1, false, 1).'</td>';
1972 1972
 		}
1973 1973
 
1974 1974
 		/*
@@ -1986,7 +1986,7 @@  discard block
 block discarded – undo
1986 1986
 			print $searchpicto;
1987 1987
 			print '</td>';
1988 1988
 		}
1989
-		print '</tr>' . "\n";
1989
+		print '</tr>'."\n";
1990 1990
 
1991 1991
 		$totalarray = array();
1992 1992
 		$totalarray['nbfield'] = 0;
@@ -2096,7 +2096,7 @@  discard block
 block discarded – undo
2096 2096
 			if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
2097 2097
 				print '<td class="center nowraponall">';
2098 2098
 				if (($action == 'editline' || $action == 'splitline') && GETPOST('lineid', 'int') == $task_time->rowid) {
2099
-					print '<input type="hidden" name="lineid" value="' . GETPOST('lineid', 'int') . '">';
2099
+					print '<input type="hidden" name="lineid" value="'.GETPOST('lineid', 'int').'">';
2100 2100
 					print '<input type="submit" class="button buttongen smallpaddingimp margintoponlyshort marginbottomonlyshort button-save" name="save" value="'.$langs->trans("Save").'">';
2101 2101
 					print '<br>';
2102 2102
 					print '<input type="submit" class="button buttongen smallpaddingimp margintoponlyshort marginbottomonlyshort button-cancel" name="cancel" value="'.$langs->trans("Cancel").'">';
@@ -2104,7 +2104,7 @@  discard block
 block discarded – undo
2104 2104
 					if (in_array($task_time->fk_user, $childids) || $user->hasRight('projet', 'all', 'creer')) {
2105 2105
 						if (getDolGlobalString('MAIN_FEATURES_LEVEL') >= 2) {
2106 2106
 							print '&nbsp;';
2107
-							print '<a class="reposition" href="' . $_SERVER["PHP_SELF"] . '?action=splitline&token=' . newToken() . '&lineid=' . $task_time->rowid . $param . ((empty($id) || $tab == 'timespent') ? '&tab=timespent' : '') . '">';
2107
+							print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=splitline&token='.newToken().'&lineid='.$task_time->rowid.$param.((empty($id) || $tab == 'timespent') ? '&tab=timespent' : '').'">';
2108 2108
 							print img_split('', 'class="pictofixedwidth"');
2109 2109
 							print '</a>';
2110 2110
 						}
@@ -2123,7 +2123,7 @@  discard block
 block discarded – undo
2123 2123
 								$selected = 1;
2124 2124
 							}
2125 2125
 							print '&nbsp;';
2126
-							print '<input id="cb' . $task_time->rowid . '" class="flat checkforselect marginleftonly" type="checkbox" name="toselect[]" value="' . $task_time->rowid . '"' . ($selected ? ' checked="checked"' : '') . '>';
2126
+							print '<input id="cb'.$task_time->rowid.'" class="flat checkforselect marginleftonly" type="checkbox" name="toselect[]" value="'.$task_time->rowid.'"'.($selected ? ' checked="checked"' : '').'>';
2127 2127
 						}
2128 2128
 					}
2129 2129
 				}
@@ -2241,7 +2241,7 @@  discard block
 block discarded – undo
2241 2241
 					}
2242 2242
 				}
2243 2243
 			} elseif ($action !== 'createtime') {
2244
-				print '<input type="hidden" name="taskid" value="' . $id . '">';
2244
+				print '<input type="hidden" name="taskid" value="'.$id.'">';
2245 2245
 			}
2246 2246
 
2247 2247
 			// Task label
@@ -2271,7 +2271,7 @@  discard block
 block discarded – undo
2271 2271
 						print img_object('', 'user', 'class="hideonsmartphone"');
2272 2272
 						print $form->select_dolusers($task_time->fk_user, 'userid_line', 0, '', 0, '', $contactsoftask, '0', 0, 0, '', 0, '', 'maxwidth200');
2273 2273
 					} else {
2274
-						print img_error($langs->trans('FirstAddRessourceToAllocateTime')) . $langs->trans('FirstAddRessourceToAllocateTime');
2274
+						print img_error($langs->trans('FirstAddRessourceToAllocateTime')).$langs->trans('FirstAddRessourceToAllocateTime');
2275 2275
 					}
2276 2276
 				} else {
2277 2277
 					$userstatic->id = $task_time->fk_user;
@@ -2291,7 +2291,7 @@  discard block
 block discarded – undo
2291 2291
 			if (!empty($arrayfields['t.note']['checked'])) {
2292 2292
 				if ($action == 'editline' && GETPOST('lineid', 'int') == $task_time->rowid) {
2293 2293
 					print '<td class="small">';
2294
-					print '<textarea name="timespent_note_line" width="95%" rows="' . ROWS_1 . '">' . dol_escape_htmltag($task_time->note, 0, 1) . '</textarea>';
2294
+					print '<textarea name="timespent_note_line" width="95%" rows="'.ROWS_1.'">'.dol_escape_htmltag($task_time->note, 0, 1).'</textarea>';
2295 2295
 					print '</td>';
2296 2296
 				} else {
2297 2297
 					print '<td class="small tdoverflowmax150 classfortooltip" title="'.dol_string_onlythesehtmltags(dol_htmlentitiesbr($task_time->note)).'">';
@@ -2302,7 +2302,7 @@  discard block
 block discarded – undo
2302 2302
 					$totalarray['nbfield']++;
2303 2303
 				}
2304 2304
 			} elseif ($action == 'editline' && GETPOST('lineid', 'int') == $task_time->rowid) {
2305
-				print '<input type="hidden" name="timespent_note_line" value="' . dol_escape_htmltag($task_time->note, 0, 1) . '">';
2305
+				print '<input type="hidden" name="timespent_note_line" value="'.dol_escape_htmltag($task_time->note, 0, 1).'">';
2306 2306
 			}
2307 2307
 
2308 2308
 			// Time spent
@@ -2362,7 +2362,7 @@  discard block
 block discarded – undo
2362 2362
 				$value = price2num($task_time->thm * $task_time->element_duration / 3600, 'MT', 1);
2363 2363
 
2364 2364
 				print '<td class="nowraponall right">';
2365
-				print '<span class="amount" title="' . $langs->trans("THM") . ': ' . price($task_time->thm) . '">';
2365
+				print '<span class="amount" title="'.$langs->trans("THM").': '.price($task_time->thm).'">';
2366 2366
 				print price($value, 1, $langs, 1, -1, -1, $conf->currency);
2367 2367
 				print '</span>';
2368 2368
 				print '</td>';
@@ -2395,7 +2395,7 @@  discard block
 block discarded – undo
2395 2395
 						if ($task_time->invoice_id) {
2396 2396
 							$result = $tmpinvoice->fetch($task_time->invoice_id);
2397 2397
 							if ($result > 0) {
2398
-								if ($action=='editline' && $_GET['lineid'] == $task_time->rowid) {
2398
+								if ($action == 'editline' && $_GET['lineid'] == $task_time->rowid) {
2399 2399
 									print $formproject->selectInvoiceAndLine($task_time->invoice_id, $task_time->invoice_line_id, 'invoiceid', 'invoicelineid', 'maxwidth500', array('p.rowid'=>$projectstatic->id));
2400 2400
 								} else {
2401 2401
 									print $tmpinvoice->getNomUrl(1);
@@ -2413,7 +2413,7 @@  discard block
 block discarded – undo
2413 2413
 							print $langs->trans("No");
2414 2414
 						}
2415 2415
 					} else {
2416
-						print '<span class="opacitymedium">' . $langs->trans("NA") . '</span>';
2416
+						print '<span class="opacitymedium">'.$langs->trans("NA").'</span>';
2417 2417
 					}
2418 2418
 				}
2419 2419
 				print '</td>';
@@ -2444,7 +2444,7 @@  discard block
 block discarded – undo
2444 2444
 					if (in_array($task_time->fk_user, $childids) || $user->hasRight('projet', 'all', 'creer')) {
2445 2445
 						if (getDolGlobalString('MAIN_FEATURES_LEVEL') >= 2) {
2446 2446
 							print '&nbsp;';
2447
-							print '<a class="reposition" href="' . $_SERVER["PHP_SELF"] . '?action=splitline&token=' . newToken() . '&lineid=' . $task_time->rowid . $param . ((empty($id) || $tab == 'timespent') ? '&tab=timespent' : '') . '">';
2447
+							print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=splitline&token='.newToken().'&lineid='.$task_time->rowid.$param.((empty($id) || $tab == 'timespent') ? '&tab=timespent' : '').'">';
2448 2448
 							print img_split('', 'class="pictofixedwidth"');
2449 2449
 							print '</a>';
2450 2450
 						}
@@ -2463,7 +2463,7 @@  discard block
 block discarded – undo
2463 2463
 								$selected = 1;
2464 2464
 							}
2465 2465
 							print '&nbsp;';
2466
-							print '<input id="cb' . $task_time->rowid . '" class="flat checkforselect marginleftonly" type="checkbox" name="toselect[]" value="' . $task_time->rowid . '"' . ($selected ? ' checked="checked"' : '') . '>';
2466
+							print '<input id="cb'.$task_time->rowid.'" class="flat checkforselect marginleftonly" type="checkbox" name="toselect[]" value="'.$task_time->rowid.'"'.($selected ? ' checked="checked"' : '').'>';
2467 2467
 						}
2468 2468
 					}
2469 2469
 				}
@@ -2553,7 +2553,7 @@  discard block
 block discarded – undo
2553 2553
 							print img_object('', 'user', 'class="hideonsmartphone"');
2554 2554
 							print $form->select_dolusers($task_time->fk_user, 'userid_line', 0, '', 0, '', $contactsoftask);
2555 2555
 						} else {
2556
-							print img_error($langs->trans('FirstAddRessourceToAllocateTime')) . $langs->trans('FirstAddRessourceToAllocateTime');
2556
+							print img_error($langs->trans('FirstAddRessourceToAllocateTime')).$langs->trans('FirstAddRessourceToAllocateTime');
2557 2557
 						}
2558 2558
 					} else {
2559 2559
 						$userstatic->id = $task_time->fk_user;
@@ -2570,13 +2570,13 @@  discard block
 block discarded – undo
2570 2570
 				if (!empty($arrayfields['t.note']['checked'])) {
2571 2571
 					print '<td class="tdoverflowmax300">';
2572 2572
 					if ($action == 'splitline' && GETPOST('lineid', 'int') == $task_time->rowid) {
2573
-						print '<textarea name="timespent_note_line" width="95%" rows="' . ROWS_1 . '">' . dol_escape_htmltag($task_time->note, 0, 1) . '</textarea>';
2573
+						print '<textarea name="timespent_note_line" width="95%" rows="'.ROWS_1.'">'.dol_escape_htmltag($task_time->note, 0, 1).'</textarea>';
2574 2574
 					} else {
2575 2575
 						print dol_nl2br($task_time->note);
2576 2576
 					}
2577 2577
 					print '</td>';
2578 2578
 				} elseif ($action == 'splitline' && GETPOST('lineid', 'int') == $task_time->rowid) {
2579
-					print '<input type="hidden" name="timespent_note_line" rows="' . ROWS_1 . '" value="' . dol_escape_htmltag($task_time->note, 0, 1) . '">';
2579
+					print '<input type="hidden" name="timespent_note_line" rows="'.ROWS_1.'" value="'.dol_escape_htmltag($task_time->note, 0, 1).'">';
2580 2580
 				}
2581 2581
 
2582 2582
 				// Time spent
@@ -2709,7 +2709,7 @@  discard block
 block discarded – undo
2709 2709
 							print img_object('', 'user', 'class="hideonsmartphone"');
2710 2710
 							print $form->select_dolusers($task_time->fk_user, 'userid_line_2', 0, '', 0, '', $contactsoftask);
2711 2711
 						} else {
2712
-							print img_error($langs->trans('FirstAddRessourceToAllocateTime')) . $langs->trans('FirstAddRessourceToAllocateTime');
2712
+							print img_error($langs->trans('FirstAddRessourceToAllocateTime')).$langs->trans('FirstAddRessourceToAllocateTime');
2713 2713
 						}
2714 2714
 					} else {
2715 2715
 						$userstatic->id = $task_time->fk_user;
@@ -2726,13 +2726,13 @@  discard block
 block discarded – undo
2726 2726
 				if (!empty($arrayfields['t.note']['checked'])) {
2727 2727
 					print '<td class="small tdoverflowmax300"">';
2728 2728
 					if ($action == 'splitline' && GETPOST('lineid', 'int') == $task_time->rowid) {
2729
-						print '<textarea name="timespent_note_line_2" width="95%" rows="' . ROWS_1 . '">' . dol_escape_htmltag($task_time->note, 0, 1) . '</textarea>';
2729
+						print '<textarea name="timespent_note_line_2" width="95%" rows="'.ROWS_1.'">'.dol_escape_htmltag($task_time->note, 0, 1).'</textarea>';
2730 2730
 					} else {
2731 2731
 						print dol_nl2br($task_time->note);
2732 2732
 					}
2733 2733
 					print '</td>';
2734 2734
 				} elseif ($action == 'splitline' && GETPOST('lineid', 'int') == $task_time->rowid) {
2735
-					print '<input type="hidden" name="timespent_note_line_2" value="' . dol_escape_htmltag($task_time->note, 0, 1) . '">';
2735
+					print '<input type="hidden" name="timespent_note_line_2" value="'.dol_escape_htmltag($task_time->note, 0, 1).'">';
2736 2736
 				}
2737 2737
 
2738 2738
 				// Time spent
@@ -2804,14 +2804,14 @@  discard block
 block discarded – undo
2804 2804
 				$i++;
2805 2805
 				if ($i == 1) {
2806 2806
 					if ($num < $limit && empty($offset)) {
2807
-						print '<td class="left">' . $langs->trans("Total") . '</td>';
2807
+						print '<td class="left">'.$langs->trans("Total").'</td>';
2808 2808
 					} else {
2809 2809
 						print '<td class="left">'.$form->textwithpicto($langs->trans("Total"), $langs->trans("Totalforthispage")).'</td>';
2810 2810
 					}
2811 2811
 				} elseif (isset($totalarray['totaldurationfield']) && $totalarray['totaldurationfield'] == $i) {
2812
-					print '<td class="right">' . convertSecondToTime($totalarray['totalduration'], 'allhourmin') . '</td>';
2812
+					print '<td class="right">'.convertSecondToTime($totalarray['totalduration'], 'allhourmin').'</td>';
2813 2813
 				} elseif (isset($totalarray['totalvaluefield']) && $totalarray['totalvaluefield'] == $i) {
2814
-					print '<td class="right">' . price($totalarray['totalvalue']) . '</td>';
2814
+					print '<td class="right">'.price($totalarray['totalvalue']).'</td>';
2815 2815
 					//} elseif ($totalarray['totalvaluebilledfield'] == $i) { print '<td class="center">'.price($totalarray['totalvaluebilled']).'</td>';
2816 2816
 				} else {
2817 2817
 					print '<td></td>';
@@ -2827,8 +2827,8 @@  discard block
 block discarded – undo
2827 2827
 					$totalnboffields++;
2828 2828
 				}
2829 2829
 			}
2830
-			print '<tr class="oddeven"><td colspan="' . $totalnboffields . '">';
2831
-			print '<span class="opacitymedium">' . $langs->trans("None") . '</span>';
2830
+			print '<tr class="oddeven"><td colspan="'.$totalnboffields.'">';
2831
+			print '<span class="opacitymedium">'.$langs->trans("None").'</span>';
2832 2832
 			print '</td></tr>';
2833 2833
 		}
2834 2834
 
Please login to merge, or discard this patch.