Merge branch '20.0' of git@github.com:Dolibarr/dolibarr.git into develop

This commit is contained in:
Laurent Destailleur 2024-12-09 01:07:33 +01:00
commit 0953ce3ca2
2 changed files with 12 additions and 11 deletions

View file

@ -224,7 +224,7 @@ class RecruitmentCandidature extends CommonObject
*/
public function __construct(DoliDB $db)
{
global $conf, $langs;
global $langs;
$this->db = $db;
@ -261,16 +261,6 @@ class RecruitmentCandidature extends CommonObject
}
}
}
if (GETPOST("action", "aZ09") == 'create') {
$reg = array();
preg_match('/^(integer|link):(.*):(.*):(.*):(.*)/i', $this->fields['fk_recruitmentjobposition']['type'], $reg);
if (!empty($reg)) {
$this->fields['fk_recruitmentjobposition']['type'] .= " AND (t.status:=:1)";
} else {
$this->fields['fk_recruitmentjobposition']['type'] .= ":(t.status:=:1)";
}
}
}
/**

View file

@ -97,6 +97,17 @@ $isdraft = (($object->status == $object::STATUS_DRAFT) ? 1 : 0);
$result = restrictedArea($user, 'recruitment', $object->id, 'recruitment_recruitmentcandidature', 'recruitmentjobposition', '', 'rowid', $isdraft);
if (GETPOST("action", "aZ09") == 'create') {
$reg = array();
preg_match('/^(integer|link):(.*):(.*):(.*):(.*)/i', $object->fields['fk_recruitmentjobposition']['type'], $reg);
if (!empty($reg)) {
$object->fields['fk_recruitmentjobposition']['type'] .= " AND (t.status:=:1)";
} else {
$object->fields['fk_recruitmentjobposition']['type'] .= ":(t.status:=:1)";
}
}
/*
* Actions
*/