Completed
Branch develop (599632)
by
unknown
19:12
created
htdocs/hrm/job_card.php 1 patch
Spacing   +69 added lines, -69 removed lines patch added patch discarded remove patch
@@ -29,15 +29,15 @@  discard block
 block discarded – undo
29 29
 // Load Dolibarr environment
30 30
 require '../main.inc.php';
31 31
 
32
-require_once DOL_DOCUMENT_ROOT . '/core/class/html.formcompany.class.php';
33
-require_once DOL_DOCUMENT_ROOT . '/core/class/html.formfile.class.php';
34
-require_once DOL_DOCUMENT_ROOT . '/core/class/html.formprojet.class.php';
35
-require_once DOL_DOCUMENT_ROOT . '/hrm/class/job.class.php';
36
-require_once DOL_DOCUMENT_ROOT . '/hrm/lib/hrm_job.lib.php';
37
-require_once DOL_DOCUMENT_ROOT . '/hrm/class/skillrank.class.php';
32
+require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
33
+require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
34
+require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php';
35
+require_once DOL_DOCUMENT_ROOT.'/hrm/class/job.class.php';
36
+require_once DOL_DOCUMENT_ROOT.'/hrm/lib/hrm_job.lib.php';
37
+require_once DOL_DOCUMENT_ROOT.'/hrm/class/skillrank.class.php';
38 38
 
39 39
 // Load translation files required by the page
40
-$langs->loadLangs(array('hrm', 'other', 'products'));   // why products?
40
+$langs->loadLangs(array('hrm', 'other', 'products')); // why products?
41 41
 
42 42
 // Get parameters
43 43
 $id = GETPOST('id', 'int');
@@ -48,12 +48,12 @@  discard block
 block discarded – undo
48 48
 $contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'jobcard'; // To manage different context of search
49 49
 $backtopage = GETPOST('backtopage', 'alpha');
50 50
 $backtopageforcancel = GETPOST('backtopageforcancel', 'alpha');
51
-$lineid   = GETPOST('lineid', 'int');
51
+$lineid = GETPOST('lineid', 'int');
52 52
 
53 53
 // Initialize technical objects
54 54
 $object = new Job($db);
55 55
 $extrafields = new ExtraFields($db);
56
-$diroutputmassaction = $conf->hrm->dir_output . '/temp/massgeneration/' . $user->id;
56
+$diroutputmassaction = $conf->hrm->dir_output.'/temp/massgeneration/'.$user->id;
57 57
 $hookmanager->initHooks(array('jobcard', 'globalcard')); // Note that conf->hooks_modules contains array
58 58
 
59 59
 // Fetch optionals attributes and labels
@@ -65,8 +65,8 @@  discard block
 block discarded – undo
65 65
 $search_all = GETPOST("search_all", 'alpha');
66 66
 $search = array();
67 67
 foreach ($object->fields as $key => $val) {
68
-	if (GETPOST('search_' . $key, 'alpha')) {
69
-		$search[$key] = GETPOST('search_' . $key, 'alpha');
68
+	if (GETPOST('search_'.$key, 'alpha')) {
69
+		$search[$key] = GETPOST('search_'.$key, 'alpha');
70 70
 	}
71 71
 }
72 72
 
@@ -75,13 +75,13 @@  discard block
 block discarded – undo
75 75
 }
76 76
 
77 77
 // Load object
78
-include DOL_DOCUMENT_ROOT . '/core/actions_fetchobject.inc.php'; // Must be include, not include_once.
78
+include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once.
79 79
 
80 80
 // Permissions
81 81
 $permissiontoread = $user->rights->hrm->all->read;
82 82
 $permissiontoadd  = $user->rights->hrm->all->write; // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php
83 83
 $permissiontodelete = $user->rights->hrm->all->delete;
84
-$upload_dir = $conf->hrm->multidir_output[isset($object->entity) ? $object->entity : 1] . '/job';
84
+$upload_dir = $conf->hrm->multidir_output[isset($object->entity) ? $object->entity : 1].'/job';
85 85
 
86 86
 // Security check (enable the most restrictive one)
87 87
 //if ($user->socid > 0) accessforbidden();
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
 			if (empty($id) && (($action != 'add' && $action != 'create') || $cancel)) {
113 113
 				$backtopage = $backurlforlist;
114 114
 			} else {
115
-				$backtopage = dol_buildpath('/hrm/job_card.php', 1) . '?id=' . ($id > 0 ? $id : '__ID__');
115
+				$backtopage = dol_buildpath('/hrm/job_card.php', 1).'?id='.($id > 0 ? $id : '__ID__');
116 116
 			}
117 117
 		}
118 118
 	}
@@ -122,20 +122,20 @@  discard block
 block discarded – undo
122 122
 
123 123
 	// Actions cancel, add, update, update_extras, confirm_validate, confirm_delete, confirm_deleteline, confirm_clone, confirm_close, confirm_setdraft, confirm_reopen
124 124
 	if ($action != 'confirm_clone') {
125
-		include DOL_DOCUMENT_ROOT . '/core/actions_addupdatedelete.inc.php';
125
+		include DOL_DOCUMENT_ROOT.'/core/actions_addupdatedelete.inc.php';
126 126
 	}
127 127
 
128 128
 	// Actions when linking object each other
129
-	include DOL_DOCUMENT_ROOT . '/core/actions_dellink.inc.php';
129
+	include DOL_DOCUMENT_ROOT.'/core/actions_dellink.inc.php';
130 130
 
131 131
 	// Actions when printing a doc from card
132
-	include DOL_DOCUMENT_ROOT . '/core/actions_printing.inc.php';
132
+	include DOL_DOCUMENT_ROOT.'/core/actions_printing.inc.php';
133 133
 
134 134
 	// Action to move up and down lines of object
135 135
 	//include DOL_DOCUMENT_ROOT.'/core/actions_lineupdown.inc.php';
136 136
 
137 137
 	// Action to build doc
138
-	include DOL_DOCUMENT_ROOT . '/core/actions_builddoc.inc.php';
138
+	include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php';
139 139
 
