From a49174313f6bf6c6fa05b812c5a78258a65a1f66 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 31 May 2017 19:45:54 +0200 Subject: [PATCH] Replace {extra_ with {user_extra_ --- htdocs/core/lib/functions2.lib.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/htdocs/core/lib/functions2.lib.php b/htdocs/core/lib/functions2.lib.php index 69ee228504d..c3d8714ab89 100755 --- a/htdocs/core/lib/functions2.lib.php +++ b/htdocs/core/lib/functions2.lib.php @@ -790,16 +790,16 @@ function get_next_value($db,$mask,$table,$field,$where='',$objsoc='',$date='',$m $maskpersonew[$regKey[1]]=str_pad('', '_', $regKey[2], STR_PAD_RIGHT); $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; $maskwithonlyymcode=preg_replace('/\{(0+)([@\+][0-9\-\+\=]+)?([@\+][0-9\-\+\=]+)?\}/i',$maskcounter,$maskwithonlyymcode); $maskwithonlyymcode=preg_replace('/\{dd\}/i','dd',$maskwithonlyymcode);