From 398e286be9393463c6ef749077d95ff352e00a2f Mon Sep 17 00:00:00 2001 From: Florian Henry Date: Tue, 21 Jan 2014 12:58:25 +0100 Subject: [PATCH] Fix reset Mask (befor do not work with FA{yy}{mm}-{0000@99} and date 2014-01-01) --- htdocs/core/lib/functions2.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/lib/functions2.lib.php b/htdocs/core/lib/functions2.lib.php index 22b90ef52e0..d429192dbd9 100644 --- a/htdocs/core/lib/functions2.lib.php +++ b/htdocs/core/lib/functions2.lib.php @@ -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; }