@@ -139,7 +139,7 @@ discard block |
||
| 139 | 139 | /** |
| 140 | 140 | * @var int|string |
| 141 | 141 | */ |
| 142 | - public $date_validite; // Note: misspelled! |
|
| 142 | + public $date_validite; // Note: misspelled! |
|
| 143 | 143 | /** |
| 144 | 144 | * @var float |
| 145 | 145 | */ |
@@ -270,7 +270,7 @@ discard block |
||
| 270 | 270 | |
| 271 | 271 | $error = 0; |
| 272 | 272 | |
| 273 | - require_once __DIR__ . '/skilldet.class.php'; |
|
| 273 | + require_once __DIR__.'/skilldet.class.php'; |
|
| 274 | 274 | |
| 275 | 275 | $this->db->begin(); |
| 276 | 276 | |
@@ -290,11 +290,11 @@ discard block |
||
| 290 | 290 | // Create level of skills |
| 291 | 291 | while ($i <= $maxNumberSkill) { |
| 292 | 292 | $skilldet = new Skilldet($this->db); |
| 293 | - $skilldet->description = $defaultSkillDesc . " " . $i; |
|
| 293 | + $skilldet->description = $defaultSkillDesc." ".$i; |
|
| 294 | 294 | $skilldet->rankorder = $i; |
| 295 | 295 | $skilldet->fk_skill = $this->id; |
| 296 | 296 | |
| 297 | - $result = $skilldet->create($user); |
|
| 297 | + $result = $skilldet->create($user); |
|
| 298 | 298 | |
| 299 | 299 | if ($result <= 0) { |
| 300 | 300 | $error++; |
@@ -437,7 +437,7 @@ discard block |
||
| 437 | 437 | public function fetchLines() |
| 438 | 438 | { |
| 439 | 439 | $this->lines = array(); |
| 440 | - require_once __DIR__ . '/skilldet.class.php'; |
|
| 440 | + require_once __DIR__.'/skilldet.class.php'; |
|
| 441 | 441 | $skilldet = new Skilldet($this->db); |
| 442 | 442 | $this->lines = $skilldet->fetchAll('ASC', '', 0, 0, '(fk_skill:=:'.$this->id.')'); |
| 443 | 443 | |
@@ -1026,7 +1026,7 @@ discard block |
||
| 1026 | 1026 | if (getDolGlobalString('hrm_SKILL_ADDON')) { |
| 1027 | 1027 | $mybool = false; |
| 1028 | 1028 | |
| 1029 | - $file = getDolGlobalString('hrm_SKILL_ADDON') . ".php"; |
|
| 1029 | + $file = getDolGlobalString('hrm_SKILL_ADDON').".php"; |
|
| 1030 | 1030 | $classname = getDolGlobalString('hrm_SKILL_ADDON'); |
| 1031 | 1031 | |
| 1032 | 1032 | // Include file with class |
@@ -51,7 +51,7 @@ discard block |
||
| 51 | 51 | */ |
| 52 | 52 | |
| 53 | 53 | // Load translation files required by the page |
| 54 | -$langs->loadLangs(array('hrm', 'other', 'products')); // why products? |
|
| 54 | +$langs->loadLangs(array('hrm', 'other', 'products')); // why products? |
|
| 55 | 55 | |
| 56 | 56 | // Get parameters |
| 57 | 57 | $id = GETPOSTINT('id'); |
@@ -289,7 +289,7 @@ discard block |
||
| 289 | 289 | |
| 290 | 290 | // Part to create |
| 291 | 291 | if ($action == 'create') { |
| 292 | - print load_fiche_titre($langs->trans("NewEval"), '', 'object_' . $object->picto); |
|
| 292 | + print load_fiche_titre($langs->trans("NewEval"), '', 'object_'.$object->picto); |
|
| 293 | 293 | |
| 294 | 294 | print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">'; |
| 295 | 295 | print '<input type="hidden" name="token" value="'.newToken().'">'; |
@@ -545,14 +545,14 @@ discard block |
||
| 545 | 545 | $sql .= ' skdet_user.description as "userRankForSkillDesc",'; |
| 546 | 546 | $sql .= ' skdet_required.description as "required_rank_desc"'; |
| 547 | 547 | |
| 548 | - $sql .= ' FROM ' . MAIN_DB_PREFIX . 'hrm_evaluation as e'; |
|
| 549 | - $sql .= ' LEFT JOIN ' . MAIN_DB_PREFIX . 'hrm_evaluationdet as ed ON e.rowid = ed.fk_evaluation'; |
|
| 550 | - $sql .= ' LEFT JOIN ' . MAIN_DB_PREFIX . 'hrm_job as j ON e.fk_job = j.rowid'; |
|
| 551 | - $sql .= ' LEFT JOIN ' . MAIN_DB_PREFIX . 'hrm_skill as sk ON ed.fk_skill = sk.rowid'; |
|
| 552 | - $sql .= ' INNER JOIN ' . MAIN_DB_PREFIX . 'hrm_skilldet as skdet_user ON (skdet_user.fk_skill = sk.rowid AND skdet_user.rankorder = ed.rankorder)'; |
|
| 548 | + $sql .= ' FROM '.MAIN_DB_PREFIX.'hrm_evaluation as e'; |
|
| 549 | + $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'hrm_evaluationdet as ed ON e.rowid = ed.fk_evaluation'; |
|
| 550 | + $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'hrm_job as j ON e.fk_job = j.rowid'; |
|
| 551 | + $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'hrm_skill as sk ON ed.fk_skill = sk.rowid'; |
|
| 552 | + $sql .= ' INNER JOIN '.MAIN_DB_PREFIX.'hrm_skilldet as skdet_user ON (skdet_user.fk_skill = sk.rowid AND skdet_user.rankorder = ed.rankorder)'; |
|
| 553 | 553 | //$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')"; |
| 554 | - $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)'; |
|
| 555 | - $sql .= " WHERE e.rowid =" . ((int) $object->id); |
|
| 554 | + $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)'; |
|
| 555 | + $sql .= " WHERE e.rowid =".((int) $object->id); |
|
| 556 | 556 | |
| 557 | 557 | // echo $sql; |
| 558 | 558 | |
@@ -568,7 +568,7 @@ discard block |
||
| 568 | 568 | $Tab[$num]->skill_id = $obj->fk_skill; |
| 569 | 569 | $Tab[$num]->skilllabel = $obj->skilllabel; |
| 570 | 570 | $Tab[$num]->description = $obj->description; |
| 571 | - $Tab[$num]->userRankForSkill = '<span title="'.$obj->userRankForSkillDesc.'" class="radio_js_bloc_number TNote_1">' . $obj->userRankForSkill . '</span>'; |
|
| 571 | + $Tab[$num]->userRankForSkill = '<span title="'.$obj->userRankForSkillDesc.'" class="radio_js_bloc_number TNote_1">'.$obj->userRankForSkill.'</span>'; |
|
| 572 | 572 | |
| 573 | 573 | $required_rank = $obj->required_rank; |
| 574 | 574 | $required_rank_desc = $obj->required_rank_desc; |
@@ -579,7 +579,7 @@ discard block |
||
| 579 | 579 | $required_rank_desc = $langs->trans('SkillNotRequired'); |
| 580 | 580 | } |
| 581 | 581 | |
| 582 | - $Tab[$num]->required_rank = '<span title="'.$required_rank_desc.'" class="radio_js_bloc_number TNote_1">' . $required_rank . '</span>'; |
|
| 582 | + $Tab[$num]->required_rank = '<span title="'.$required_rank_desc.'" class="radio_js_bloc_number TNote_1">'.$required_rank.'</span>'; |
|
| 583 | 583 | |
| 584 | 584 | if ($obj->userRankForSkill < 0 || $obj->required_rank < 0) { |
| 585 | 585 | $title = $langs->trans('NA'); |
@@ -595,7 +595,7 @@ discard block |
||
| 595 | 595 | $class .= 'sad'; |
| 596 | 596 | } |
| 597 | 597 | |
| 598 | - $Tab[$num]->result = '<span title="'.$title.'" class="classfortooltip ' . $class . ' note"> </span>'; |
|
| 598 | + $Tab[$num]->result = '<span title="'.$title.'" class="classfortooltip '.$class.' note"> </span>'; |
|
| 599 | 599 | |
| 600 | 600 | $num++; |
| 601 | 601 | } |
@@ -606,12 +606,12 @@ discard block |
||
| 606 | 606 | print '<table id="tablelines" class="noborder noshadow centpercent">'; |
| 607 | 607 | |
| 608 | 608 | print '<tr class="liste_titre">'; |
| 609 | - print '<th style="width:auto;text-align:auto" class="liste_titre">' . $langs->trans("TypeSkill") . ' </th>'; |
|
| 610 | - print '<th style="width:auto;text-align:auto" class="liste_titre">' . $langs->trans("Label") . '</th>'; |
|
| 611 | - print '<th style="width:auto;text-align:auto" class="liste_titre">' . $langs->trans("Description") . '</th>'; |
|
| 612 | - print '<th style="width:auto;text-align:center" class="liste_titre">' . $langs->trans("EmployeeRank") . '</th>'; |
|
| 613 | - print '<th style="width:auto;text-align:center" class="liste_titre">' . $langs->trans("RequiredRank") . '</th>'; |
|
| 614 | - print '<th style="width:auto;text-align:auto" class="liste_titre">' . $langs->trans("Result") . ' ' .$form->textwithpicto('', GetLegendSkills(), 1) .'</th>'; |
|
| 609 | + print '<th style="width:auto;text-align:auto" class="liste_titre">'.$langs->trans("TypeSkill").' </th>'; |
|
| 610 | + print '<th style="width:auto;text-align:auto" class="liste_titre">'.$langs->trans("Label").'</th>'; |
|
| 611 | + print '<th style="width:auto;text-align:auto" class="liste_titre">'.$langs->trans("Description").'</th>'; |
|
| 612 | + print '<th style="width:auto;text-align:center" class="liste_titre">'.$langs->trans("EmployeeRank").'</th>'; |
|
| 613 | + print '<th style="width:auto;text-align:center" class="liste_titre">'.$langs->trans("RequiredRank").'</th>'; |
|
| 614 | + print '<th style="width:auto;text-align:auto" class="liste_titre">'.$langs->trans("Result").' '.$form->textwithpicto('', GetLegendSkills(), 1).'</th>'; |
|
| 615 | 615 | print '</tr>'; |
| 616 | 616 | |
| 617 | 617 | $sk = new Skill($db); |
@@ -619,12 +619,12 @@ discard block |
||
| 619 | 619 | $sk->fetch($t->skill_id); |
| 620 | 620 | |
| 621 | 621 | print '<tr>'; |
| 622 | - print ' <td>' . dolPrintHTML(Skill::typeCodeToLabel($t->skill_type)) . '</td>'; |
|
| 623 | - print ' <td class="tdoverflowmax200">' . $sk->getNomUrl(1) . '</td>'; |
|
| 624 | - print ' <td class="tdoverflowmax200" title="'.dolPrintHTMLForAttribute($t->description).'">' . dolPrintHTML($t->description) . '</td>'; |
|
| 625 | - print ' <td class="center">' . $t->userRankForSkill . '</td>'; |
|
| 626 | - print ' <td class="center">' . $t->required_rank . '</td>'; |
|
| 627 | - print ' <td>' . $t->result . '</td>'; |
|
| 622 | + print ' <td>'.dolPrintHTML(Skill::typeCodeToLabel($t->skill_type)).'</td>'; |
|
| 623 | + print ' <td class="tdoverflowmax200">'.$sk->getNomUrl(1).'</td>'; |
|
| 624 | + print ' <td class="tdoverflowmax200" title="'.dolPrintHTMLForAttribute($t->description).'">'.dolPrintHTML($t->description).'</td>'; |
|
| 625 | + print ' <td class="center">'.$t->userRankForSkill.'</td>'; |
|
| 626 | + print ' <td class="center">'.$t->required_rank.'</td>'; |
|
| 627 | + print ' <td>'.$t->result.'</td>'; |
|
| 628 | 628 | print '</tr>'; |
| 629 | 629 | } |
| 630 | 630 | |
@@ -91,7 +91,7 @@ discard block |
||
| 91 | 91 | |
| 92 | 92 | // Default sort order (if not yet defined by previous GETPOST) |
| 93 | 93 | if (!$sortfield) { |
| 94 | - $sortfield = "t.ref"; // Set here default search field. By default 1st field in definition. |
|
| 94 | + $sortfield = "t.ref"; // Set here default search field. By default 1st field in definition. |
|
| 95 | 95 | } |
| 96 | 96 | if (!$sortorder) { |
| 97 | 97 | $sortorder = "DESC"; |
@@ -498,7 +498,7 @@ discard block |
||
| 498 | 498 | } |
| 499 | 499 | |
| 500 | 500 | $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage; |
| 501 | -$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields with user setup |
|
| 501 | +$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields with user setup |
|
| 502 | 502 | $selectedfields = ($mode != 'kanban' ? $htmlofselectarray : ''); |
| 503 | 503 | $selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : ''); |
| 504 | 504 | |
@@ -588,7 +588,7 @@ discard block |
||
| 588 | 588 | } elseif (in_array($val['type'], array('double(24,8)', 'double(6,3)', 'integer', 'real', 'price')) && !in_array($key, array('id', 'rowid', 'ref', 'status')) && $val['label'] != 'TechnicalID' && empty($val['arrayofkeyval'])) { |
| 589 | 589 | $cssforfield .= ($cssforfield ? ' ' : '').'right'; |
| 590 | 590 | } |
| 591 | - $cssforfield = preg_replace('/small\s*/', '', $cssforfield); // the 'small' css must not be used for the title label |
|
| 591 | + $cssforfield = preg_replace('/small\s*/', '', $cssforfield); // the 'small' css must not be used for the title label |
|
| 592 | 592 | if (!empty($arrayfields['t.'.$key]['checked'])) { |
| 593 | 593 | print getTitleFieldOfList($arrayfields['t.'.$key]['label'], 0, $_SERVER['PHP_SELF'], 't.'.$key, '', $param, ($cssforfield ? 'class="'.$cssforfield.'"' : ''), $sortfield, $sortorder, ($cssforfield ? $cssforfield.' ' : ''), 0, (empty($val['helplist']) ? '' : $val['helplist']))."\n"; |
| 594 | 594 | $totalarray['nbfield']++; |
@@ -36,13 +36,13 @@ discard block |
||
| 36 | 36 | |
| 37 | 37 | // Load Dolibarr environment |
| 38 | 38 | require_once '../main.inc.php'; |
| 39 | -require_once DOL_DOCUMENT_ROOT . '/core/lib/functions.lib.php'; |
|
| 40 | -require_once DOL_DOCUMENT_ROOT . '/core/lib/functions2.lib.php'; |
|
| 41 | -require_once DOL_DOCUMENT_ROOT . '/hrm/class/skill.class.php'; |
|
| 42 | -require_once DOL_DOCUMENT_ROOT . '/hrm/class/job.class.php'; |
|
| 43 | -require_once DOL_DOCUMENT_ROOT . '/hrm/class/evaluation.class.php'; |
|
| 44 | -require_once DOL_DOCUMENT_ROOT . '/hrm/class/position.class.php'; |
|
| 45 | -require_once DOL_DOCUMENT_ROOT . '/hrm/lib/hrm.lib.php'; |
|
| 39 | +require_once DOL_DOCUMENT_ROOT.'/core/lib/functions.lib.php'; |
|
| 40 | +require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; |
|
| 41 | +require_once DOL_DOCUMENT_ROOT.'/hrm/class/skill.class.php'; |
|
| 42 | +require_once DOL_DOCUMENT_ROOT.'/hrm/class/job.class.php'; |
|
| 43 | +require_once DOL_DOCUMENT_ROOT.'/hrm/class/evaluation.class.php'; |
|
| 44 | +require_once DOL_DOCUMENT_ROOT.'/hrm/class/position.class.php'; |
|
| 45 | +require_once DOL_DOCUMENT_ROOT.'/hrm/lib/hrm.lib.php'; |
|
| 46 | 46 | |
| 47 | 47 | |
| 48 | 48 | /** |
@@ -164,7 +164,7 @@ discard block |
||
| 164 | 164 | </tr> |
| 165 | 165 | <tr> |
| 166 | 166 | <td><?php |
| 167 | - echo $langs->trans('OrJobToCompare') . '</td><td>'; |
|
| 167 | + echo $langs->trans('OrJobToCompare').'</td><td>'; |
|
| 168 | 168 | $j = new Job($db); |
| 169 | 169 | $jobs = $j->fetchAll(); |
| 170 | 170 | $TJobs = array(); |
@@ -221,7 +221,7 @@ discard block |
||
| 221 | 221 | <?php if ($fk_usergroup1 > 0 || $fk_usergroup2 > 0 || $fk_job > 0) { |
| 222 | 222 | $TUser1 = $TUser2 = array(); |
| 223 | 223 | |
| 224 | - $userlist1 = displayUsersListWithPicto($TUser1, $fk_usergroup1, 'list1'); // This fill also the $TUser1 |
|
| 224 | + $userlist1 = displayUsersListWithPicto($TUser1, $fk_usergroup1, 'list1'); // This fill also the $TUser1 |
|
| 225 | 225 | |
| 226 | 226 | $TSkill1 = getSkillForUsers($TUser1); |
| 227 | 227 | |
@@ -232,8 +232,8 @@ discard block |
||
| 232 | 232 | $job->fetch($fk_job); |
| 233 | 233 | $userlist2 = '<ul> |
| 234 | 234 | <li> |
| 235 | - <h3>' . $job->label . '</h3> |
|
| 236 | - <p>' . $job->description . '</p> |
|
| 235 | + <h3>' . $job->label.'</h3> |
|
| 236 | + <p>' . $job->description.'</p> |
|
| 237 | 237 | </li> |
| 238 | 238 | </ul>'; |
| 239 | 239 | } else { |
@@ -260,13 +260,13 @@ discard block |
||
| 260 | 260 | echo $userlist1; |
| 261 | 261 | echo '</td>'; |
| 262 | 262 | |
| 263 | - echo '<td id="" style="width:20%; padding-left: 10px;" valign="top">' . skillList($TMergedSkills) . '</td>'; |
|
| 263 | + echo '<td id="" style="width:20%; padding-left: 10px;" valign="top">'.skillList($TMergedSkills).'</td>'; |
|
| 264 | 264 | |
| 265 | - echo '<td id="" style="width:10%" valign="top">' . rate($TMergedSkills, 'rate1') . '</td>'; |
|
| 265 | + echo '<td id="" style="width:10%" valign="top">'.rate($TMergedSkills, 'rate1').'</td>'; |
|
| 266 | 266 | |
| 267 | - echo '<td id="" style="width:10%" valign="top">' . diff($TMergedSkills) . '</td>'; |
|
| 267 | + echo '<td id="" style="width:10%" valign="top">'.diff($TMergedSkills).'</td>'; |
|
| 268 | 268 | |
| 269 | - echo '<td id="" style="width:10%; padding-right: 10px;" valign="top">' . rate($TMergedSkills, 'rate2') . '</td>'; |
|
| 269 | + echo '<td id="" style="width:10%; padding-right: 10px;" valign="top">'.rate($TMergedSkills, 'rate2').'</td>'; |
|
| 270 | 270 | |
| 271 | 271 | echo '<td id="list-user-right" style="width:25%; padding-left: 10px; border-left: 1px solid #ccc;" class="valigntop">'; |
| 272 | 272 | echo $userlist2; |
@@ -320,8 +320,8 @@ discard block |
||
| 320 | 320 | $class .= ' sad'; |
| 321 | 321 | } |
| 322 | 322 | |
| 323 | - $out .= '<li fk_skill="' . $id . '" class="' . $class . '" style="text-align:center;"> |
|
| 324 | - <span class="' . $class . '"> </span> |
|
| 323 | + $out .= '<li fk_skill="'.$id.'" class="'.$class.'" style="text-align:center;"> |
|
| 324 | + <span class="' . $class.'"> </span> |
|
| 325 | 325 | </li>'; |
| 326 | 326 | } |
| 327 | 327 | |
@@ -360,8 +360,8 @@ discard block |
||
| 360 | 360 | $trad = $langs->trans('HighestRank'); |
| 361 | 361 | } |
| 362 | 362 | |
| 363 | - $out .= '<li fk_skill="' . $id . '" class="center"> |
|
| 364 | - <p class="nowraponall"><span class="' . $class . ' classfortooltip" title="' . $trad . '">' . $note . '</span>' . ($how_many > 0 ? '<span class="bubble classfortooltip" title="' . $langs->trans('HowManyUserWithThisMaxNote') . '">' . $how_many . '</span>' : '') . '</p> |
|
| 363 | + $out .= '<li fk_skill="'.$id.'" class="center"> |
|
| 364 | + <p class="nowraponall"><span class="' . $class.' classfortooltip" title="'.$trad.'">'.$note.'</span>'.($how_many > 0 ? '<span class="bubble classfortooltip" title="'.$langs->trans('HowManyUserWithThisMaxNote').'">'.$how_many.'</span>' : '').'</p> |
|
| 365 | 365 | </li>'; |
| 366 | 366 | } |
| 367 | 367 | |
@@ -381,9 +381,9 @@ discard block |
||
| 381 | 381 | $out = '<ul class="competence">'; |
| 382 | 382 | |
| 383 | 383 | foreach ($TMergedSkills as $id => &$sk) { |
| 384 | - $out .= '<li fk_skill="' . $id . '"> |
|
| 385 | - <h3>' . $sk->label . '</h3> |
|
| 386 | - <p>' . $sk->description . '</p> |
|
| 384 | + $out .= '<li fk_skill="'.$id.'"> |
|
| 385 | + <h3>' . $sk->label.'</h3> |
|
| 386 | + <p>' . $sk->description.'</p> |
|
| 387 | 387 | </li>'; |
| 388 | 388 | } |
| 389 | 389 | |
@@ -443,17 +443,17 @@ discard block |
||
| 443 | 443 | |
| 444 | 444 | $out = ''; |
| 445 | 445 | if ($fk_usergroup > 0) { |
| 446 | - $list = $namelist . '_excluded_id'; |
|
| 446 | + $list = $namelist.'_excluded_id'; |
|
| 447 | 447 | |
| 448 | 448 | $excludedIdsList = GETPOST($list); |
| 449 | 449 | |
| 450 | - $sql = "SELECT u.rowid FROM " . MAIN_DB_PREFIX . "user u |
|
| 451 | - LEFT JOIN " . MAIN_DB_PREFIX . "usergroup_user as ugu ON (u.rowid = ugu.fk_user) |
|
| 450 | + $sql = "SELECT u.rowid FROM ".MAIN_DB_PREFIX."user u |
|
| 451 | + LEFT JOIN " . MAIN_DB_PREFIX."usergroup_user as ugu ON (u.rowid = ugu.fk_user) |
|
| 452 | 452 | WHERE u.statut > 0 AND ugu.entity = ".((int) $conf->entity); |
| 453 | - $sql .= " AND ugu.fk_usergroup=" . ((int) $fk_usergroup); |
|
| 453 | + $sql .= " AND ugu.fk_usergroup=".((int) $fk_usergroup); |
|
| 454 | 454 | |
| 455 | 455 | $res = $db->query($sql); |
| 456 | - $out .= '<ul name="' . $namelist . '">'; |
|
| 456 | + $out .= '<ul name="'.$namelist.'">'; |
|
| 457 | 457 | |
| 458 | 458 | $TExcludedId = explode(',', $excludedIdsList); |
| 459 | 459 | |
@@ -489,19 +489,19 @@ discard block |
||
| 489 | 489 | $evaluation = $static_eval->getLastEvaluationForUser($user->id); |
| 490 | 490 | |
| 491 | 491 | if (!empty($evaluation) && !empty($evaluation->date_eval)) { |
| 492 | - $desc .= $langs->trans('DateLastEval') . ' : ' . dol_print_date($evaluation->date_eval); |
|
| 492 | + $desc .= $langs->trans('DateLastEval').' : '.dol_print_date($evaluation->date_eval); |
|
| 493 | 493 | } else { |
| 494 | 494 | $desc .= $langs->trans('NoEval'); |
| 495 | 495 | } |
| 496 | 496 | |
| 497 | 497 | if (!empty($user->array_options['options_DDA'])) { |
| 498 | - $desc .= '<br>' . $langs->trans('Seniority') . ' : ' . dol_print_date(strtotime($user->array_options['options_DDA'])); |
|
| 498 | + $desc .= '<br>'.$langs->trans('Seniority').' : '.dol_print_date(strtotime($user->array_options['options_DDA'])); |
|
| 499 | 499 | } |
| 500 | 500 | |
| 501 | - $out .= '<li fk_user="' . $user->id . '" class="' . $class . '"> |
|
| 502 | - ' . $form->showphoto('userphoto', $user, 0, 0, 0, 'photoref', 'small', 1, 0, '', 1) . ' |
|
| 503 | - <h3>' . $name . '</h3> |
|
| 504 | - <p>' . $desc . '</p> |
|
| 501 | + $out .= '<li fk_user="'.$user->id.'" class="'.$class.'"> |
|
| 502 | + ' . $form->showphoto('userphoto', $user, 0, 0, 0, 'photoref', 'small', 1, 0, '', 1).' |
|
| 503 | + <h3>' . $name.'</h3> |
|
| 504 | + <p>' . $desc.'</p> |
|
| 505 | 505 | </li>'; |
| 506 | 506 | } |
| 507 | 507 | |
@@ -282,7 +282,7 @@ discard block |
||
| 282 | 282 | |
| 283 | 283 | $arrayofcss[] = 'admin/tools/ui/css/documentation.css'; |
| 284 | 284 | |
| 285 | - top_htmlhead('', $title, 0, 0, $arrayofjs, $arrayofcss); |
|
| 285 | + top_htmlhead('', $title, 0, 0, $arrayofjs, $arrayofcss); |
|
| 286 | 286 | |
| 287 | 287 | print '<body class="dolibarr-doc'.(GETPOST('hidenavmenu') ? "-bis" : "").'">'; |
| 288 | 288 | } |
@@ -489,7 +489,7 @@ discard block |
||
| 489 | 489 | */ |
| 490 | 490 | public function showCode($lines = array(), $option = 'html') |
| 491 | 491 | { |
| 492 | - require_once DOL_DOCUMENT_ROOT . '/core/class/doleditor.class.php'; |
|
| 492 | + require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; |
|
| 493 | 493 | print '<div class="documentation-code">'; |
| 494 | 494 | |
| 495 | 495 | if (isset($lines[0])) { |
@@ -498,7 +498,7 @@ discard block |
||
| 498 | 498 | } |
| 499 | 499 | } |
| 500 | 500 | |
| 501 | - $content = implode("\n", $lines) . "\n"; |
|
| 501 | + $content = implode("\n", $lines)."\n"; |
|
| 502 | 502 | $doleditor = new DolEditor(md5($content), $content, '', 0, 'Basic', 'In', true, false, 'ace', 0, '99%', 1); |
| 503 | 503 | print $doleditor->Create(1, '', false, '', $option); |
| 504 | 504 | print '</div>'; |
@@ -95,7 +95,7 @@ discard block |
||
| 95 | 95 | $dateendvalidity = dol_mktime(0, 0, 0, GETPOSTINT('dateendvaliditymonth'), GETPOSTINT('dateendvalidityday'), GETPOSTINT('dateendvalidityyear')); |
| 96 | 96 | $dateofbirth = dol_mktime(0, 0, 0, GETPOSTINT('dateofbirthmonth'), GETPOSTINT('dateofbirthday'), GETPOSTINT('dateofbirthyear')); |
| 97 | 97 | |
| 98 | -$childids = $user->getAllChildIds(1); // For test on hrm fields (like salary visibility) |
|
| 98 | +$childids = $user->getAllChildIds(1); // For test on hrm fields (like salary visibility) |
|
| 99 | 99 | |
| 100 | 100 | $object = new User($db); |
| 101 | 101 | $extrafields = new ExtraFields($db); |
@@ -159,8 +159,8 @@ discard block |
||
| 159 | 159 | if ($id > 0) { |
| 160 | 160 | // $user is the current logged user, $id is the user we want to edit |
| 161 | 161 | $permissiontoedit = ((($user->id == $id) && $user->hasRight("user", "self", "write")) || (($user->id != $id) && $user->hasRight("user", "user", "write"))) && (empty($user->socid) || $user->socid == $object->socid); |
| 162 | - $permissiontoeditpasswordandsee = ((($user->id == $id) && $user->hasRight("user", "self", "password")) || (($user->id != $id) && $user->hasRight("user", "user", "password") && $user->admin))&& (empty($user->socid) || $user->socid == $object->socid); |
|
| 163 | - $permissiontoeditpasswordandsend = ((($user->id == $id) && $user->hasRight("user", "self", "password")) || (($user->id != $id) && $user->hasRight("user", "user", "password")))&& (empty($user->socid) || $user->socid == $object->socid); |
|
| 162 | + $permissiontoeditpasswordandsee = ((($user->id == $id) && $user->hasRight("user", "self", "password")) || (($user->id != $id) && $user->hasRight("user", "user", "password") && $user->admin)) && (empty($user->socid) || $user->socid == $object->socid); |
|
| 163 | + $permissiontoeditpasswordandsend = ((($user->id == $id) && $user->hasRight("user", "self", "password")) || (($user->id != $id) && $user->hasRight("user", "user", "password"))) && (empty($user->socid) || $user->socid == $object->socid); |
|
| 164 | 164 | } |
| 165 | 165 | |
| 166 | 166 | $passwordismodified = false; |
@@ -448,7 +448,7 @@ discard block |
||
| 448 | 448 | if (!$error) { |
| 449 | 449 | $object->fetch($id); |
| 450 | 450 | |
| 451 | - $object->oldcopy = clone $object; // @phan-suppress-current-line PhanTypeMismatchProperty |
|
| 451 | + $object->oldcopy = clone $object; // @phan-suppress-current-line PhanTypeMismatchProperty |
|
| 452 | 452 | |
| 453 | 453 | $db->begin(); |
| 454 | 454 | |
@@ -573,7 +573,7 @@ discard block |
||
| 573 | 573 | } |
| 574 | 574 | } |
| 575 | 575 | |
| 576 | - $ret = $object->update($user); // This may include call to setPassword if password has changed |
|
| 576 | + $ret = $object->update($user); // This may include call to setPassword if password has changed |
|
| 577 | 577 | if ($ret < 0) { |
| 578 | 578 | $error++; |
| 579 | 579 | if ($db->errno() == 'DB_ERROR_RECORD_ALREADY_EXISTS') { |
@@ -687,7 +687,7 @@ discard block |
||
| 687 | 687 | $object->fetch($id); |
| 688 | 688 | |
| 689 | 689 | if (GETPOST("password", "password")) { // If pass is empty, we do not change it. |
| 690 | - $object->oldcopy = clone $object; // @phan-suppress-current-line PhanTypeMismatchProperty |
|
| 690 | + $object->oldcopy = clone $object; // @phan-suppress-current-line PhanTypeMismatchProperty |
|
| 691 | 691 | |
| 692 | 692 | $ret = $object->setPassword($user, GETPOST("password", "password")); |
| 693 | 693 | if (is_int($ret) && $ret < 0) { |
@@ -704,7 +704,7 @@ discard block |
||
| 704 | 704 | ) { |
| 705 | 705 | $object->fetch($id); |
| 706 | 706 | |
| 707 | - $newpassword = $object->setPassword($user, ''); // This will generate a new password |
|
| 707 | + $newpassword = $object->setPassword($user, ''); // This will generate a new password |
|
| 708 | 708 | if (is_int($newpassword) && $newpassword < 0) { |
| 709 | 709 | // Echec |
| 710 | 710 | setEventMessages($langs->trans("ErrorFailedToSetNewPassword"), null, 'errors'); |
@@ -832,7 +832,7 @@ discard block |
||
| 832 | 832 | $action = ""; |
| 833 | 833 | |
| 834 | 834 | $mesg = $langs->trans("ErrorProductAlreadyExists", $clone->ref); |
| 835 | - $mesg .= ' <a href="' . $_SERVER["PHP_SELF"] . '?ref=' . $clone->ref . '">' . $langs->trans("ShowCardHere") . '</a>.'; |
|
| 835 | + $mesg .= ' <a href="'.$_SERVER["PHP_SELF"].'?ref='.$clone->ref.'">'.$langs->trans("ShowCardHere").'</a>.'; |
|
| 836 | 836 | setEventMessages($mesg, null, 'errors'); |
| 837 | 837 | } else { |
| 838 | 838 | setEventMessages(empty($clone->error) ? '' : $langs->trans($clone->error), $clone->errors, 'errors'); |
@@ -846,7 +846,7 @@ discard block |
||
| 846 | 846 | } else { |
| 847 | 847 | $db->commit(); |
| 848 | 848 | $db->close(); |
| 849 | - header("Location: " . $_SERVER["PHP_SELF"] . "?id=" . $id); |
|
| 849 | + header("Location: ".$_SERVER["PHP_SELF"]."?id=".$id); |
|
| 850 | 850 | exit; |
| 851 | 851 | } |
| 852 | 852 | } else { |
@@ -1550,7 +1550,7 @@ discard block |
||
| 1550 | 1550 | $ldap = new Ldap(); |
| 1551 | 1551 | $result = $ldap->connectBind(); |
| 1552 | 1552 | if ($result > 0) { |
| 1553 | - $userSearchFilter = '(' . getDolGlobalString('LDAP_FILTER_CONNECTION').'('.$ldap->getUserIdentifier().'='.$object->login.'))'; |
|
| 1553 | + $userSearchFilter = '('.getDolGlobalString('LDAP_FILTER_CONNECTION').'('.$ldap->getUserIdentifier().'='.$object->login.'))'; |
|
| 1554 | 1554 | $entries = $ldap->fetch($object->login, $userSearchFilter); |
| 1555 | 1555 | if (!$entries) { |
| 1556 | 1556 | setEventMessages($ldap->error, $ldap->errors, 'errors'); |
@@ -2058,7 +2058,7 @@ discard block |
||
| 2058 | 2058 | print '<td>'; |
| 2059 | 2059 | if (!empty($object->api_key)) { |
| 2060 | 2060 | print '<span class="opacitymedium">'; |
| 2061 | - print showValueWithClipboardCPButton($object->api_key, 1, $langs->transnoentities("Hidden")); // TODO Add an option to also reveal the hash, not only copy paste |
|
| 2061 | + print showValueWithClipboardCPButton($object->api_key, 1, $langs->transnoentities("Hidden")); // TODO Add an option to also reveal the hash, not only copy paste |
|
| 2062 | 2062 | print '</span>'; |
| 2063 | 2063 | } |
| 2064 | 2064 | |
@@ -2124,7 +2124,7 @@ discard block |
||
| 2124 | 2124 | $langs->load("mails"); |
| 2125 | 2125 | $params['attr']['title'] = $langs->trans('NoEMail'); |
| 2126 | 2126 | } |
| 2127 | - print dolGetButtonAction('', $langs->trans('SendMail'), 'default', $_SERVER['PHP_SELF'] . '?id=' . $object->id . '&action=presend&mode=init#formmailbeforetitle', '', $canSendMail, $params); |
|
| 2127 | + print dolGetButtonAction('', $langs->trans('SendMail'), 'default', $_SERVER['PHP_SELF'].'?id='.$object->id.'&action=presend&mode=init#formmailbeforetitle', '', $canSendMail, $params); |
|
| 2128 | 2128 | } |
| 2129 | 2129 | |
| 2130 | 2130 | if ($permissiontoedit && (!isModEnabled('multicompany') || !$user->entity || ($object->entity == $conf->entity) || (getDolGlobalString('MULTICOMPANY_TRANSVERSE_MODE') && $object->entity == 1))) { |
@@ -2189,13 +2189,13 @@ discard block |
||
| 2189 | 2189 | if ($user->id != $id && $permissiontodisable && $object->statut == 0 && |
| 2190 | 2190 | ((!isModEnabled('multicompany') && $object->entity == $user->entity) || !$user->entity || ($object->entity == $conf->entity) || (getDolGlobalString('MULTICOMPANY_TRANSVERSE_MODE') && $object->entity == 1))) { |
| 2191 | 2191 | unset($params['attr']['title']); |
| 2192 | - print dolGetButtonAction($langs->trans('Reactivate'), '', 'default', $_SERVER['PHP_SELF'] . '?id=' . $object->id . '&action=enable&token='.newToken(), '', true, $params); |
|
| 2192 | + print dolGetButtonAction($langs->trans('Reactivate'), '', 'default', $_SERVER['PHP_SELF'].'?id='.$object->id.'&action=enable&token='.newToken(), '', true, $params); |
|
| 2193 | 2193 | } |
| 2194 | 2194 | // Disable user |
| 2195 | 2195 | if ($user->id != $id && $permissiontodisable && $object->statut == 1 && |
| 2196 | 2196 | ((!isModEnabled('multicompany') && $object->entity == $user->entity) || !$user->entity || ($object->entity == $conf->entity) || (getDolGlobalString('MULTICOMPANY_TRANSVERSE_MODE') && $object->entity == 1))) { |
| 2197 | 2197 | unset($params['attr']['title']); |
| 2198 | - print dolGetButtonAction($langs->trans('DisableUser'), '', 'default', $_SERVER['PHP_SELF'] . '?id=' . $object->id . '&action=disable&token='.newToken(), '', true, $params); |
|
| 2198 | + print dolGetButtonAction($langs->trans('DisableUser'), '', 'default', $_SERVER['PHP_SELF'].'?id='.$object->id.'&action=disable&token='.newToken(), '', true, $params); |
|
| 2199 | 2199 | } else { |
| 2200 | 2200 | if ($user->id == $id) { |
| 2201 | 2201 | $params['attr']['title'] = $langs->trans('CantDisableYourself'); |
@@ -155,7 +155,7 @@ discard block |
||
| 155 | 155 | } |
| 156 | 156 | |
| 157 | 157 | if ($mysoc === null) { |
| 158 | - dol_syslog(get_class($this).'::__construct() Global $mysoc should not be null.'. getCallerInfoString(), LOG_ERR); |
|
| 158 | + dol_syslog(get_class($this).'::__construct() Global $mysoc should not be null.'.getCallerInfoString(), LOG_ERR); |
|
| 159 | 159 | return; |
| 160 | 160 | } |
| 161 | 161 | |
@@ -245,7 +245,7 @@ discard block |
||
| 245 | 245 | $pdf->SetFont(pdf_getPDFFont($outputlangs)); |
| 246 | 246 | // Set path to the background PDF File |
| 247 | 247 | if (getDolGlobalString('MAIN_ADD_PDF_BACKGROUND')) { |
| 248 | - $pagecount = $pdf->setSourceFile($conf->mycompany->dir_output.'/' . getDolGlobalString('MAIN_ADD_PDF_BACKGROUND')); |
|
| 248 | + $pagecount = $pdf->setSourceFile($conf->mycompany->dir_output.'/'.getDolGlobalString('MAIN_ADD_PDF_BACKGROUND')); |
|
| 249 | 249 | $tplidx = $pdf->importPage(1); |
| 250 | 250 | } |
| 251 | 251 | |
@@ -286,7 +286,7 @@ discard block |
||
| 286 | 286 | $tab_top = 65; |
| 287 | 287 | |
| 288 | 288 | $pdf->SetFont('', 'B', $default_font_size); |
| 289 | - $pdf->MultiCell(190, 4, $outputlangs->transnoentities("Notes") . ":", 0, 'L', false, 0, 12, $tab_top); |
|
| 289 | + $pdf->MultiCell(190, 4, $outputlangs->transnoentities("Notes").":", 0, 'L', false, 0, 12, $tab_top); |
|
| 290 | 290 | $tab_top += 4; |
| 291 | 291 | $pdf->SetFont('', '', $default_font_size - 1); |
| 292 | 292 | $pdf->writeHTMLCell(190, 3, $this->posxnotes + 1, $tab_top + 1, dol_htmlentitiesbr($object->note_public), 0, 1); |
@@ -454,7 +454,7 @@ discard block |
||
| 454 | 454 | // Page footer |
| 455 | 455 | $this->_pagefoot($pdf, $object, $outputlangs); |
| 456 | 456 | if (method_exists($pdf, 'AliasNbPages')) { |
| 457 | - $pdf->AliasNbPages(); // @phan-suppress-current-line PhanUndeclaredMethod |
|
| 457 | + $pdf->AliasNbPages(); // @phan-suppress-current-line PhanUndeclaredMethod |
|
| 458 | 458 | } |
| 459 | 459 | |
| 460 | 460 | $pdf->Close(); |
@@ -551,7 +551,7 @@ discard block |
||
| 551 | 551 | } elseif ($objectligne->rankorder < 0) { |
| 552 | 552 | $result = $outputlangs->transnoentitiesnoconv("NA"); |
| 553 | 553 | } elseif ($objectligne->required_rank != 0 && $objectligne->rankorder != 0) { |
| 554 | - $result = $objectligne->rankorder . "/" . $objectligne->required_rank; |
|
| 554 | + $result = $objectligne->rankorder."/".$objectligne->required_rank; |
|
| 555 | 555 | } |
| 556 | 556 | $pdf->MultiCell($this->posxresult - 210 - 0.8 - 4, 4, $result, 0, 'C', true); |
| 557 | 557 | |
@@ -564,7 +564,7 @@ discard block |
||
| 564 | 564 | $comment = $skill->label; |
| 565 | 565 | |
| 566 | 566 | if (!empty($skill->description)) { |
| 567 | - $comment .= '<br>' . $outputlangs->trans("Description").': '.$skill->description; |
|
| 567 | + $comment .= '<br>'.$outputlangs->trans("Description").': '.$skill->description; |
|
| 568 | 568 | } |
| 569 | 569 | $pdf->writeHTMLCell($this->posxrankemp - $this->posxskill - 0.8, 4, $this->posxskill - 1, $curY, $comment, 0, 1); |
| 570 | 570 | |
@@ -646,7 +646,7 @@ discard block |
||
| 646 | 646 | // employee information |
| 647 | 647 | $employee = new User($this->db); |
| 648 | 648 | $employee->fetch($object->fk_user); |
| 649 | - $carac_emetteur .= ($carac_emetteur ? "\n" : '').$outputlangs->transnoentities('Employee').' : '.$outputlangs->convToOutputCharset(ucfirst($employee->firstname) . ' ' . strtoupper($employee->lastname)); |
|
| 649 | + $carac_emetteur .= ($carac_emetteur ? "\n" : '').$outputlangs->transnoentities('Employee').' : '.$outputlangs->convToOutputCharset(ucfirst($employee->firstname).' '.strtoupper($employee->lastname)); |
|
| 650 | 650 | |
| 651 | 651 | // Position |
| 652 | 652 | include_once DOL_DOCUMENT_ROOT.'/hrm/class/job.class.php'; |