From 12c628c589ea4e0da1caf190416da08946c54636 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Fri, 13 Apr 2007 08:35:51 +0000 Subject: [PATCH] =?utf8?q?Bei=20Nummernkreisen=20auch=20Sonderzeichen=20er?= =?utf8?q?lauben=20(Perls=20eigener=20Algorithmus=20hinter=20"$var++;"=20f?= =?utf8?q?unktioniert=20z.B.=20nicht,=20wenn=20die=20Variable=20ein=20Glei?= =?utf8?q?chheitszeichen=20enth=C3=A4lt).?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- SL/Form.pm | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/SL/Form.pm b/SL/Form.pm index 6b380bd6f..74e7ff28e 100644 --- a/SL/Form.pm +++ b/SL/Form.pm @@ -2320,7 +2320,11 @@ sub update_defaults { my ($var) = $sth->fetchrow_array; $sth->finish; - $var++; + if ($var =~ /^(.*?)(\d+)$/) { + $var = "$1" . ($2 + 1); + } else { + $var++; + } $query = qq|UPDATE defaults SET $fld = ?|; do_query($self, $dbh, $query, $var); @@ -2352,7 +2356,11 @@ sub update_business { my ($var) = selectrow_query($self, $dbh, $query, $business_id); if ($var ne "") { - $var++; + if ($var =~ /^(.*?)(\d+)$/) { + $var = "$1" . ($2 + 1); + } else { + $var++; + } } $query = qq|UPDATE business SET customernumberinit = ? -- 2.20.1