[Rt-commit] r9579 - in rt/branches/3.7-EXPERIMENTAL: .
ruz at bestpractical.com
ruz at bestpractical.com
Tue Nov 6 07:06:27 EST 2007
Author: ruz
Date: Tue Nov 6 07:06:25 2007
New Revision: 9579
Modified:
rt/branches/3.7-EXPERIMENTAL/ (props changed)
rt/branches/3.7-EXPERIMENTAL/lib/RT/Record.pm
Log:
r9329 at cubic-pc (orig r9328): ruz | 2007-10-16 22:38:17 +0400
* in forms we output empty values instead of zero, so we should
treat incomming value in the same way
Modified: rt/branches/3.7-EXPERIMENTAL/lib/RT/Record.pm
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/lib/RT/Record.pm (original)
+++ rt/branches/3.7-EXPERIMENTAL/lib/RT/Record.pm Tue Nov 6 07:06:25 2007
@@ -870,13 +870,18 @@
# This is in an eval block because $object might not exist.
# and might not have a Name method. But "can" won't find autoloaded
# items. If it fails, we don't care
- do { no warnings "uninitialized";
+ do {
+ no warnings "uninitialized";
+ local $@;
eval {
my $object = $attribute . "Obj";
- next if $self->$object->Name eq $value;
+ my $name = $self->$object->Name;
+ next if $name eq $value || $name eq ($value || 0);
};
next if $value eq $self->$attribute();
+ next if ($value || 0) eq $self->$attribute();
};
+
my $method = "Set$attribute";
my ( $code, $msg ) = $self->$method($value);
my ($prefix) = ref($self) =~ /RT(?:.*)::(\w+)/;
More information about the Rt-commit
mailing list