[Rt-commit] r8778 - in rt/branches/3.7-EXPERIMENTAL: .
ruz at bestpractical.com
ruz at bestpractical.com
Tue Aug 28 14:40:37 EDT 2007
Author: ruz
Date: Tue Aug 28 14:40:37 2007
New Revision: 8778
Modified:
rt/branches/3.7-EXPERIMENTAL/ (props changed)
rt/branches/3.7-EXPERIMENTAL/lib/RT/Interface/Web.pm
Log:
r8692 at cubic-pc (orig r8691): ruz | 2007-08-23 01:18:06 +0400
* delete empty hash reference as it's true value, but we should treat
it as false.
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 Tue Aug 28 14:40:37 2007
@@ -516,7 +516,11 @@
@_
);
- my @results;
+ if ( $args{ARGSRef}->{'UpdateAttachments'}
+ && !keys %{$args{ARGSRef}->{'UpdateAttachments'}} )
+ {
+ delete $args{ARGSRef}->{'UpdateAttachments'};
+ }
#Make the update content have no 'weird' newlines in it
return () unless $args{ARGSRef}->{'UpdateTimeWorked'}
@@ -530,7 +534,7 @@
if ( $args{'SkipSignatureOnly'} ) {
my $sig = $args{'TicketObj'}->CurrentUser->UserObj->Signature || '';
$sig =~ s/^\s*|\s*$//g;
- if( $args{ARGSRef}->{'UpdateContent'} =~ /^\s*(--)?\s*\Q$sig\E\s*$/ ) {
+ if ( $args{ARGSRef}->{'UpdateContent'} =~ /^\s*(--)?\s*\Q$sig\E\s*$/ ) {
return () unless $args{ARGSRef}->{'UpdateTimeWorked'} ||
$args{ARGSRef}->{'UpdateAttachments'};
@@ -621,6 +625,7 @@
}
}
+ my @results;
if ( $args{ARGSRef}->{'UpdateType'} =~ /^(private|public)$/ ) {
my ( $Transaction, $Description, $Object ) = $args{TicketObj}->Comment(%message_args);
push( @results, $Description );
More information about the Rt-commit
mailing list