Completed
Branch develop (5d6cf7)
by
unknown
20:24
created
htdocs/expedition/list.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -215,7 +215,7 @@  discard block
 block discarded – undo
215 215
 
216 216
 // If massaction is close
217 217
 if ($massaction == 'classifyclose') {
218
-	$error=0;
218
+	$error = 0;
219 219
 	$selectids = GETPOST('toselect', 'array');
220 220
 	foreach ($selectids as $selectid) {
221 221
 		//	$object->fetch($selectid);
@@ -420,7 +420,7 @@  discard block
 block discarded – undo
420 420
 			if ($searchCategoryProductOperator == 0) {
421 421
 				$searchCategoryProductSqlList[] = " EXISTS (SELECT ck.fk_product FROM ".MAIN_DB_PREFIX."categorie_product as ck, ".MAIN_DB_PREFIX."expeditiondet as ed, ".MAIN_DB_PREFIX."commandedet as cd WHERE ed.fk_expedition = e.rowid AND ed.fk_origin_line = cd.rowid AND cd.fk_product = ck.fk_product AND ck.fk_categorie = ".((int) $searchCategoryProduct).")";
422 422
 			} else {
423
-				$listofcategoryid .= ($listofcategoryid ? ', ' : '') .((int) $searchCategoryProduct);
423
+				$listofcategoryid .= ($listofcategoryid ? ', ' : '').((int) $searchCategoryProduct);
424 424
 			}
425 425
 		}
426 426
 	}
@@ -535,7 +535,7 @@  discard block
 block discarded – undo
535 535
 if ($search_type_thirdparty != '' && $search_type_thirdparty > 0) {
536 536
 	$param .= '&search_type_thirdparty='.urlencode($search_type_thirdparty);
537 537
 }