140 140
 	if ($action == 'set_thirdparty' && $permissiontoadd) {
141 141
 		$object->setValueFrom('fk_soc', GETPOST('fk_soc', 'int'), '', '', 'date', '', $user, $triggermodname);
@@ -147,8 +147,8 @@  discard block
 block discarded – undo
147 147
 	// Actions to send emails
148 148
 	$triggersendname = 'HRM_JOB_SENTBYMAIL';
149 149
 	$autocopy = 'MAIN_MAIL_AUTOCOPY_JOB_TO';
150
-	$trackid = 'job' . $object->id;
151
-	include DOL_DOCUMENT_ROOT . '/core/actions_sendmails.inc.php';
150
+	$trackid = 'job'.$object->id;
151
+	include DOL_DOCUMENT_ROOT.'/core/actions_sendmails.inc.php';
152 152
 
153 153
 	if ($action == 'confirm_clone' && $confirm != 'yes') {
154 154
 		$action = '';
@@ -234,36 +234,36 @@  discard block
 block discarded – undo
234 234
 
235 235
 // Part to create
236 236
 if ($action == 'create') {
237
-	print load_fiche_titre($langs->trans("NewJobProfile", $langs->transnoentities('Job')), '', 'object_' . $object->picto);
237
+	print load_fiche_titre($langs->trans("NewJobProfile", $langs->transnoentities('Job')), '', 'object_'.$object->picto);
238 238
 
239
-	print '<form method="POST" action="' . $_SERVER["PHP_SELF"] . '">';
240
-	print '<input type="hidden" name="token" value="' . newToken() . '">';
239
+	print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">';
240
+	print '<input type="hidden" name="token" value="'.newToken().'">';
241 241
 	print '<input type="hidden" name="action" value="add">';
242 242
 	if ($backtopage) {
243
-		print '<input type="hidden" name="backtopage" value="' . $backtopage . '">';
243
+		print '<input type="hidden" name="backtopage" value="'.$backtopage.'">';
244 244
 	}
245 245
 	if ($backtopageforcancel) {
246
-		print '<input type="hidden" name="backtopageforcancel" value="' . $backtopageforcancel . '">';
246
+		print '<input type="hidden" name="backtopageforcancel" value="'.$backtopageforcancel.'">';
247 247
 	}
248 248
 
249 249
 	print dol_get_fiche_head(array(), '');
250 250
 
251
-	print '<table class="border centpercent tableforfieldcreate">' . "\n";
251
+	print '<table class="border centpercent tableforfieldcreate">'."\n";
252 252
 
253 253
 	// Common attributes
254
-	include DOL_DOCUMENT_ROOT . '/core/tpl/commonfields_add.tpl.php';
254
+	include DOL_DOCUMENT_ROOT.'/core/tpl/commonfields_add.tpl.php';
255 255
 
256 256
 	// Other attributes
257
-	include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_add.tpl.php';
257
+	include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_add.tpl.php';
258 258
 
259
-	print '</table>' . "\n";
259
+	print '</table>'."\n";
260 260
 
261 261
 	print dol_get_fiche_end();
262 262
 
263 263
 	print '<div class="center">';
264
-	print '<input type="submit" class="button" name="add" value="' . dol_escape_htmltag($langs->trans("Create")) . '">';
264
+	print '<input type="submit" class="button" name="add" value="'.dol_escape_htmltag($langs->trans("Create")).'">';
265 265
 	print '&nbsp; ';
266
-	print '<input type="' . ($backtopage ? "submit" : "button") . '" class="button button-cancel" name="cancel" value="' . dol_escape_htmltag($langs->trans("Cancel")) . '"' . ($backtopage ? '' : ' onclick="history.go(-1)"') . '>'; // Cancel for create does not post form if we don't know the backtopage
266
+	print '<input type="'.($backtopage ? "submit" : "button").'" class="button button-cancel" name="cancel" value="'.dol_escape_htmltag($langs->trans("Cancel")).'"'.($backtopage ? '' : ' onclick="history.go(-1)"').'>'; // Cancel for create does not post form if we don't know the backtopage
267 267
 	print '</div>';
268 268
 
269 269
 	print '</form>';
@@ -273,35 +273,35 @@  discard block
 block discarded – undo
273 273
 
274 274
 // Part to edit record
275 275
 if (($id || $ref) && $action == 'edit') {
276
-	print load_fiche_titre($langs->trans("JobProfile"), '', 'object_' . $object->picto);
276
+	print load_fiche_titre($langs->trans("JobProfile"), '', 'object_'.$object->picto);
277 277
 
278
-	print '<form method="POST" action="' . $_SERVER["PHP_SELF"] . '">';
279
-	print '<input type="hidden" name="token" value="' . newToken() . '">';
278
+	print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">';
279
+	print '<input type="hidden" name="token" value="'.newToken().'">';
280 280
 	print '<input type="hidden" name="action" value="update">';
281
-	print '<input type="hidden" name="id" value="' . $object->id . '">';
281
+	print '<input type="hidden" name="id" value="'.$object->id.'">';
282 282
 	if ($backtopage) {
283
-		print '<input type="hidden" name="backtopage" value="' . $backtopage . '">';
283
+		print '<input type="hidden" name="backtopage" value="'.$backtopage.'">';
284 284
 	}
285 285
 	if ($backtopageforcancel) {
286
-		print '<input type="hidden" name="backtopageforcancel" value="' . $backtopageforcancel . '">';
286
+		print '<input type="hidden" name="backtopageforcancel" value="'.$backtopageforcancel.'">';
287 287
 	}
288 288
 
289 289
 	print dol_get_fiche_head();
290 290
 
291
-	print '<table class="border centpercent tableforfieldedit">' . "\n";
291
+	print '<table class="border centpercent tableforfieldedit">'."\n";
292 292
 
293 293
 	// Common attributes
294
-	include DOL_DOCUMENT_ROOT . '/core/tpl/commonfields_edit.tpl.php';
294
+	include DOL_DOCUMENT_ROOT.'/core/tpl/commonfields_edit.tpl.php';
295 295
 
296 296
 	// Other attributes
297
-	include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_edit.tpl.php';
297
+	include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_edit.tpl.php';
298 298
 
299 299
 	print '</table>';
300 300
 
301 301
 	print dol_get_fiche_end();
302 302
 
303
-	print '<div class="center"><input type="submit" class="button button-save" name="save" value="' . $langs->trans("Save") . '">';
304
-	print ' &nbsp; <input type="submit" class="button button-cancel" name="cancel" value="' . $langs->trans("Cancel") . '">';
303
+	print '<div class="center"><input type="submit" class="button button-save" name="save" value="'.$langs->trans("Save").'">';
304
+	print ' &nbsp; <input type="submit" class="button button-cancel" name="cancel" value="'.$langs->trans("Cancel").'">';
305 305
 	print '</div>';
306 306
 
307 307
 	print '</form>';
@@ -319,11 +319,11 @@  discard block
 block discarded – undo
319 319
 
320 320
 	// Confirmation to delete
321 321
 	if ($action == 'delete') {
322
-		$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('DeleteJob'), $langs->trans('ConfirmDeleteObject'), 'confirm_delete', '', 0, 1);
322
+		$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('DeleteJob'), $langs->trans('ConfirmDeleteObject'), 'confirm_delete', '', 0, 1);
323 323
 	}
324 324
 	// Confirmation to delete line
325 325
 	if ($action == 'deleteline') {
326
-		$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id . '&lineid=' . $lineid, $langs->trans('DeleteLine'), $langs->trans('ConfirmDeleteLine'), 'confirm_deleteline', '', 0, 1);
326
+		$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&lineid='.$lineid, $langs->trans('DeleteLine'), $langs->trans('ConfirmDeleteLine'), 'confirm_deleteline', '', 0, 1);
327 327
 	}
328 328
 	// Clone confirmation
329 329
 	if ($action == 'clone') {
@@ -349,7 +349,7 @@  discard block
 block discarded – undo
349 349
 			// array('type' => 'other',    'name' => 'idwarehouse',   'label' => $langs->trans("SelectWarehouseForStockDecrease"), 'value' => $formproduct->selectWarehouses(GETPOST('idwarehouse')?GETPOST('idwarehouse'):'ifone', 'idwarehouse', '', 1, 0, 0, '', 0, $forcecombo))
350 350
 		);
351 351
 		*/
352
-		$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('XXX'), $text, 'confirm_xxx', $formquestion, 0, 1, 220);
352
+		$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('XXX'), $text, 'confirm_xxx', $formquestion, 0, 1, 220);
353 353
 	}
