LSformElement supannRessourceEtat & supannRessourceEtatDate: do not check etat value on parsing attribute value

This commit is contained in:
Benjamin Renard 2021-06-11 16:43:59 +02:00
parent c87f609610
commit 107d8ba0af
2 changed files with 2 additions and 2 deletions

View file

@ -66,7 +66,7 @@ class LSformElement_supannRessourceEtat extends LSformElement_supannCompositeAtt
* @return array|null La valeur parsée, ou NULL en cas de problème
*/
public function parseCompositeValue($value) {
if (preg_match('/\{(?<ressource>[^\}]+)\}(?<etat>[AIS])(:(?<sous_etat>.*))?/', $value, $matches)) {
if (preg_match('/\{(?<ressource>[^\}]+)\}(?<etat>[^:]+)(:(?<sous_etat>.*))?/', $value, $matches)) {
$parseValue = array(
'ressource' => $matches['ressource'],
'etat' => $matches['etat'],

View file

@ -78,7 +78,7 @@ class LSformElement_supannRessourceEtatDate extends LSformElement_supannComposit
* @return array|null La valeur parsée, ou NULL en cas de problème
*/
public function parseCompositeValue($value) {
if (preg_match('/\{(?<ressource>[^\}]+)\}(?<etat>[AIS]):(?<sous_etat>[^\:]*):(?<date_debut>[0-9]{8})?:(?<date_fin>[0-9]{8})?/', $value, $matches)) {
if (preg_match('/\{(?<ressource>[^\}]+)\}(?<etat>[^:]+):(?<sous_etat>[^\:]*):(?<date_debut>[0-9]{8})?:(?<date_fin>[0-9]{8})?/', $value, $matches)) {
$parseValue = array(
'ressource' => $matches['ressource'],
'etat' => $matches['etat'],