mirror of
https://gitlab.easter-eggs.com/ee/ldapsaisie.git
synced 2024-12-23 00:43:48 +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(
|
||||
'ressource' => $matches['ressource'],
|
||||
'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;
|
||||
|
|
|
@ -84,10 +84,10 @@ class LSformElement_supannRessourceEtatDate extends LSformElement_supannComposit
|
|||
$parseValue = array(
|
||||
'ressource' => $matches['ressource'],
|
||||
'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;
|
||||
|
|
Loading…
Reference in a new issue