[Rt-commit] r4027 - in rt/branches/3.7-EXPERIMENTAL: .
lib/RT/Interface
ruz at bestpractical.com
ruz at bestpractical.com
Fri Nov 4 20:56:04 EST 2005
Author: ruz
Date: Fri Nov 4 20:56:03 2005
New Revision: 4027
Modified:
rt/branches/3.7-EXPERIMENTAL/ (props changed)
rt/branches/3.7-EXPERIMENTAL/lib/RT/Interface/Web.pm
Log:
r1163 at cubic-pc: cubic | 2005-11-04 01:44:24 +0300
* loop refactoring
Modified: rt/branches/3.7-EXPERIMENTAL/lib/RT/Interface/Web.pm
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/lib/RT/Interface/Web.pm (original)
+++ rt/branches/3.7-EXPERIMENTAL/lib/RT/Interface/Web.pm Fri Nov 4 20:56:03 2005
@@ -1400,24 +1400,24 @@
#Run through each field in this list. update the value if apropriate
foreach my $field (@date_fields) {
+ next unless exists $ARGSRef->{ $field . '_Date' };
+ next if $ARGSRef->{ $field . '_Date' } eq '';
+
my ( $code, $msg );
my $DateObj = RT::Date->new( $session{'CurrentUser'} );
-
- #If it's something other than just whitespace
- if ( $ARGSRef->{ $field . '_Date' } ne '' ) {
- $DateObj->Set(
- Format => 'unknown',
- Value => $ARGSRef->{ $field . '_Date' }
- );
- my $obj = $field . "Obj";
- if ( ( defined $DateObj->Unix )
- and ( $DateObj->Unix ne $Ticket->$obj()->Unix() ) )
- {
- my $method = "Set$field";
- my ( $code, $msg ) = $Ticket->$method( $DateObj->ISO );
- push @results, "$msg";
- }
+ $DateObj->Set(
+ Format => 'unknown',
+ Value => $ARGSRef->{ $field . '_Date' }
+ );
+
+ my $obj = $field . "Obj";
+ if ( ( defined $DateObj->Unix )
+ and ( $DateObj->Unix != $Ticket->$obj()->Unix() ) )
+ {
+ my $method = "Set$field";
+ my ( $code, $msg ) = $Ticket->$method( $DateObj->ISO );
+ push @results, "$msg";
}
}
More information about the Rt-commit
mailing list