Fix phpunit

This commit is contained in:
Laurent Destailleur
2024-12-09 00:03:09 +01:00
parent 774a48fa29
commit e2db3d213b
2 changed files with 12 additions and 11 deletions

View File

@@ -160,7 +160,7 @@ class RecruitmentCandidature extends CommonObject
*/
public function __construct(DoliDB $db)
{
global $conf, $langs;
global $langs;
$this->db = $db;
@@ -197,16 +197,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

@@ -87,6 +87,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
*/