mirror of
https://gitlab.easter-eggs.com/ee/ldapsaisie.git
synced 2024-11-22 18:09:06 +01:00
supannRessourceEtat & supannRessourceEtatDate: fix parsing optional components value
This commit is contained in:
parent
25162f406d
commit
6e98cfef20
2 changed files with 5 additions and 4 deletions
|
@ -72,8 +72,9 @@ class LSformElement_supannRessourceEtat extends LSformElement_supannCompositeAtt
|
||||||
$parseValue = array(
|
$parseValue = array(
|
||||||
'ressource' => $matches['ressource'],
|
'ressource' => $matches['ressource'],
|
||||||
'etat' => $matches['etat'],
|
'etat' => $matches['etat'],
|
||||||
'sous_etat' => (isset($matches['sous_etat'])?$matches['sous_etat']:null),
|
|
||||||
);
|
);
|
||||||
|
if (isset($matches['sous_etat']))
|
||||||
|
$parseValue['sous_etat'] = $matches['sous_etat'];
|
||||||
return $parseValue;
|
return $parseValue;
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -84,10 +84,10 @@ class LSformElement_supannRessourceEtatDate extends LSformElement_supannComposit
|
||||||
$parseValue = array(
|
$parseValue = array(
|
||||||
'ressource' => $matches['ressource'],
|
'ressource' => $matches['ressource'],
|
||||||
'etat' => $matches['etat'],
|
'etat' => $matches['etat'],
|
||||||
'sous_etat' => (isset($matches['sous_etat'])?$matches['sous_etat']:null),
|
|
||||||
'date_debut' => (isset($matches['date_debut'])?$matches['date_debut']:null),
|
|
||||||
'date_fin' => (isset($matches['date_fin'])?$matches['date_fin']:null),
|
|
||||||
);
|
);
|
||||||
|
foreach(array('sous_etat', 'date_debut', 'date_fin') as $c => $cconf)
|
||||||
|
if (isset($matches[$c]))
|
||||||
|
$parseValue[$c] = $matches[$c];
|
||||||
return $parseValue;
|
return $parseValue;
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in a new issue