Fix reset Mask (befor do not work with FA{yy}{mm}-{0000@99} and date

2014-01-01)
This commit is contained in:
Florian Henry
2014-01-21 12:58:25 +01:00
parent fb0a4803c2
commit 398e286be9

View File

@@ -635,7 +635,7 @@ function get_next_value($db,$mask,$table,$field,$where='',$objsoc='',$date='',$m
if ($maskraz > 12) return 'ErrorBadMaskBadRazMonth';
// Define posy, posm and reg
if ($maskraz > 1) // if reset is not first month, we need month and year into mask
if ($maskraz >= 1) // if reset is not first month, we need month and year into mask
{
if (preg_match('/^(.*)\{(y+)\}\{(m+)\}/i',$maskwithonlyymcode,$reg)) { $posy=2; $posm=3; }
elseif (preg_match('/^(.*)\{(m+)\}\{(y+)\}/i',$maskwithonlyymcode,$reg)) { $posy=3; $posm=2; }