Browse Source

Test to fix a regression

Laurent Destailleur 8 years ago
parent
commit
965e23b711
1 changed files with 4 additions and 4 deletions
  1. 4 4
      htdocs/core/lib/functions2.lib.php

+ 4 - 4
htdocs/core/lib/functions2.lib.php

@@ -781,7 +781,7 @@ function get_next_value($db,$mask,$table,$field,$where='',$objsoc='',$date='',$m
     }
 
     // Personalized field {XXX-1} à {XXX-9}
-    $maskperso=array();
+    /*$maskperso=array();
     $maskpersonew=array();
     $tmpmask=$mask;
     while (preg_match('/\{([A-Z]+)\-([1-9])\}/i',$tmpmask,$regKey))
@@ -789,17 +789,17 @@ function get_next_value($db,$mask,$table,$field,$where='',$objsoc='',$date='',$m
         $maskperso[$regKey[1]]='\{'.$regKey[1]+'\-'.$regKey[2].'\}';
         $maskpersonew[$regKey[1]]=str_pad('', '_', $regKey[2], STR_PAD_RIGHT);
         $tmpmask=preg_replace('/\{'.$regKey[1].'\-'.$regKey[2].'\}/i', $maskpersonew, $tmpmask);
-    }
+    }*/
     
     $maskwithonlyymcode=$mask;
     $maskwithonlyymcode=preg_replace('/\{(0+)([@\+][0-9\-\+\=]+)?([@\+][0-9\-\+\=]+)?\}/i',$maskcounter,$maskwithonlyymcode);
     $maskwithonlyymcode=preg_replace('/\{dd\}/i','dd',$maskwithonlyymcode);
     $maskwithonlyymcode=preg_replace('/\{(c+)(0*)\}/i',$maskrefclient,$maskwithonlyymcode);
     $maskwithonlyymcode=preg_replace('/\{(t+)\}/i',$masktype_value,$maskwithonlyymcode);
-    foreach($maskperso as $key => $val)
+    /*foreach($maskperso as $key => $val)
     {
         $maskwithonlyymcode=preg_replace('/'.$val.'/i', $maskpersonew[$key], $maskwithonlyymcode);
-    }
+    }*/
     $maskwithnocode=$maskwithonlyymcode;
     $maskwithnocode=preg_replace('/\{yyyy\}/i','yyyy',$maskwithnocode);
     $maskwithnocode=preg_replace('/\{yy\}/i','yy',$maskwithnocode);