[Rt-commit] [svn] r1795 - in DBIx-SearchBuilder/trunk: .
SearchBuilder
jesse at pallas.eruditorum.org
jesse at pallas.eruditorum.org
Wed Nov 10 08:11:05 EST 2004
Author: jesse
Date: Wed Nov 10 08:11:05 2004
New Revision: 1795
Modified:
DBIx-SearchBuilder/trunk/ (props changed)
DBIx-SearchBuilder/trunk/SearchBuilder/Record.pm
Log:
r9052 at tinbook: jesse | 2004-11-10T13:12:16.256401Z
Fixing a couple potential warnings in the new truncation code
Modified: DBIx-SearchBuilder/trunk/SearchBuilder/Record.pm
==============================================================================
--- DBIx-SearchBuilder/trunk/SearchBuilder/Record.pm (original)
+++ DBIx-SearchBuilder/trunk/SearchBuilder/Record.pm Wed Nov 10 08:11:05 2004
@@ -685,12 +685,7 @@
#
- my $value = $self->TruncateValue ( $args{'Column'}, $args{'Value'});
- unless ($value eq $args{'Value'}) {
- $args{'OriginalValue'} = $args{'Value'};
- $args{'Value'} = $value;
- }
-
+ $args{'Value'} = $self->TruncateValue ( $args{'Column'}, $args{'Value'});
my $method = "Validate" . $args{'Column'};
@@ -782,7 +777,7 @@
if ( $metadata->{'length'} && !$metadata->{'is_numeric'} ) {
$truncate_to = $metadata->{'length'};
}
- elsif ( $metadata->{'type'} =~ /char\((\d+)\)/ ) {
+ elsif ($metadata->{'type'} && $metadata->{'type'} =~ /char\((\d+)\)/ ) {
$truncate_to = $1;
}
@@ -1107,8 +1102,7 @@
my $method = "Validate$key";
#Truncate things that are too long for their datatypes
- my $value = $self->TruncateValue ($key => $attribs{$key});
- $attribs{$key} = $value unless ($value eq $attribs{$key});
+ $attribs{$key} = $self->TruncateValue ($key => $attribs{$key});
unless ( $self->$method( $attribs{$key} ) ) {
delete $attribs{$key};
More information about the Rt-commit
mailing list