[interchange-cvs] interchange - jon modified lib/Vend/Interpolate.pm
interchange-core@interchange.redhat.com
interchange-core@interchange.redhat.com
Thu Jan 17 10:20:01 2002
User: jon
Date: 2002-01-17 15:19:10 GMT
Modified: lib/Vend Interpolate.pm
Log:
Don't double trailing colons or spaces in form validation errors when
using labels instead of variable names.
Correct wrong variable in error message, and localize it.
Revision Changes Path
2.40 +5 -5 interchange/lib/Vend/Interpolate.pm
rev 2.40, prev_rev 2.39
Index: Interpolate.pm
===================================================================
RCS file: /var/cvs/interchange/lib/Vend/Interpolate.pm,v
retrieving revision 2.39
retrieving revision 2.40
diff -u -u -r2.39 -r2.40
--- Interpolate.pm 2002/01/16 05:16:12 2.39
+++ Interpolate.pm 2002/01/17 15:19:09 2.40
@@ -1,6 +1,6 @@
# Vend::Interpolate - Interpret Interchange tags
#
-# $Id: Interpolate.pm,v 2.39 2002/01/16 05:16:12 jon Exp $
+# $Id: Interpolate.pm,v 2.40 2002/01/17 15:19:09 jon Exp $
#
# Copyright (C) 1996-2001 Red Hat, Inc. <interchange@redhat.com>
#
@@ -27,7 +27,7 @@
require Exporter;
@ISA = qw(Exporter);
-$VERSION = substr(q$Revision: 2.39 $, 10);
+$VERSION = substr(q$Revision: 2.40 $, 10);
@EXPORT = qw (
@@ -703,7 +703,7 @@
if(! defined $db->test_column($_) ) {
splice (@cols, $i, 1);
my $tmp = splice (@vals, $i, 1);
- ::logError("bad field $_ in record update, value=$_");
+ ::logError("bad field %s in record update, value=%s", $_, $tmp);
redo RESOLVE;
}
next unless defined $filter->{$_};
@@ -6686,8 +6686,8 @@
$found_error++;
my $string = '';
if ($opt->{show_label}) {
- if ($Vend::Session->{errorlabels}{$_}) {
- $string .= $Vend::Session->{errorlabels}{$_};
+ if ($string = $Vend::Session->{errorlabels}{$_}) {
+ $string =~ s/[:\s]+$//;
$string .= " ($_)" if $opt->{show_var};
$string .= ": ";
} else {