354 354
 
355 355
 	// Call Hook formConfirm
@@ -367,10 +367,10 @@  discard block
 block discarded – undo
367 367
 
368 368
 	// Object card
369 369
 	// ------------------------------------------------------------
370
-	$linkback = '<a href="' . dol_buildpath('/hrm/job_list.php', 1) . '?restore_lastsearch_values=1' . (!empty($socid) ? '&socid=' . $socid : '') . '">' . $langs->trans("BackToList") . '</a>';
370
+	$linkback = '<a href="'.dol_buildpath('/hrm/job_list.php', 1).'?restore_lastsearch_values=1'.(!empty($socid) ? '&socid='.$socid : '').'">'.$langs->trans("BackToList").'</a>';
371 371
 
372 372
 	$morehtmlref = '<div class="refid">';
373
-	$morehtmlref.= $object->label;
373
+	$morehtmlref .= $object->label;
374 374
 	$morehtmlref .= '</div>';
375 375
 
376 376
 
@@ -386,11 +386,11 @@  discard block
 block discarded – undo
386 386
 	//$keyforbreak='fieldkeytoswitchonsecondcolumn';	// We change column just before this field
387 387
 	//unset($object->fields['fk_project']);				// Hide field already shown in banner
388 388
 	//unset($object->fields['fk_soc']);					// Hide field already shown in banner
389
-	$object->fields['label']['visible']=0; // Already in banner
390
-	include DOL_DOCUMENT_ROOT . '/core/tpl/commonfields_view.tpl.php';
389
+	$object->fields['label']['visible'] = 0; // Already in banner
390
+	include DOL_DOCUMENT_ROOT.'/core/tpl/commonfields_view.tpl.php';
391 391
 
392 392
 	// Other attributes. Fields from hook formObjectOptions and Extrafields.
393
-	include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_view.tpl.php';
393
+	include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php';
394 394
 
395 395
 	print '</table>';
396 396
 	print '</div>';
@@ -409,16 +409,16 @@  discard block
 block discarded – undo
409 409
 		// Show object lines
410 410
 		$result = $object->getLinesArray();
411 411
 
412
-		print '	<form name="addproduct" id="addproduct" action="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . (($action != 'editline') ? '' : '#line_' . GETPOST('lineid', 'int')) . '" method="POST">
413
-		<input type="hidden" name="token" value="' . newToken() . '">
414
-		<input type="hidden" name="action" value="' . (($action != 'editline') ? 'addline' : 'updateline') . '">
412
+		print '	<form name="addproduct" id="addproduct" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.(($action != 'editline') ? '' : '#line_'.GETPOST('lineid', 'int')).'" method="POST">
413
+		<input type="hidden" name="token" value="' . newToken().'">
414
+		<input type="hidden" name="action" value="' . (($action != 'editline') ? 'addline' : 'updateline').'">
415 415
 		<input type="hidden" name="mode" value="">
416 416
 		<input type="hidden" name="page_y" value="">
417
-		<input type="hidden" name="id" value="' . $object->id . '">
417
+		<input type="hidden" name="id" value="' . $object->id.'">
418 418
 		';
419 419
 
420 420
 		if (!empty($conf->use_javascript_ajax) && $object->status == 0) {
421
-			include DOL_DOCUMENT_ROOT . '/core/tpl/ajaxrow.tpl.php';
421
+			include DOL_DOCUMENT_ROOT.'/core/tpl/ajaxrow.tpl.php';
422 422
 		}
423 423
 
424 424
 		print '<div class="div-table-responsive-no-min">';
@@ -455,7 +455,7 @@  discard block
 block discarded – undo
455 455
 	// Buttons for actions
456 456
 
