Replace {extra_ with {user_extra_

This commit is contained in:
Laurent Destailleur
2017-05-31 19:45:54 +02:00
committed by GitHub
parent f563746310
commit a49174313f

View File

@@ -791,13 +791,13 @@ function get_next_value($db,$mask,$table,$field,$where='',$objsoc='',$date='',$m
$tmpmask=preg_replace('/\{'.$regKey[1].'\-'.$regKey[2].'\}/i', $maskpersonew, $tmpmask);
}*/
if(strstr($mask,'extra_')){
$start = "{extra_";
if (strstr($mask,'user_extra_'))
{
$start = "{user_extra_";
$end = "\}";
$extra= get_string_between($mask, "extra_", "}");
$extra= get_string_between($mask, "user_extra_", "}");
if(!empty($user->array_options['options_'.$extra])){
$mask = preg_replace('#('.($start).')(.*?)('.($end).')#si', $user->array_options['options_'.$extra], $mask);
$mask = preg_replace('#('.$start.')(.*?)('.$end.')#si', $user->array_options['options_'.$extra], $mask);
}
}
$maskwithonlyymcode=$mask;