mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-08 17:02:34 +01:00
Fix phpunit
This commit is contained in:
@@ -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)";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user