457 457
 	if ($action != 'presend' && $action != 'editline') {
458
-		print '<div class="tabsAction">' . "\n";
458
+		print '<div class="tabsAction">'."\n";
459 459
 		$parameters = array();
460 460
 		$reshook = $hookmanager->executeHooks('addMoreActionsButtons', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
461 461
 		if ($reshook < 0) {
@@ -465,17 +465,17 @@  discard block
 block discarded – undo
465 465
 		if (empty($reshook)) {
466 466
 			// Back to draft
467 467
 			if ($object->status == $object::STATUS_VALIDATED) {
468
-				print dolGetButtonAction($langs->trans('SetToDraft'), '', 'default', $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&action=confirm_setdraft&confirm=yes&token=' . newToken(), '', $permissiontoadd);
468
+				print dolGetButtonAction($langs->trans('SetToDraft'), '', 'default', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=confirm_setdraft&confirm=yes&token='.newToken(), '', $permissiontoadd);
469 469
 			}
470 470
 
471
-			print dolGetButtonAction($langs->trans('Modify'), '', 'default', $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&action=edit&token=' . newToken(), '', $permissiontoadd);
471
+			print dolGetButtonAction($langs->trans('Modify'), '', 'default', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=edit&token='.newToken(), '', $permissiontoadd);
472 472
 
473
-			print dolGetButtonAction($langs->trans('ToClone'), '', 'default', $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&action=clone&token=' . newToken(), '', $permissiontoadd);
473
+			print dolGetButtonAction($langs->trans('ToClone'), '', 'default', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=clone&token='.newToken(), '', $permissiontoadd);
474 474
 
475 475
 			// Delete (need delete permission, or if draft, just need create/modify permission)
476
-			print dolGetButtonAction($langs->trans('Delete'), '', 'delete', $_SERVER['PHP_SELF'] . '?id=' . $object->id . '&action=delete&token=' . newToken(), '', $permissiontodelete);
476
+			print dolGetButtonAction($langs->trans('Delete'), '', 'delete', $_SERVER['PHP_SELF'].'?id='.$object->id.'&action=delete&token='.newToken(), '', $permissiontodelete);
477 477
 		}
478
-		print '</div>' . "\n";
478
+		print '</div>'."\n";
479 479
 	}
480 480
 
481 481
 
@@ -493,12 +493,12 @@  discard block
 block discarded – undo
493 493
 		// Documents
494 494
 		if ($includedocgeneration) {
495 495
 			$objref = dol_sanitizeFileName($object->ref);
496
-			$relativepath = $objref . '/' . $objref . '.pdf';
497
-			$filedir = $conf->hrm->dir_output . '/' . $object->element . '/' . $objref;
498
-			$urlsource = $_SERVER["PHP_SELF"] . "?id=" . $object->id;
496
+			$relativepath = $objref.'/'.$objref.'.pdf';
497
+			$filedir = $conf->hrm->dir_output.'/'.$object->element.'/'.$objref;
498
+			$urlsource = $_SERVER["PHP_SELF"]."?id=".$object->id;
499 499
 			$genallowed = $user->rights->hrm->job->read; // If you can read, you can build the PDF to read content
500 500
 			$delallowed = $user->rights->hrm->job->write; // If you can create/edit, you can remove a file on card
501
-			print $formfile->showdocuments('hrm:Job', $object->element . '/' . $objref, $filedir, $urlsource, $genallowed, $delallowed, $object->model_pdf, 1, 0, 0, 28, 0, '', '', '', $langs->defaultlang);
501
+			print $formfile->showdocuments('hrm:Job', $object->element.'/'.$objref, $filedir, $urlsource, $genallowed, $delallowed, $object->model_pdf, 1, 0, 0, 28, 0, '', '', '', $langs->defaultlang);
502 502
 		}
503 503
 
504 504
 		// Show links to link elements
@@ -513,9 +513,9 @@  discard block
 block discarded – undo
513 513
 		$morehtmlcenter = dolGetButtonTitle($langs->trans('SeeAll'), '', 'fa fa-bars imgforviewmode', DOL_URL_ROOT.'/hrm/job_agenda.php?id='.$object->id);
514 514
 
515 515
 		// List of actions on element
516
-		include_once DOL_DOCUMENT_ROOT . '/core/class/html.formactions.class.php';
516
+		include_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php';
517 517
 		$formactions = new FormActions($db);
518
-		$somethingshown = $formactions->showactions($object, $object->element . '@' . $object->module, (is_object($object->thirdparty) ? $object->thirdparty->id : 0), 1, '', $MAXEVENT, '', $morehtmlcenter);
518
+		$somethingshown = $formactions->showactions($object, $object->element.'@'.$object->module, (is_object($object->thirdparty) ? $object->thirdparty->id : 0), 1, '', $MAXEVENT, '', $morehtmlcenter);
519 519
 
520 520
 		print '</div></div>';
521 521
 	}
@@ -524,9 +524,9 @@  discard block
 block discarded – undo
524 524
 	$modelmail = 'job';
525 525
 	$defaulttopic = 'InformationMessage';
526 526
 	$diroutput = $conf->hrm->dir_output;
527
-	$trackid = 'job' . $object->id;
527
+	$trackid = 'job'.$object->id;
528 528
 
529
-	include DOL_DOCUMENT_ROOT . '/core/tpl/card_presend.tpl.php';
529
+	include DOL_DOCUMENT_ROOT.'/core/tpl/card_presend.tpl.php';
530 530
 }
531 531
 
532 532
 // End of page
Please login to merge, or discard this patch.
htdocs/core/class/extrafields.class.php 1 patch
Spacing   +57 added lines, -57 removed lines patch added patch discarded remove patch
@@ -1027,9 +1027,9 @@  discard block
 block discarded – undo
1027 1027
 				// search filter on a date extrafield shows two inputs to select a date range
1028 1028
 				$prefill = array(
1029 1029
 					'start' => isset($value['start']) ? $value['start'] : '',
1030
-					'end'   => isset($value['end'])   ? $value['end']   : ''
1030
+					'end'   => isset($value['end']) ? $value['end'] : ''
1031 1031
 				);
1032
-				$out = '<div ' . ($moreparam ? $moreparam : '') . '><div class="nowrap">';
1032
+				$out = '<div '.($moreparam ? $moreparam : '').'><div class="nowrap">';
1033 1033
 				$out .= $form->selectDate($prefill['start'], $keyprefix.$key.$keysuffix.'_start', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans("From"));
1034 1034
 				$out .= '</div><div class="nowrap">';
1035 1035
 				$out .= $form->selectDate($prefill['end'], $keyprefix.$key.$keysuffix.'_end', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans("to"));
@@ -1052,9 +1052,9 @@  discard block
 block discarded – undo
1052 1052
 				// search filter on a date extrafield shows two inputs to select a date range
1053 1053
 				$prefill = array(
1054 1054
 					'start' => isset($value['start']) ? $value['start'] : '',
1055
-					'end'   => isset($value['end'])   ? $value['end']   : ''
1055
+					'end'   => isset($value['end']) ? $value['end'] : ''
1056 1056
 				);
1057
-				$out = '<div ' . ($moreparam ? $moreparam : '') . '><div class="nowrap">';
1057
+				$out = '<div '.($moreparam ? $moreparam : '').'><div class="nowrap">';
1058 1058
 				$out .= $form->selectDate($prefill['start'], $keyprefix.$key.$keysuffix.'_start', 1, 1, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans("From"), 'tzuserrel');
1059 1059
 				$out .= '</div><div class="nowrap">';
1060 1060
 				$out .= $form->selectDate($prefill['end'], $keyprefix.$key.$keysuffix.'_end', 1, 1, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans("to"), 'tzuserrel');
@@ -1063,7 +1063,7 @@  discard block
 block discarded – undo
1063 1063
 				// TODO Must also support $moreparam
1064 1064
 				$out = $form->selectDate($value, $keyprefix.$key.$keysuffix, $showtime, $showtime, $required, '', 1, (($keyprefix != 'search_' && $keyprefix != 'search_options_') ? 1 : 0), 0, 1, '', '', '', 1, '', '', 'tzuserrel');
1065 1065
 			}
1066
-		} elseif (in_array($type, array('int', 'integer')))	{
1066
+		} elseif (in_array($type, array('int', 'integer'))) {
1067 1067
 			$tmp = explode(',', $size);
1068 1068
 			$newsize = $tmp[0];
1069 1069
 			$out = '<input type="text" class="flat '.$morecss.' maxwidthonsmartphone" name="'.$keyprefix.$key.$keysuffix.'" id="'.$keyprefix.$key.$keysuffix.'" maxlength="'.$newsize.'" value="'.dol_escape_htmltag($value).'"'.($moreparam ? $moreparam : '').'>';
@@ -1072,25 +1072,25 @@  discard block
 block discarded – undo
1072 1072
 		} elseif (in_array($type, array('mail', 'ip', 'phone', 'url'))) {
1073 1073
 			$out = '<input type="text" class="flat '.$morecss.' maxwidthonsmartphone" name="'.$keyprefix.$key.$keysuffix.'" id="'.$keyprefix.$key.$keysuffix.'" value="'.dol_escape_htmltag($value).'" '.($moreparam ? $moreparam : '').'>';
1074 1074
 		} elseif ($type == 'icon') {
1075
-			$out ='<link rel="stylesheet" href="'.dol_buildpath('/myfield/css/fontawesome-iconpicker.min.css', 1).'">';
1076
-			$out.='<script src="'.dol_buildpath('/myfield/js/fontawesome-iconpicker.min.js', 1).'"></script>';
1077
-			$out.= '<input type="text" class="form-control icp icp-auto iconpicker-element iconpicker-input flat '.$morecss.' maxwidthonsmartphone"';
1078
-			$out.= ' name="'.$keyprefix.$key.$keysuffix.'" id="'.$keyprefix.$key.$keysuffix.'" value="'.dol_escape_htmltag($value).'" '.($moreparam ? $moreparam : '').'>';
1079
-			$out.='<script>';
1080
-			$options="{ title: '<b>".$langs->trans("IconFieldSelector")."</b>', placement: 'right', showFooter: false, templates: {";
1081
-			$options.="iconpicker: '<div class=\"iconpicker\"><div style=\"background-color:#EFEFEF;\" class=\"iconpicker-items\"></div></div>',";
1082
-			$options.="iconpickerItem: '<a role=\"button\" href=\"#\" class=\"iconpicker-item\" style=\"background-color:#DDDDDD;\"><i></i></a>',";
1075
+			$out = '<link rel="stylesheet" href="'.dol_buildpath('/myfield/css/fontawesome-iconpicker.min.css', 1).'">';
1076
+			$out .= '<script src="'.dol_buildpath('/myfield/js/fontawesome-iconpicker.min.js', 1).'"></script>';
1077
+			$out .= '<input type="text" class="form-control icp icp-auto iconpicker-element iconpicker-input flat '.$morecss.' maxwidthonsmartphone"';
1078
+			$out .= ' name="'.$keyprefix.$key.$keysuffix.'" id="'.$keyprefix.$key.$keysuffix.'" value="'.dol_escape_htmltag($value).'" '.($moreparam ? $moreparam : '').'>';
1079
+			$out .= '<script>';
1080
+			$options = "{ title: '<b>".$langs->trans("IconFieldSelector")."</b>', placement: 'right', showFooter: false, templates: {";
1081
+			$options .= "iconpicker: '<div class=\"iconpicker\"><div style=\"background-color:#EFEFEF;\" class=\"iconpicker-items\"></div></div>',";
1082
+			$options .= "iconpickerItem: '<a role=\"button\" href=\"#\" class=\"iconpicker-item\" style=\"background-color:#DDDDDD;\"><i></i></a>',";
1083 1083
 			// $options.="buttons: '<button style=\"background-color:#FFFFFF;\" class=\"iconpicker-btn iconpicker-btn-cancel btn btn-default btn-sm\">".$langs->trans("Cancel")."</button>";
1084 1084
 			// $options.="<button style=\"background-color:#FFFFFF;\" class=\"iconpicker-btn iconpicker-btn-accept btn btn-primary btn-sm\">".$langs->trans("Save")."</button>',";
1085
-			$options.="footer: '<div class=\"popover-footer\" style=\"background-color:#EFEFEF;\"></div>',";
1086
-			$options.="search: '<input type=\"search\" class\"form-control iconpicker-search\" placeholder=\"".$langs->trans("TypeToFilter")."\" />',";
1087
-			$options.="popover: '<div class=\"iconpicker-popover popover\">";
1088
-			$options.="   <div class=\"arrow\" ></div>";
1089
-			$options.="   <div class=\"popover-title\" style=\"text-align:center;background-color:#EFEFEF;\"></div>";
1090
-			$options.="   <div class=\"popover-content \" ></div>";
1091
-			$options.="</div>'}}";
1092
-			$out.="$('#".$keyprefix.$key.$keysuffix."').iconpicker(".$options.");";
1093
-			$out.='</script>';
1085
+			$options .= "footer: '<div class=\"popover-footer\" style=\"background-color:#EFEFEF;\"></div>',";
1086
+			$options .= "search: '<input type=\"search\" class\"form-control iconpicker-search\" placeholder=\"".$langs->trans("TypeToFilter")."\" />',";
1087
+			$options .= "popover: '<div class=\"iconpicker-popover popover\">";
1088
+			$options .= "   <div class=\"arrow\" ></div>";
1089
+			$options .= "   <div class=\"popover-title\" style=\"text-align:center;background-color:#EFEFEF;\"></div>";
1090
+			$options .= "   <div class=\"popover-content \" ></div>";
1091
+			$options .= "</div>'}}";
1092
+			$out .= "$('#".$keyprefix.$key.$keysuffix."').iconpicker(".$options.");";
1093
+			$out .= '</script>';
1094 1094
 		} elseif ($type == 'text') {
1095 1095
 			if (!preg_match('/search_/', $keyprefix)) {		// If keyprefix is search_ or search_options_, we must just use a simple text field
1096 1096
 				require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
@@ -1620,7 +1620,7 @@  discard block
 block discarded – undo
1620 1620
 
1621 1621
 		$label = $this->attributes[$extrafieldsobjectkey]['label'][$key];
1622 1622
 		$type = $this->attributes[$extrafieldsobjectkey]['type'][$key];
1623
-		$size = $this->attributes[$extrafieldsobjectkey]['size'][$key];			// Can be '255', '24,8'...
1623
+		$size = $this->attributes[$extrafieldsobjectkey]['size'][$key]; // Can be '255', '24,8'...
1624 1624
 		$default = $this->attributes[$extrafieldsobjectkey]['default'][$key];
1625 1625
 		$computed = $this->attributes[$extrafieldsobjectkey]['computed'][$key];
1626 1626
 		$unique = $this->attributes[$extrafieldsobjectkey]['unique'][$key];
@@ -1642,7 +1642,7 @@  discard block
 block discarded – undo
1642 1642
 		if ($type == 'date') {
1643 1643
 			$showsize = 10;
1644 1644
 			if ($value !== '') {
1645
-				$value = dol_print_date($value, 'day');	// For date without hour, date is always GMT for storage and output
1645
+				$value = dol_print_date($value, 'day'); // For date without hour, date is always GMT for storage and output
1646 1646
 			}
1647 1647
 		} elseif ($type == 'datetime') {
1648 1648
 			$showsize = 19;
@@ -1786,13 +1786,13 @@  discard block
 block discarded – undo
1786 1786
 					$toprint = array();
1787 1787
 					$obj = $this->db->fetch_object($resql);
1788 1788
 					if ($obj->rowid) {
1789
-						require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php';
1789
+						require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
1790 1790
 						$c = new Categorie($this->db);
1791 1791
 						$result = $c->fetch($obj->rowid);
1792 1792
 						if ($result > 0) {
1793 1793
 							$ways = $c->print_all_ways(); // $ways[0] = "ccc2 >> ccc2a >> ccc2a1" with html formatted text
1794 1794
 							foreach ($ways as $way) {
1795
-								$toprint[] = '<li class="select2-search-choice-dolibarr noborderoncategories"' . ($c->color ? ' style="background: #' . $c->color . ';"' : ' style="background: #bbb"') . '>' . img_object('', 'category') . ' ' . $way . '</li>';
1795
+								$toprint[] = '<li class="select2-search-choice-dolibarr noborderoncategories"'.($c->color ? ' style="background: #'.$c->color.';"' : ' style="background: #bbb"').'>'.img_object('', 'category').' '.$way.'</li>';
1796 1796
 							}
1797 1797
 						}
1798 1798
 					}
@@ -2004,13 +2004,13 @@  discard block
 block discarded – undo
2004 2004
 	{
2005 2005
 		global $conf, $langs;
2006 2006
 
2007
-		$tagtype='tr';
2008
-		$tagtype_dyn='td';
2007
+		$tagtype = 'tr';
2008
+		$tagtype_dyn = 'td';
2009 2009
 
2010
-		if ($display_type=='line') {
2011
-			$tagtype='div';
2012
-			$tagtype_dyn='span';
2013
-			$colspan=0;
2010
+		if ($display_type == 'line') {
2011
+			$tagtype = 'div';
2012
+			$tagtype_dyn = 'span';
2013
+			$colspan = 0;
2014 2014
 		}
2015 2015
 
2016 2016
 		$extrafield_param = $this->attributes[$object->table_element]['param'][$key];
@@ -2030,12 +2030,12 @@  discard block
 block discarded – undo
2030 2030
 		if ($mode == 'create') {
2031 2031
 			// On create mode, force separator group to not be collapsable
2032 2032
 			$extrafield_collapse_display_value = 1;
2033
-			$expand_display = true;	// We force group to be shown expanded
2033
+			$expand_display = true; // We force group to be shown expanded
2034 2034
 			$disabledcookiewrite = 1; // We keep status of group unchanged into the cookie
2035 2035
 		}
2036 2036
 
2037
-		$out = '<'.$tagtype.' id="trextrafieldseparator'.$key.(!empty($object->id)?'_'.$object->id:'').'" class="trextrafieldseparator trextrafieldseparator'.$key.(!empty($object->id)?'_'.$object->id:'').'">';
2038
-		$out .= '<'.$tagtype_dyn.' '.(!empty($colspan)?'colspan="' . $colspan . '"':'').'>';
2037
+		$out = '<'.$tagtype.' id="trextrafieldseparator'.$key.(!empty($object->id) ? '_'.$object->id : '').'" class="trextrafieldseparator trextrafieldseparator'.$key.(!empty($object->id) ? '_'.$object->id : '').'">';
2038
+		$out .= '<'.$tagtype_dyn.' '.(!empty($colspan) ? 'colspan="'.$colspan.'"' : '').'>';
2039 2039
 		// Some js code will be injected here to manage the collapsing of extrafields
2040 2040
 		// Output the picto
2041 2041
 		$out .= '<span class="'.($extrafield_collapse_display_value ? 'cursorpointer ' : '').($extrafield_collapse_display_value == 0 ? 'fas fa-square opacitymedium' : 'far fa-'.(($expand_display ? 'minus' : 'plus').'-square')).'"></span>';
@@ -2066,14 +2066,14 @@  discard block
 block discarded – undo
2066 2066
 						$out .= '   document.cookie = "DOLCOLLAPSE_'.$object->table_element.'_extrafields_'.$key.'=1; path='.$_SERVER["PHP_SELF"].'"'."\n";
2067 2067
 					}
2068 2068
 				}
2069
-				$out .= '   jQuery("#trextrafieldseparator'.$key.(!empty($object->id)?'_'.$object->id:'').'").click(function(){'."\n";
2069
+				$out .= '   jQuery("#trextrafieldseparator'.$key.(!empty($object->id) ? '_'.$object->id : '').'").click(function(){'."\n";
2070 2070
 				$out .= '       console.log("We click on collapse/uncollapse to hide/show .trextrafields_collapse'.$collapse_group.'");'."\n";
2071 2071
 				$out .= '       jQuery(".trextrafields_collapse'.$collapse_group.'").toggle(100, function(){'."\n";
2072 2072
 				$out .= '           if (jQuery(".trextrafields_collapse'.$collapse_group.'").is(":hidden")) {'."\n";
2073
-				$out .= '               jQuery("#trextrafieldseparator'.$key.(!empty($object->id)?'_'.$object->id:'').' '.$tagtype_dyn.' span").addClass("fa-plus-square").removeClass("fa-minus-square");'."\n";
2073
+				$out .= '               jQuery("#trextrafieldseparator'.$key.(!empty($object->id) ? '_'.$object->id : '').' '.$tagtype_dyn.' span").addClass("fa-plus-square").removeClass("fa-minus-square");'."\n";
2074 2074
 				$out .= '               document.cookie = "DOLCOLLAPSE_'.$object->table_element.'_extrafields_'.$key.'=0; path='.$_SERVER["PHP_SELF"].'"'."\n";
2075 2075
 				$out .= '           } else {'."\n";
2076
-				$out .= '               jQuery("#trextrafieldseparator'.$key.(!empty($object->id)?'_'.$object->id:'').' '.$tagtype_dyn.' span").addClass("fa-minus-square").removeClass("fa-plus-square");'."\n";
2076
+				$out .= '               jQuery("#trextrafieldseparator'.$key.(!empty($object->id) ? '_'.$object->id : '').' '.$tagtype_dyn.' span").addClass("fa-minus-square").removeClass("fa-plus-square");'."\n";
2077 2077
 				$out .= '               document.cookie = "DOLCOLLAPSE_'.$object->table_element.'_extrafields_'.$key.'=1; path='.$_SERVER["PHP_SELF"].'"'."\n";
2078 2078
 				$out .= '           }'."\n";
2079 2079
 				$out .= '       });'."\n";
@@ -2117,7 +2117,7 @@  discard block
 block discarded – undo
2117 2117
 					continue;
2118 2118
 				}
2119 2119
 
2120
-				if (!empty($onlykey) && $onlykey == '@GETPOSTISSET' && !GETPOSTISSET('options_'.$key) && (! in_array($this->attributes[$object->table_element]['type'][$key], array('boolean', 'checkbox', 'chkbxlst')))) {
2120
+				if (!empty($onlykey) && $onlykey == '@GETPOSTISSET' && !GETPOSTISSET('options_'.$key) && (!in_array($this->attributes[$object->table_element]['type'][$key], array('boolean', 'checkbox', 'chkbxlst')))) {
2121 2121
 					//when unticking boolean field, it's not set in POST
2122 2122
 					continue;
2123 2123
 				}
@@ -2146,7 +2146,7 @@  discard block
 block discarded – undo
2146 2146
 						$onlykey === '@GETPOSTISSET'
2147 2147
 						&& in_array($this->attributes[$object->table_element]['type'][$key], array('boolean', 'checkbox', 'chkbxlst'))
2148 2148
 						&& in_array(abs($enabled), array(2, 5))
2149
-						&& ! GETPOSTISSET('options_' . $key) // Update hidden checkboxes and multiselect only if they are provided
2149
+						&& !GETPOSTISSET('options_'.$key) // Update hidden checkboxes and multiselect only if they are provided
2150 2150
 					)
2151 2151
 				) {
2152 2152
 					continue;
@@ -2273,16 +2273,16 @@  discard block
 block discarded – undo
2273 2273
 				}
2274 2274
 
2275 2275
 				if (in_array($key_type, array('date'))) {
2276
-					$dateparamname_start = $keysuffix . 'options_' . $key . $keyprefix . '_start';
2277
-					$dateparamname_end   = $keysuffix . 'options_' . $key . $keyprefix . '_end';
2278
-					if (GETPOST($dateparamname_start . 'year') || GETPOST($dateparamname_end . 'year')) {
2276
+					$dateparamname_start = $keysuffix.'options_'.$key.$keyprefix.'_start';
2277
+					$dateparamname_end   = $keysuffix.'options_'.$key.$keyprefix.'_end';
2278
+					if (GETPOST($dateparamname_start.'year') || GETPOST($dateparamname_end.'year')) {
2279 2279
 						$value_key = array();
2280 2280
 						// values provided as a component year, month, day, etc.
2281
-						if (GETPOST($dateparamname_start . 'year')) {
2282
-							$value_key['start'] = dol_mktime(0, 0, 0, GETPOST($dateparamname_start . 'month', 'int'), GETPOST($dateparamname_start . 'day', 'int'), GETPOST($dateparamname_start . 'year', 'int'));
2281
+						if (GETPOST($dateparamname_start.'year')) {
2282
+							$value_key['start'] = dol_mktime(0, 0, 0, GETPOST($dateparamname_start.'month', 'int'), GETPOST($dateparamname_start.'day', 'int'), GETPOST($dateparamname_start.'year', 'int'));
2283 2283
 						}
2284
-						if (GETPOST($dateparamname_start . 'year')) {
2285
-							$value_key['end'] = dol_mktime(23, 59, 59, GETPOST($dateparamname_end . 'month', 'int'), GETPOST($dateparamname_end . 'day', 'int'), GETPOST($dateparamname_end . 'year', 'int'));
2284
+						if (GETPOST($dateparamname_start.'year')) {
2285
+							$value_key['end'] = dol_mktime(23, 59, 59, GETPOST($dateparamname_end.'month', 'int'), GETPOST($dateparamname_end.'day', 'int'), GETPOST($dateparamname_end.'year', 'int'));
2286 2286
 						}
2287 2287
 					} elseif (GETPOST($keysuffix."options_".$key.$keyprefix."year")) {
2288 2288
 						// Clean parameters
@@ -2291,22 +2291,22 @@  discard block
 block discarded – undo
2291 2291
 						continue; // Value was not provided, we should not set it.
2292 2292
 					}
2293 2293
 				} elseif (in_array($key_type, array('datetime', 'datetimegmt'))) {
2294
-					$dateparamname_start = $keysuffix . 'options_' . $key . $keyprefix . '_start';
2295
-					$dateparamname_end   = $keysuffix . 'options_' . $key . $keyprefix . '_end';
2296
-					if (GETPOST($dateparamname_start . 'year') && GETPOST($dateparamname_end . 'year')) {
2294
+					$dateparamname_start = $keysuffix.'options_'.$key.$keyprefix.'_start';
2295
+					$dateparamname_end   = $keysuffix.'options_'.$key.$keyprefix.'_end';
2296
+					if (GETPOST($dateparamname_start.'year') && GETPOST($dateparamname_end.'year')) {
2297 2297
 						// values provided as a date pair (start date + end date), each date being broken down as year, month, day, etc.
2298
-						$dateparamname_end_hour = GETPOST($dateparamname_end . 'hour', 'int') !='-1' ? GETPOST($dateparamname_end . 'hour', 'int') : '23';
2299
-						$dateparamname_end_min = GETPOST($dateparamname_end . 'min', 'int') !='-1' ? GETPOST($dateparamname_end . 'min', 'int') : '59';
2300
-						$dateparamname_end_sec = GETPOST($dateparamname_end . 'sec', 'int') !='-1' ? GETPOST($dateparamname_end . 'sec', 'int') : '59';
2298
+						$dateparamname_end_hour = GETPOST($dateparamname_end.'hour', 'int') != '-1' ? GETPOST($dateparamname_end.'hour', 'int') : '23';
2299
+						$dateparamname_end_min = GETPOST($dateparamname_end.'min', 'int') != '-1' ? GETPOST($dateparamname_end.'min', 'int') : '59';
2300
+						$dateparamname_end_sec = GETPOST($dateparamname_end.'sec', 'int') != '-1' ? GETPOST($dateparamname_end.'sec', 'int') : '59';
2301 2301
 						if ($key_type == 'datetimegmt') {
2302 2302
 							$value_key = array(
2303
-								'start' => dol_mktime(GETPOST($dateparamname_start . 'hour', 'int'), GETPOST($dateparamname_start . 'min', 'int'), GETPOST($dateparamname_start . 'sec', 'int'), GETPOST($dateparamname_start . 'month', 'int'), GETPOST($dateparamname_start . 'day', 'int'), GETPOST($dateparamname_start . 'year', 'int'), 'gmt'),
2304
-								'end' => dol_mktime($dateparamname_end_hour, $dateparamname_end_min, $dateparamname_end_sec, GETPOST($dateparamname_end . 'month', 'int'), GETPOST($dateparamname_end . 'day', 'int'), GETPOST($dateparamname_end . 'year', 'int'), 'gmt')
2303
+								'start' => dol_mktime(GETPOST($dateparamname_start.'hour', 'int'), GETPOST($dateparamname_start.'min', 'int'), GETPOST($dateparamname_start.'sec', 'int'), GETPOST($dateparamname_start.'month', 'int'), GETPOST($dateparamname_start.'day', 'int'), GETPOST($dateparamname_start.'year', 'int'), 'gmt'),
2304
+								'end' => dol_mktime($dateparamname_end_hour, $dateparamname_end_min, $dateparamname_end_sec, GETPOST($dateparamname_end.'month', 'int'), GETPOST($dateparamname_end.'day', 'int'), GETPOST($dateparamname_end.'year', 'int'), 'gmt')
2305 2305
 							);
2306 2306
 						} else {
2307 2307
 							$value_key = array(
2308
-								'start' => dol_mktime(GETPOST($dateparamname_start . 'hour', 'int'), GETPOST($dateparamname_start . 'min', 'int'), GETPOST($dateparamname_start . 'sec', 'int'), GETPOST($dateparamname_start . 'month', 'int'), GETPOST($dateparamname_start . 'day', 'int'), GETPOST($dateparamname_start . 'year', 'int'), 'tzuserrel'),
2309
-								'end' => dol_mktime($dateparamname_end_hour, $dateparamname_end_min, $dateparamname_end_sec, GETPOST($dateparamname_end . 'month', 'int'), GETPOST($dateparamname_end . 'day', 'int'), GETPOST($dateparamname_end . 'year', 'int'), 'tzuserrel')
2308
+								'start' => dol_mktime(GETPOST($dateparamname_start.'hour', 'int'), GETPOST($dateparamname_start.'min', 'int'), GETPOST($dateparamname_start.'sec', 'int'), GETPOST($dateparamname_start.'month', 'int'), GETPOST($dateparamname_start.'day', 'int'), GETPOST($dateparamname_start.'year', 'int'), 'tzuserrel'),
2309
+								'end' => dol_mktime($dateparamname_end_hour, $dateparamname_end_min, $dateparamname_end_sec, GETPOST($dateparamname_end.'month', 'int'), GETPOST($dateparamname_end.'day', 'int'), GETPOST($dateparamname_end.'year', 'int'), 'tzuserrel')
2310 2310
 							);
2311 2311
 						}
2312 2312
 					} elseif (GETPOST($keysuffix."options_".$key.$keyprefix."year")) {
Please login to merge, or discard this patch.