diff --git a/htdocs/holiday/card.php b/htdocs/holiday/card.php
index 3cc05be2068..36dd86241f0 100644
--- a/htdocs/holiday/card.php
+++ b/htdocs/holiday/card.php
@@ -1150,7 +1150,7 @@ if ((empty($id) && empty($ref)) || $action == 'create' || $action == 'add') {
$result = $object->fetch($id, $ref);
$approverexpected = new User($db);
- $approverexpected->fetch($object->fk_validator);
+ $approverexpected->fetch($object->fk_validator); // Use that should be the approver
$userRequest = new User($db);
$userRequest->fetch($object->fk_user);
@@ -1364,21 +1364,23 @@ if ((empty($id) && empty($ref)) || $action == 'create' || $action == 'add') {
print '';
print '
';
if ($object->statut == Holiday::STATUS_APPROVED || $object->statut == Holiday::STATUS_CANCELED) {
- $approverdone = new User($db);
- $approverdone->fetch($object->fk_user_valid);
- print $approverdone->getNomUrl(-1);
+ if ($object->fk_user_approve > 0) {
+ $approverdone = new User($db);
+ $approverdone->fetch($object->fk_user_approve);
+ print $approverdone->getNomUrl(-1);
+ }
} else {
print $approverexpected->getNomUrl(-1);
}
$include_users = $object->fetch_users_approver_holiday();
if (is_array($include_users) && in_array($user->id, $include_users) && $object->statut == Holiday::STATUS_VALIDATED) {
- print 'id.'&action=editvalidator&token='.newToken().'">'.img_edit($langs->trans("Edit")).'';
+ print 'id.'&action=editvalidator">'.img_edit($langs->trans("Edit")).'';
}
print ' | ';
print '';
} else {
print '';
- print '| '.$langs->trans('ReviewedByCP').' | ';
+ print ''.$langs->trans('ReviewedByCP').' | '; // Will be approved by
print '';
$include_users = $object->fetch_users_approver_holiday();
if (!in_array($object->fk_validator, $include_users)) { // Add the current validator to the list to not lose it when editing.
diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php
index 870088efe93..16e3f006d3d 100644
--- a/htdocs/main.inc.php
+++ b/htdocs/main.inc.php
@@ -518,7 +518,7 @@ if ((!defined('NOCSRFCHECK') && empty($dolibarr_nocsrfcheck) && getDolGlobalInt(
$sensitiveget = false;
if ((GETPOSTISSET('massaction') || GETPOST('action', 'aZ09')) && getDolGlobalInt('MAIN_SECURITY_CSRF_WITH_TOKEN') >= 3) {
// All GET actions and mass actions are processed as sensitive.
- if (GETPOSTISSET('massaction') || !in_array(GETPOST('action', 'aZ09'), array('create', 'createsite', 'edit', 'file_manager', 'presend', 'presend_addmessage'))) { // We exclude the case action='create' and action='file_manager' that are legitimate
+ if (GETPOSTISSET('massaction') || !in_array(GETPOST('action', 'aZ09'), array('create', 'createsite', 'edit', 'editvalidator', 'file_manager', 'presend', 'presend_addmessage'))) { // We exclude the case action='create' and action='file_manager' that are legitimate
$sensitiveget = true;
}
} elseif (getDolGlobalInt('MAIN_SECURITY_CSRF_WITH_TOKEN') >= 2) {
|