538
-if ($search_datedelivery_start)	{
538
+if ($search_datedelivery_start) {
539 539
 	$param .= '&search_datedelivery_startday='.urlencode(dol_print_date($search_datedelivery_start, '%d')).'&search_datedelivery_startmonth='.urlencode(dol_print_date($search_datedelivery_start, '%m')).'&search_datedelivery_startyear='.urlencode(dol_print_date($search_datedelivery_start, '%Y'));
540 540
 }
541 541
 if ($search_datedelivery_end) {
@@ -891,7 +891,7 @@  discard block
 block discarded – undo
891 891
 
892 892
 	$shipment->id = $obj->rowid;
893 893
 	$shipment->ref = $obj->ref;
894
-	$shipment->shipping_method_id=$obj->fk_shipping_method;
894
+	$shipment->shipping_method_id = $obj->fk_shipping_method;
895 895
 
896 896
 	$companystatic->id = $obj->socid;
897 897
 	$companystatic->ref = $obj->name;
@@ -1027,7 +1027,7 @@  discard block
 block discarded – undo
1027 1027
 		}
1028 1028
 		if (!empty($arrayfields['e.fk_shipping_method']['checked'])) {
1029 1029
 			// Get code using getLabelFromKey
1030
-			$code=$langs->getLabelFromKey($db, $shipment->shipping_method_id, 'c_shipment_mode', 'rowid', 'code');
1030
+			$code = $langs->getLabelFromKey($db, $shipment->shipping_method_id, 'c_shipment_mode', 'rowid', 'code');
1031 1031
 			print '<td class="center tdoverflowmax150" title="'.dol_escape_htmltag($langs->trans("SendingMethod".strtoupper($code))).'">';
1032 1032
 			if ($shipment->shipping_method_id > 0) print $langs->trans("SendingMethod".strtoupper($code));
1033 1033
 			print '</td>';
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1032,7 +1032,9 @@
 block discarded – undo
1032 1032
 			// Get code using getLabelFromKey
1033 1033
 			$code=$langs->getLabelFromKey($db, $shipment->shipping_method_id, 'c_shipment_mode', 'rowid', 'code');
1034 1034
 			print '<td class="center tdoverflowmax150" title="'.dol_escape_htmltag($langs->trans("SendingMethod".strtoupper($code))).'">';
1035
-			if ($shipment->shipping_method_id > 0) print $langs->trans("SendingMethod".strtoupper($code));
1035
+			if ($shipment->shipping_method_id > 0) {
1036
+				print $langs->trans("SendingMethod".strtoupper($code));
1037
+			}
1036 1038
 			print '</td>';
1037 1039
 			if (!$i) {
1038 1040
 				$totalarray['nbfield']++;
Please login to merge, or discard this patch.
htdocs/debugbar/class/DataCollector/DolPhpCollector.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
 	{
61 61
 		$messages = $this->messages;
62 62
 
63
-		usort($messages, function ($itemA, $itemB) {
63
+		usort($messages, function($itemA, $itemB) {
64 64
 			if ($itemA['time'] === $itemB['time']) {
65 65
 				return 0;
66 66
 			}
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
 			if ($type = $severity & (2 ** $i)) {
120 120
 				$label = $this->friendlyErrorType($type);
121 121
 				$this->messages[] = [
122
-					'message' => $message . ' (' . $fileName . ':' . $line . ')',
122
+					'message' => $message.' ('.$fileName.':'.$line.')',
123 123
 					'message_html' => null,
124 124
 					'is_string' => true,
125 125
 					'label' => $label,
Please login to merge, or discard this patch.
htdocs/hrm/evaluation_card.php 2 patches
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -97,7 +97,9 @@
 block discarded – undo
97 97
 if (!isModEnabled("hrm")) {
98 98
 	accessforbidden();
99 99
 }
100
-if (!$permissiontoread || ($action === 'create' && !$permissiontoadd)) accessforbidden();
100
+if (!$permissiontoread || ($action === 'create' && !$permissiontoadd)) {
101
+	accessforbidden();
102
+}
101 103
 
102 104
 
103 105
 /*
Please login to merge, or discard this patch.
Spacing   +34 added lines, -34 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
 
41 41
 
42 42
 // Load translation files required by the page
43
-$langs->loadLangs(array('hrm', 'other', 'products'));  // why products?
43
+$langs->loadLangs(array('hrm', 'other', 'products')); // why products?
44 44
 
45 45
 // Get parameters
46 46
 $id = GETPOST('id', 'int');
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
 $contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'evaluationcard'; // To manage different context of search
52 52
 $backtopage = GETPOST('backtopage', 'alpha');
53 53
 $backtopageforcancel = GETPOST('backtopageforcancel', 'alpha');
54
-$lineid   = GETPOST('lineid', 'int');
54
+$lineid = GETPOST('lineid', 'int');
55 55
 
56 56
 // Initialize technical objects
57 57
 $object = new Evaluation($db);
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
 	if ($action == 'close') {
170 170
 		// save evaldet lines to user;
171 171
 		$sk = new SkillRank($db);
172
-		$SkillrecordsForActiveUser = $sk->fetchAll('ASC', 'fk_skill', 0, 0, array("customsql"=>"fk_object = ".$object->fk_user ." AND objecttype ='".SkillRank::SKILLRANK_TYPE_USER."'"), 'AND');
172
+		$SkillrecordsForActiveUser = $sk->fetchAll('ASC', 'fk_skill', 0, 0, array("customsql"=>"fk_object = ".$object->fk_user." AND objecttype ='".SkillRank::SKILLRANK_TYPE_USER."'"), 'AND');
173 173
 
174 174
 		$errors = 0;
175 175
 		// we go through the evaldets of the eval
@@ -212,7 +212,7 @@  discard block
 block discarded – undo
212 212
 		}
213 213
 	}
214 214
 
215
-	if ($action == 'reopen' ) {
215
+	if ($action == 'reopen') {
216 216
 		// no update here we just change the evaluation status
217 217
 		$object->setStatut(Evaluation::STATUS_VALIDATED);
218 218
 	}
@@ -259,7 +259,7 @@  discard block
 block discarded – undo
259 259
 
260 260
 // Part to create
261 261
 if ($action == 'create') {
262
-	print load_fiche_titre($langs->trans("NewEval"), '', 'object_' . $object->picto);
262
+	print load_fiche_titre($langs->trans("NewEval"), '', 'object_'.$object->picto);
263 263
 
264 264
 	print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">';
265 265
 	print '<input type="hidden" name="token" value="'.newToken().'">';
@@ -423,9 +423,9 @@  discard block
 block discarded – undo
423 423
 	print '<div class="underbanner clearboth"></div>';
424 424
 	print '<table class="border centpercent tableforfield">'."\n";
425 425
 
426
-	$object->fields['label']['visible']=0; // Already in banner
427
-	$object->fields['fk_user']['visible']=0; // Already in banner
428
-	$object->fields['fk_job']['visible']=0; // Already in banner
426
+	$object->fields['label']['visible'] = 0; // Already in banner
427
+	$object->fields['fk_user']['visible'] = 0; // Already in banner
428
+	$object->fields['fk_job']['visible'] = 0; // Already in banner
429 429
 	include DOL_DOCUMENT_ROOT.'/core/tpl/commonfields_view.tpl.php';
430 430
 
431 431
 	// Other attributes. Fields from hook formObjectOptions and Extrafields.
@@ -463,7 +463,7 @@  discard block
 block discarded – undo
463 463
 			include DOL_DOCUMENT_ROOT.'/core/tpl/ajaxrow.tpl.php';
464 464
 		}
465 465
 
466
-		$conf->modules_parts['tpl']['hrm']='/hrm/core/tpl/'; // Pour utilisation du tpl hrm sur cet écran
466
+		$conf->modules_parts['tpl']['hrm'] = '/hrm/core/tpl/'; // Pour utilisation du tpl hrm sur cet écran
467 467
 
468 468
 		print '<div class="div-table-responsive-no-min">';
469 469
 		if (!empty($object->lines) || ($object->status == $object::STATUS_DRAFT && $permissiontoadd && $action != 'selectlines' && $action != 'editline')) {
@@ -524,14 +524,14 @@  discard block
 block discarded – undo
524 524
 		$sql .= '  skdet_user.description as "userRankForSkillDesc",';
525 525
 		$sql .= '  skdet_required.description as "required_rank_desc"';
526 526
 
527
-		$sql .= '  FROM ' . MAIN_DB_PREFIX . 'hrm_evaluation as e';
528
-		$sql .= '  LEFT JOIN ' . MAIN_DB_PREFIX . 'hrm_evaluationdet as ed ON  e.rowid = ed.fk_evaluation';
529
-		$sql .= '  LEFT JOIN ' . MAIN_DB_PREFIX . 'hrm_job as j ON e.fk_job = j.rowid';
530
-		$sql .= '  LEFT JOIN ' . MAIN_DB_PREFIX . 'hrm_skill as sk ON ed.fk_skill = sk.rowid';
531
-		$sql .= '  INNER JOIN ' . MAIN_DB_PREFIX . 'hrm_skilldet as skdet_user ON (skdet_user.fk_skill = sk.rowid AND skdet_user.rankorder = ed.rankorder)';
527
+		$sql .= '  FROM '.MAIN_DB_PREFIX.'hrm_evaluation as e';
528
+		$sql .= '  LEFT JOIN '.MAIN_DB_PREFIX.'hrm_evaluationdet as ed ON  e.rowid = ed.fk_evaluation';
529
+		$sql .= '  LEFT JOIN '.MAIN_DB_PREFIX.'hrm_job as j ON e.fk_job = j.rowid';
530
+		$sql .= '  LEFT JOIN '.MAIN_DB_PREFIX.'hrm_skill as sk ON ed.fk_skill = sk.rowid';
531
+		$sql .= '  INNER JOIN '.MAIN_DB_PREFIX.'hrm_skilldet as skdet_user ON (skdet_user.fk_skill = sk.rowid AND skdet_user.rankorder = ed.rankorder)';
532 532
 		//$sql .= "  LEFT JOIN " . MAIN_DB_PREFIX . "hrm_skillrank as skr ON (j.rowid = skr.fk_object AND skr.fk_skill = ed.fk_skill AND skr.objecttype = 'job')";
533
-		$sql .= '  LEFT JOIN ' . MAIN_DB_PREFIX . 'hrm_skilldet as skdet_required ON (skdet_required.fk_skill = sk.rowid AND skdet_required.rankorder = ed.required_rank)';
534
-		$sql .= " WHERE e.rowid =" . ((int) $object->id);
533
+		$sql .= '  LEFT JOIN '.MAIN_DB_PREFIX.'hrm_skilldet as skdet_required ON (skdet_required.fk_skill = sk.rowid AND skdet_required.rankorder = ed.required_rank)';
534
+		$sql .= " WHERE e.rowid =".((int) $object->id);
535 535
 
536 536
 		//      echo $sql;
537 537
 
@@ -547,21 +547,21 @@  discard block
 block discarded – undo
547 547
 				$Tab[$num]->skill_id = $obj->fk_skill;
548 548
 				$Tab[$num]->skilllabel = $obj->skilllabel;
549 549
 				$Tab[$num]->description = $obj->description;
550
-				$Tab[$num]->userRankForSkill = '<span title="'.$obj->userRankForSkillDesc.'" class="radio_js_bloc_number TNote_1">' . $obj->userRankForSkill . '</span>';
551
-				$Tab[$num]->required_rank = '<span title="'.$obj->required_rank_desc.'" class="radio_js_bloc_number TNote_1">' . $obj->required_rank . '</span>';
550
+				$Tab[$num]->userRankForSkill = '<span title="'.$obj->userRankForSkillDesc.'" class="radio_js_bloc_number TNote_1">'.$obj->userRankForSkill.'</span>';
551
+				$Tab[$num]->required_rank = '<span title="'.$obj->required_rank_desc.'" class="radio_js_bloc_number TNote_1">'.$obj->required_rank.'</span>';
552 552
 
553 553
 				if ($obj->userRankForSkill > $obj->required_rank) {
554
-					$title=$langs->trans('MaxlevelGreaterThanShort');
554
+					$title = $langs->trans('MaxlevelGreaterThanShort');
555 555
 					$class .= 'veryhappy diffnote';
556 556
 				} elseif ($obj->userRankForSkill == $obj->required_rank) {
557
-					$title=$langs->trans('MaxLevelEqualToShort');
557
+					$title = $langs->trans('MaxLevelEqualToShort');
558 558
 					$class .= 'happy diffnote';
559 559
 				} elseif ($obj->userRankForSkill < $obj->required_rank) {
560
-					$title=$langs->trans('MaxLevelLowerThanShort');
560
+					$title = $langs->trans('MaxLevelLowerThanShort');
561 561
 					$class .= 'sad';
562 562
 				}
563 563
 
564
-				$Tab[$num]->result = '<span title="'.$title.'" class="classfortooltip ' . $class . ' note">&nbsp;</span>';
564
+				$Tab[$num]->result = '<span title="'.$title.'" class="classfortooltip '.$class.' note">&nbsp;</span>';
565 565
 
566 566
 				$num++;
567 567
 			}
@@ -572,12 +572,12 @@  discard block
 block discarded – undo
572 572
 			print '<table id="tablelines" class="noborder noshadow centpercent">';
573 573
 
574 574
 			print '<tr class="liste_titre">';
575
-			print '<th style="width:auto;text-align:auto" class="liste_titre">' . $langs->trans("TypeSkill") . ' </th>';
576
-			print '<th style="width:auto;text-align:auto" class="liste_titre">' . $langs->trans("Label") . '</th>';
577
-			print '<th style="width:auto;text-align:auto" class="liste_titre">' . $langs->trans("Description") . '</th>';
578
-			print '<th style="width:auto;text-align:center" class="liste_titre">' . $langs->trans("EmployeeRank") . '</th>';
579
-			print '<th style="width:auto;text-align:center" class="liste_titre">' . $langs->trans("RequiredRank") . '</th>';
580
-			print '<th style="width:auto;text-align:auto" class="liste_titre">' . $langs->trans("Result") . ' ' .$form->textwithpicto('', GetLegendSkills(), 1) .'</th>';
575
+			print '<th style="width:auto;text-align:auto" class="liste_titre">'.$langs->trans("TypeSkill").' </th>';
576
+			print '<th style="width:auto;text-align:auto" class="liste_titre">'.$langs->trans("Label").'</th>';
577
+			print '<th style="width:auto;text-align:auto" class="liste_titre">'.$langs->trans("Description").'</th>';
578
+			print '<th style="width:auto;text-align:center" class="liste_titre">'.$langs->trans("EmployeeRank").'</th>';
579
+			print '<th style="width:auto;text-align:center" class="liste_titre">'.$langs->trans("RequiredRank").'</th>';
580
+			print '<th style="width:auto;text-align:auto" class="liste_titre">'.$langs->trans("Result").' '.$form->textwithpicto('', GetLegendSkills(), 1).'</th>';
581 581
 			print '</tr>';
582 582
 
583 583
 			$sk = new Skill($db);
@@ -585,12 +585,12 @@  discard block
 block discarded – undo
585 585
 				$sk->fetch($t->skill_id);
586 586
 
587 587
 				print '<tr>';
588
-				print ' <td>' . Skill::typeCodeToLabel($t->skill_type) . '</td>';
589
-				print ' <td>' . $sk->getNomUrl(1) . '</td>';
590
-				print ' <td>' . $t->description . '</td>';
591
-				print ' <td align="center">' . $t->userRankForSkill . '</td>';
592
-				print ' <td align="center">' . $t->required_rank . '</td>';
593
-				print ' <td>' . $t->result . '</td>';
588
+				print ' <td>'.Skill::typeCodeToLabel($t->skill_type).'</td>';
589
+				print ' <td>'.$sk->getNomUrl(1).'</td>';
590
+				print ' <td>'.$t->description.'</td>';
591
+				print ' <td align="center">'.$t->userRankForSkill.'</td>';
592
+				print ' <td align="center">'.$t->required_rank.'</td>';
593
+				print ' <td>'.$t->result.'</td>';
594 594
 				print '</tr>';
595 595
 			}
596 596
 
Please login to merge, or discard this patch.
htdocs/hrm/evaluation_note.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -28,9 +28,9 @@  discard block
 block discarded – undo
28 28
 // Load Dolibarr environment
29 29
 require '../main.inc.php';
30 30
 
31
-require_once DOL_DOCUMENT_ROOT . '/hrm/class/evaluation.class.php';
32
-require_once DOL_DOCUMENT_ROOT . '/hrm/class/job.class.php';
33
-require_once DOL_DOCUMENT_ROOT . '/hrm/lib/hrm_evaluation.lib.php';
31
+require_once DOL_DOCUMENT_ROOT.'/hrm/class/evaluation.class.php';
32
+require_once DOL_DOCUMENT_ROOT.'/hrm/class/job.class.php';
33
+require_once DOL_DOCUMENT_ROOT.'/hrm/lib/hrm_evaluation.lib.php';
34 34
 
35 35
 
36 36
 // Load translation files required by the page
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
 
62 62
 // Permissions
63 63
 $permissionnote   = $user->rights->hrm->evaluation->write; // Used by the include of actions_setnotes.inc.php
64
-$permissiontoread = $user->rights->hrm->evaluation->read;  // Used by the include of actions_addupdatedelete.inc.php
64
+$permissiontoread = $user->rights->hrm->evaluation->read; // Used by the include of actions_addupdatedelete.inc.php
65 65
 
66 66
 // Security check (enable the most restrictive one)
67 67
 //if ($user->socid > 0) accessforbidden();
Please login to merge, or discard this patch.
htdocs/hrm/skill_tab.php 2 patches
Braces   +21 added lines, -7 removed lines patch added patch discarded remove patch
@@ -78,9 +78,15 @@  discard block
 block discarded – undo
78 78
 $permissiontoadd  = $user->hasRight('hrm', 'all', 'write'); // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php
79 79
 
80 80
 // Security check (enable the most restrictive one)
81
-if ($user->socid > 0) accessforbidden();
82
-if (empty($conf->hrm->enabled)) accessforbidden();
83
-if (!$permissiontoread) accessforbidden();
81
+if ($user->socid > 0) {
82
+	accessforbidden();
83
+}
84
+if (empty($conf->hrm->enabled)) {
85
+	accessforbidden();
86
+}
87
+if (!$permissiontoread) {
88
+	accessforbidden();
89
+}
84 90
 
85 91
 
86 92
 /*
@@ -123,10 +129,14 @@  discard block
 block discarded – undo
123 129
 				$skillAdded->fk_object = $id;
124 130
 				$skillAdded->objecttype = $objecttype;
125 131
 				$ret = $skillAdded->create($user);
126
-				if ($ret < 0) setEventMessages($skillAdded->error, null, 'errors');
132
+				if ($ret < 0) {
133
+					setEventMessages($skillAdded->error, null, 'errors');
134
+				}
127 135
 				//else unset($TSkillsToAdd);
128 136
 			}
129
-			if ($ret > 0) setEventMessages($langs->trans("SaveAddSkill"), null);
137
+			if ($ret > 0) {
138
+				setEventMessages($langs->trans("SaveAddSkill"), null);
139
+			}
130 140
 		}
131 141
 	} elseif ($action == 'saveSkill') {
132 142
 		if (!empty($TNote)) {
@@ -383,9 +393,13 @@  discard block
 block discarded – undo
383 393
 	}
384 394
 
385 395
 	print '</table>';
386
-	if ($objecttype != 'user' && $permissiontoadd) print '<td><input class="button pull-right" type="submit" value="' . $langs->trans('SaveRank') . '"></td>';
396
+	if ($objecttype != 'user' && $permissiontoadd) {
397
+		print '<td><input class="button pull-right" type="submit" value="' . $langs->trans('SaveRank') . '"></td>';
398
+	}
387 399
 	print '</div>';
388
-	if ($objecttype != 'user' && $permissiontoadd) print '</form>';
400
+	if ($objecttype != 'user' && $permissiontoadd) {
401
+		print '</form>';
402
+	}
389 403
 
390 404
 
391 405
 	// liste des compétences liées
Please login to merge, or discard this patch.
Spacing   +37 added lines, -37 removed lines patch added patch discarded remove patch
@@ -29,14 +29,14 @@  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 . '/user/class/user.class.php';
36
-require_once DOL_DOCUMENT_ROOT . '/hrm/class/job.class.php';
37
-require_once DOL_DOCUMENT_ROOT . '/hrm/class/skill.class.php';
38
-require_once DOL_DOCUMENT_ROOT . '/hrm/class/skillrank.class.php';
39
-require_once DOL_DOCUMENT_ROOT . '/hrm/lib/hrm_skill.lib.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.'/user/class/user.class.php';
36
+require_once DOL_DOCUMENT_ROOT.'/hrm/class/job.class.php';
37
+require_once DOL_DOCUMENT_ROOT.'/hrm/class/skill.class.php';
38
+require_once DOL_DOCUMENT_ROOT.'/hrm/class/skillrank.class.php';
39
+require_once DOL_DOCUMENT_ROOT.'/hrm/lib/hrm_skill.lib.php';
40 40
 
41 41
 // Load translation files required by the page
42 42
 $langs->loadLangs(array('hrm', 'other'));
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
 $hookmanager->initHooks(array('skilltab', 'globalcard')); // Note that conf->hooks_modules contains array
77 77
 
78 78
 // Load object
79
-include DOL_DOCUMENT_ROOT . '/core/actions_fetchobject.inc.php'; // Must be include, not include_once.
79
+include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once.
80 80
 
81 81
 // Permissions
82 82
 $permissiontoread = $user->hasRight('hrm', 'all', 'read');
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
 			if (empty($id) && (($action != 'add' && $action != 'create') || $cancel)) {
109 109
 				$backtopage = $backurlforlist;
110 110
 			} else {
111
-				$backtopage = DOL_URL_ROOT.'/hrm/skill_list.php?id=' . ($id > 0 ? $id : '__ID__');
111
+				$backtopage = DOL_URL_ROOT.'/hrm/skill_list.php?id='.($id > 0 ? $id : '__ID__');
112 112
 			}
113 113
 		}
114 114
 	}
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
 	} elseif ($action == 'saveSkill') {
146 146
 		if (!empty($TNote)) {
147 147
 			foreach ($TNote as $skillId => $rank) {
148
-				$TSkills = $skill->fetchAll('ASC', 't.rowid', 0, 0, array('customsql' => 'fk_object=' . ((int) $id) . " AND objecttype='" . $db->escape($objecttype) . "' AND fk_skill = " . ((int) $skillId)));
148
+				$TSkills = $skill->fetchAll('ASC', 't.rowid', 0, 0, array('customsql' => 'fk_object='.((int) $id)." AND objecttype='".$db->escape($objecttype)."' AND fk_skill = ".((int) $skillId)));
149 149
 				if (is_array($TSkills) && !empty($TSkills)) {
150 150
 					foreach ($TSkills as $tmpObj) {
151 151
 						$tmpObj->rankorder = $rank;
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
 				}
155 155
 			}
156 156
 			setEventMessages($langs->trans("SaveLevelSkill"), null);
157
-			header("Location: " . DOL_URL_ROOT.'/hrm/skill_tab.php?id=' . $id. '&objecttype=job');
157
+			header("Location: ".DOL_URL_ROOT.'/hrm/skill_tab.php?id='.$id.'&objecttype=job');
158 158
 			exit;
159 159
 		}
160 160
 	} elseif ($action == 'confirm_deleteskill' && $confirm == 'yes') {
@@ -185,11 +185,11 @@  discard block
 block discarded – undo
185 185
 
186 186
 	// view configuration
187 187
 	if ($objecttype == 'job') {
188
-		require_once DOL_DOCUMENT_ROOT . '/hrm/lib/hrm_job.lib.php';
188
+		require_once DOL_DOCUMENT_ROOT.'/hrm/lib/hrm_job.lib.php';
189 189
 		$head = jobPrepareHead($object);
190 190
 		$listLink = dol_buildpath('/hrm/job_list.php', 1);
191 191
 	} elseif ($objecttype == "user") {
192
-		require_once DOL_DOCUMENT_ROOT . "/core/lib/usergroups.lib.php";
192
+		require_once DOL_DOCUMENT_ROOT."/core/lib/usergroups.lib.php";
193 193
 		$object->getRights();
194 194
 		$head = user_prepare_head($object);
195 195
 		$listLink = dol_buildpath('/user/list.php', 1);
@@ -205,7 +205,7 @@  discard block
 block discarded – undo
205 205
 	}*/
206 206
 	// Confirmation to delete line
207 207
 	if ($action == 'ask_deleteskill') {
208
-		$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id . '&objecttype=' . $objecttype . '&lineid=' . $lineid, $langs->trans('DeleteLine'), $langs->trans('ConfirmDeleteLine'), 'confirm_deleteskill', '', 0, 1);
208
+		$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&objecttype='.$objecttype.'&lineid='.$lineid, $langs->trans('DeleteLine'), $langs->trans('ConfirmDeleteLine'), 'confirm_deleteskill', '', 0, 1);
209 209
 	}
210 210
 	// Clone confirmation
211 211
 	/*if ($action == 'clone') {
@@ -230,15 +230,15 @@  discard block
 block discarded – undo
230 230
 	// Object card
231 231
 	// ------------------------------------------------------------
232 232
 	if ($objecttype == 'job') {
233
-		$linkback = '<a href="' . dol_buildpath('/hrm/job_list.php', 1) . '?restore_lastsearch_values=1' . (!empty($socid) ? '&socid=' . $socid : '') . '">' . $langs->trans("BackToList") . '</a>';
233
+		$linkback = '<a href="'.dol_buildpath('/hrm/job_list.php', 1).'?restore_lastsearch_values=1'.(!empty($socid) ? '&socid='.$socid : '').'">'.$langs->trans("BackToList").'</a>';
234 234
 
235 235
 		$morehtmlref = '<div class="refid">';
236
-		$morehtmlref.= $object->label;
236
+		$morehtmlref .= $object->label;
237 237
 		$morehtmlref .= '</div>';
238 238
 
239 239
 		dol_banner_tab($object, 'id', $linkback, 1, 'rowid', 'rowid', $morehtmlref);
240 240
 	} else {
241
-		$linkback = '<a href="' . $listLink . '?restore_lastsearch_values=1' . (!empty($socid) ? '&socid=' . $socid : '') . '">' . $langs->trans("BackToList") . '</a>';
241
+		$linkback = '<a href="'.$listLink.'?restore_lastsearch_values=1'.(!empty($socid) ? '&socid='.$socid : '').'">'.$langs->trans("BackToList").'</a>';
242 242
 
243 243
 		$morehtmlref = '<a href="'.DOL_URL_ROOT.'/user/vcard.php?id='.$object->id.'&output=file&file='.urlencode(dol_sanitizeFileName($object->getFullName($langs).'.vcf')).'" class="refid" rel="noopener">';
244 244
 		$morehtmlref .= img_picto($langs->trans("Download").' '.$langs->trans("VCard"), 'vcard.png', 'class="valignmiddle marginleftonly paddingrightonly"');
@@ -255,7 +255,7 @@  discard block
 block discarded – undo
255 255
 	$TAllSkills = $static_skill->fetchAll();
256 256
 
257 257
 	// Array format for multiselectarray function
258
-	$TAllSkillsFormatted=array();
258
+	$TAllSkillsFormatted = array();
259 259
 	if (!empty($TAllSkills)) {
260 260
 		foreach ($TAllSkills as $k=>$v) {
261 261
 			$TAllSkillsFormatted[$k] = $v->label;
@@ -283,11 +283,11 @@  discard block
 block discarded – undo
283 283
 		//$keyforbreak='fieldkeytoswitchonsecondcolumn';	// We change column just before this field
284 284
 		//unset($object->fields['fk_project']);				// Hide field already shown in banner
285 285
 		//unset($object->fields['fk_soc']);					// Hide field already shown in banner
286
-		$object->fields['label']['visible']=0; // Already in banner
287
-		include DOL_DOCUMENT_ROOT . '/core/tpl/commonfields_view.tpl.php';
286
+		$object->fields['label']['visible'] = 0; // Already in banner
287
+		include DOL_DOCUMENT_ROOT.'/core/tpl/commonfields_view.tpl.php';
288 288
 
289 289
 		// Other attributes. Fields from hook formObjectOptions and Extrafields.
290
-		include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_view.tpl.php';
290
+		include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php';
291 291
 	} else {
292 292
 		// Login
293 293
 		print '<tr><td class="titlefield">'.$langs->trans("Login").'</td>';
@@ -310,9 +310,9 @@  discard block
 block discarded – undo
310 310
 		}
311 311
 		print '</tr>'."\n";
312 312
 
313
-		$object->fields['label']['visible']=0; // Already in banner
314
-		$object->fields['firstname']['visible']=0; // Already in banner
315
-		$object->fields['lastname']['visible']=0; // Already in banner
313
+		$object->fields['label']['visible'] = 0; // Already in banner
314
+		$object->fields['firstname']['visible'] = 0; // Already in banner
315
+		$object->fields['lastname']['visible'] = 0; // Already in banner
316 316
 		//include DOL_DOCUMENT_ROOT . '/core/tpl/commonfields_view.tpl.php';
317 317
 
318 318
 		// Ref employee
@@ -352,19 +352,19 @@  discard block
 block discarded – undo
352 352
 
353 353
 	if ($objecttype != 'user' && $permissiontoadd) {
354 354
 		// form pour ajouter des compétences
355
-		print '<form name="addSkill" method="post" action="' . $_SERVER['PHP_SELF'] . '">';
356
-		print '<input type="hidden" name="objecttype" value="' . $objecttype . '">';
357
-		print '<input type="hidden" name="id" value="' . $id . '">';
355
+		print '<form name="addSkill" method="post" action="'.$_SERVER['PHP_SELF'].'">';
356
+		print '<input type="hidden" name="objecttype" value="'.$objecttype.'">';
357
+		print '<input type="hidden" name="id" value="'.$id.'">';
358 358
 		print '<input type="hidden" name="action" value="addSkill">';
359 359
 		print '<input type="hidden" name="token" value="'.newToken().'">';
360 360
 		print '<div class="div-table-responsive-no-min">';
361 361
 		print '<table id="tablelines" class="noborder noshadow" width="100%">';
362
-		print '<tr><td style="width:90%">' . $langs->trans('AddSkill') . '</td><td style="width:10%"></td></tr>';
362
+		print '<tr><td style="width:90%">'.$langs->trans('AddSkill').'</td><td style="width:10%"></td></tr>';
363 363
 		print '<tr>';
364 364
 		print '<td>';
365 365
 		print img_picto('', 'shapes', 'class="pictofixedwidth"');
366
-		print $form->multiselectarray('fk_skill', array_diff_key($TAllSkillsFormatted, $TAlreadyUsedSkill), array(), 0, 0, 'widthcentpercentminusx') . '</td>';
367
-		print '<td><input class="button reposition" type="submit" value="' . $langs->trans('Add') . '"></td>';
366
+		print $form->multiselectarray('fk_skill', array_diff_key($TAllSkillsFormatted, $TAlreadyUsedSkill), array(), 0, 0, 'widthcentpercentminusx').'</td>';
367
+		print '<td><input class="button reposition" type="submit" value="'.$langs->trans('Add').'"></td>';
368 368
 		print '</tr>';
369 369
 		print '</table>';
370 370
 		print '</div>';
@@ -375,9 +375,9 @@  discard block
 block discarded – undo
375 375
 	print '<div class="clearboth"></div>';
376 376
 
377 377
 	if ($objecttype != 'user' && $permissiontoadd) {
378
-		print '<form name="saveSkill" method="post" action="' . $_SERVER['PHP_SELF'] . '">';
379
-		print '<input type="hidden" name="objecttype" value="' . $objecttype . '">';
380
-		print '<input type="hidden" name="id" value="' . $id . '">';
378
+		print '<form name="saveSkill" method="post" action="'.$_SERVER['PHP_SELF'].'">';
379
+		print '<input type="hidden" name="objecttype" value="'.$objecttype.'">';
380
+		print '<input type="hidden" name="id" value="'.$id.'">';
381 381
 		print '<input type="hidden" name="token" value="'.newToken().'">';
382 382
 		print '<input type="hidden" name="action" value="saveSkill">';
383 383
 	}
@@ -394,7 +394,7 @@  discard block
 block discarded – undo
394 394
 	}
395 395
 	print '</tr>';
396 396
 	if (!is_array($TSkillsJob) || empty($TSkillsJob)) {
397
-		print '<tr><td><span class="opacitymedium">' . $langs->trans("NoRecordFound") . '</span></td></tr>';
397
+		print '<tr><td><span class="opacitymedium">'.$langs->trans("NoRecordFound").'</span></td></tr>';
398 398
 	} else {
399 399
 		$sk = new Skill($db);
400 400
 		foreach ($TSkillsJob as $skillElement) {
@@ -413,7 +413,7 @@  discard block
 block discarded – undo
413 413
 			if ($objecttype != 'user' && $permissiontoadd) {
414 414
 				print '<td class="linecoledit"></td>';
415 415
 				print '<td class="linecoldelete">';
416
-				print '<a class="reposition" href="' . $_SERVER["PHP_SELF"] . '?id=' . $skillElement->fk_object . '&amp;objecttype=' . $objecttype . '&amp;action=ask_deleteskill&amp;lineid=' . $skillElement->id . '">';
416
+				print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?id='.$skillElement->fk_object.'&amp;objecttype='.$objecttype.'&amp;action=ask_deleteskill&amp;lineid='.$skillElement->id.'">';
417 417
 				print img_delete();
418 418
 				print '</a>';
419 419
 			}
@@ -423,7 +423,7 @@  discard block
 block discarded – undo
423 423
 	}
424 424
 
425 425
 	print '</table>';
426
-	if ($objecttype != 'user' && $permissiontoadd) print '<td><input class="button pull-right" type="submit" value="' . $langs->trans('SaveRank') . '"></td>';
426
+	if ($objecttype != 'user' && $permissiontoadd) print '<td><input class="button pull-right" type="submit" value="'.$langs->trans('SaveRank').'"></td>';
427 427
 	print '</div>';
428 428
 	if ($objecttype != 'user' && $permissiontoadd) print '</form>';
429 429
 
Please login to merge, or discard this patch.
htdocs/hrm/admin/admin_hrm.php 1 patch
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -46,8 +46,12 @@
 block discarded – undo
46 46
 //if ($user->socid > 0) $socid = $user->socid;
47 47
 //$isdraft = (($object->status == $object::STATUS_DRAFT) ? 1 : 0);
48 48
 //restrictedArea($user, $object->element, $object->id, '', '', 'fk_soc', 'rowid', 0);
49
-if (!isModEnabled('hrm')) accessforbidden();
50
-if (empty($permissiontoread)) accessforbidden();
49
+if (!isModEnabled('hrm')) {
50
+	accessforbidden();
51
+}
52
+if (empty($permissiontoread)) {
53
+	accessforbidden();
54
+}
51 55
 
52 56
 
53 57
 /*
Please login to merge, or discard this patch.
htdocs/hrm/admin/admin_establishment.php 1 patch
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -40,8 +40,12 @@
 block discarded – undo
40 40
 //if ($user->socid > 0) $socid = $user->socid;
41 41
 //$isdraft = (($object->status == $object::STATUS_DRAFT) ? 1 : 0);
42 42
 //restrictedArea($user, $object->element, $object->id, '', '', 'fk_soc', 'rowid', 0);
43
-if (!isModEnabled('hrm')) accessforbidden();
44
-if (empty($permissiontoread)) accessforbidden();
43
+if (!isModEnabled('hrm')) {
44
+	accessforbidden();
45
+}
46
+if (empty($permissiontoread)) {
47
+	accessforbidden();
48
+}
45 49
 
46 50
 $sortorder     = GETPOST('sortorder', 'aZ09comma');
47 51
 $sortfield     = GETPOST('sortfield', 'aZ09comma');
Please login to merge, or discard this patch.
htdocs/hrm/establishment/info.php 1 patch
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -86,8 +86,12 @@
 block discarded – undo
86 86
 //if ($user->socid > 0) $socid = $user->socid;
87 87
 //$isdraft = (($object->status == $object::STATUS_DRAFT) ? 1 : 0);
88 88
 //restrictedArea($user, $object->element, $object->id, '', '', 'fk_soc', 'rowid', $isdraft);
89
-if (!isModEnabled('hrm')) accessforbidden();
90
-if (empty($permissiontoread)) accessforbidden();
89
+if (!isModEnabled('hrm')) {
90
+	accessforbidden();
91
+}
92
+if (empty($permissiontoread)) {
93
+	accessforbidden();
94
+}
91 95
 
92 96
 
93 97
 /*
Please login to merge, or discard this patch.
htdocs/hrm/lib/hrm.lib.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
 
45 45
 	$h = 0;
46 46
 	$head = array();
47
-	$head[$h][0] = DOL_URL_ROOT . "/admin/hrm.php";
47
+	$head[$h][0] = DOL_URL_ROOT."/admin/hrm.php";
48 48
 	$head[$h][1] = $langs->trans("Settings");
49 49
 	$head[$h][2] = 'settings';
50 50
 	$h++;
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
 	$head[$h][2] = 'establishments';
55 55
 	$h++;
56 56
 
57
-	$head[$h][0] = DOL_URL_ROOT . '/hrm/admin/skill_extrafields.php';
57
+	$head[$h][0] = DOL_URL_ROOT.'/hrm/admin/skill_extrafields.php';
58 58
 	$head[$h][1] = $langs->trans("SkillsExtraFields");
59 59
 	$nbExtrafields = $extrafields->attributes['hrm_skill']['count'];
60 60
 	if ($nbExtrafields > 0) {
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
 	$head[$h][2] = 'skillsAttributes';
64 64
 	$h++;
65 65
 
66
-	$head[$h][0] = DOL_URL_ROOT . '/hrm/admin/job_extrafields.php';
66
+	$head[$h][0] = DOL_URL_ROOT.'/hrm/admin/job_extrafields.php';
67 67
 	$head[$h][1] = $langs->trans("JobsExtraFields");
68 68
 	$nbExtrafields = $extrafields->attributes['hrm_job']['count'];
69 69
 	if ($nbExtrafields > 0) {
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
 	$head[$h][2] = 'jobsAttributes';
73 73
 	$h++;
74 74
 
75
-	$head[$h][0] = DOL_URL_ROOT . '/hrm/admin/evaluation_extrafields.php';
75
+	$head[$h][0] = DOL_URL_ROOT.'/hrm/admin/evaluation_extrafields.php';
76 76
 	$head[$h][1] = $langs->trans("EvaluationsExtraFields");
77 77
 	$nbExtrafields = $extrafields->attributes['hrm_evaluation']['count'];
78 78
 	if ($nbExtrafields > 0) {
Please login to merge, or discard this patch.