-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
19 changed files
with
171 additions
and
100 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,7 @@ | |
* Copyright (C) 2021 Jean-Pascal BOUDET <[email protected]> | ||
* Copyright (C) 2021 Grégory BLEMAND <[email protected]> | ||
* Copyright (C) 2023-2024 Frédéric France <[email protected]> | ||
* Copyright (C) 2024 MDW <[email protected]> | ||
* | ||
* This program is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
|
@@ -139,6 +140,7 @@ | |
if (is_array($skilldetArray) && count($skilldetArray) > 0) { | ||
if ($action == 'add' && $permissiontoadd) { | ||
$arraySkill = $object->fetchLines(); | ||
'@phan-var-force Skilldet[] $arraySkill'; | ||
$index = 0; | ||
foreach ($arraySkill as $skilldet) { | ||
if (isset($skilldetArray[$index])) { | ||
|
@@ -184,7 +186,7 @@ | |
include DOL_DOCUMENT_ROOT . '/core/actions_builddoc.inc.php'; | ||
|
||
if ($action == 'set_thirdparty' && $permissiontoadd) { | ||
$object->setValueFrom('fk_soc', GETPOSTINT('fk_soc'), '', '', 'date', '', $user, $triggermodname); | ||
$object->setValueFrom('fk_soc', GETPOSTINT('fk_soc'), '', null, 'date', '', $user, $triggermodname); | ||
} | ||
if ($action == 'classin' && $permissiontoadd) { | ||
$object->setProject(GETPOSTINT('projectid')); | ||
|
@@ -306,6 +308,7 @@ | |
|
||
// SKILLDET | ||
$SkilldetRecords = $object->fetchLines(); | ||
'@phan-var-force Skilldet[] $SkilldetRecords'; | ||
|
||
if (is_array($SkilldetRecords) && count($SkilldetRecords) == 0) { | ||
$object->createSkills(1); | ||
|
@@ -364,7 +367,7 @@ | |
if (empty($skilldetArray)) { | ||
$value = GETPOSTISSET($key) ? GETPOST($key, $check) : $sk->$key; | ||
} else { | ||
$value=$skilldetArray[$sk->id]; | ||
$value = $skilldetArray[$sk->id]; | ||
} | ||
// | ||
// } elseif ($val['type'] == 'price') { | ||
|
@@ -457,7 +460,7 @@ | |
|
||
|
||
$morehtmlref = '<div class="refid">'; | ||
$morehtmlref.= $object->label; | ||
$morehtmlref .= $object->label; | ||
$morehtmlref .= '</div>'; | ||
dol_banner_tab($object, 'id', $linkback, 1, 'rowid', 'rowid', $morehtmlref); | ||
|
||
|
@@ -467,7 +470,7 @@ | |
print '<div class="underbanner clearboth"></div>'; | ||
print '<table class="border centpercent tableforfield">' . "\n"; | ||
|
||
$object->fields['label']['visible']=0; // Already in banner | ||
$object->fields['label']['visible'] = 0; // Already in banner | ||
include DOL_DOCUMENT_ROOT . '/core/tpl/commonfields_view.tpl.php'; | ||
|
||
// Other attributes. Fields from hook formObjectOptions and Extrafields. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,7 @@ | |
* Copyright (C) 2021 Grégory BLEMAND <[email protected]> | ||
* Copyright (C) 2024 Frédéric France <[email protected]> | ||
* Copyright (C) 2024 Alexandre Spangaro <[email protected]> | ||
* Copyright (C) 2024 MDW <[email protected]> | ||
* | ||
* This program is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
|
@@ -143,11 +144,13 @@ | |
$error++; | ||
} | ||
if (!$error) { | ||
$ret = -1; | ||
foreach ($TSkillsToAdd as $k => $v) { | ||
$skillAdded = new SkillRank($db); | ||
$skillAdded->fk_skill = $v; | ||
$skillAdded->fk_object = $id; | ||
$skillAdded->objecttype = $objecttype; | ||
// TODO: ensure handling of $ret is ok, now only fails when last is KO. | ||
$ret = $skillAdded->create($user); | ||
if ($ret < 0) { | ||
setEventMessages($skillAdded->error, null, 'errors'); | ||
|
@@ -162,6 +165,7 @@ | |
if (!empty($TNote)) { | ||
foreach ($TNote as $skillId => $rank) { | ||
$TSkills = $skill->fetchAll('ASC', 't.rowid', 0, 0, '(fk_object:=:'.((int) $id).") AND (objecttype:=:'".$db->escape($objecttype)."') AND (fk_skill:=:".((int) $skillId).')'); | ||
'@phan-var-force SkillRank[] $tSkills'; | ||
if (is_array($TSkills) && !empty($TSkills)) { | ||
foreach ($TSkills as $tmpObj) { | ||
$tmpObj->rankorder = $rank; | ||
|
@@ -196,6 +200,7 @@ | |
$help_url = ''; | ||
llxHeader('', $title, $help_url); | ||
|
||
$listLink = ''; | ||
// Part to show record | ||
if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'create'))) { | ||
$res = $object->fetch_optionals(); | ||
|
@@ -251,7 +256,7 @@ | |
$morehtmlref .= '</div>'; | ||
|
||
dol_banner_tab($object, 'id', $linkback, 1, 'rowid', 'rowid', $morehtmlref); | ||
} else { | ||
} elseif ($listLink !== null) { | ||
$linkback = '<a href="' . $listLink . '?restore_lastsearch_values=1' . (!empty($socid) ? '&socid=' . $socid : '') . '">' . $langs->trans("BackToList") . '</a>'; | ||
|
||
$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">'; | ||
|
@@ -479,7 +484,7 @@ | |
$sqlEval = "SELECT rowid FROM ".MAIN_DB_PREFIX."hrm_evaluation as e"; | ||
$sqlEval .= " WHERE e.fk_user = ".((int) $id); | ||
$rslt = $db->query($sqlEval); | ||
$numEval = $db->num_rows($sqlEval); | ||
$numEval = $db->num_rows($rslt); | ||
|
||
$page = 0; | ||
print_barre_liste($langs->trans("Evaluations"), $page, $_SERVER["PHP_SELF"], '', '', '', '', $numEval, $numEval, $evaltmp->picto, 0); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.