Fix reset Mask (befor do not work with FA{yy}{mm}-{0000@99} and date
2014-01-01)
This commit is contained in:
parent
fb0a4803c2
commit
398e286be9
@ -635,7 +635,7 @@ function get_next_value($db,$mask,$table,$field,$where='',$objsoc='',$date='',$m
|
|||||||
if ($maskraz > 12) return 'ErrorBadMaskBadRazMonth';
|
if ($maskraz > 12) return 'ErrorBadMaskBadRazMonth';
|
||||||
|
|
||||||
// Define posy, posm and reg
|
// 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; }
|
if (preg_match('/^(.*)\{(y+)\}\{(m+)\}/i',$maskwithonlyymcode,$reg)) { $posy=2; $posm=3; }
|
||||||
elseif (preg_match('/^(.*)\{(m+)\}\{(y+)\}/i',$maskwithonlyymcode,$reg)) { $posy=3; $posm=2; }
|
elseif (preg_match('/^(.*)\{(m+)\}\{(y+)\}/i',$maskwithonlyymcode,$reg)) { $posy=3; $posm=2; }
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user