[Rt-commit] r7595 - in rtir/branches/2.3-EXPERIMENTAL: . html/RTIR
html/RTIR/Elements lib/RT/Action
jesse at bestpractical.com
jesse at bestpractical.com
Fri Apr 20 16:40:15 EDT 2007
Author: jesse
Date: Fri Apr 20 16:40:14 2007
New Revision: 7595
Modified:
rtir/branches/2.3-EXPERIMENTAL/ (props changed)
rtir/branches/2.3-EXPERIMENTAL/html/Callbacks/RTIR/Ticket/Elements/ShowHistory/SkipTransaction
rtir/branches/2.3-EXPERIMENTAL/html/RTIR/Display.html
rtir/branches/2.3-EXPERIMENTAL/html/RTIR/Elements/QueueTabs
rtir/branches/2.3-EXPERIMENTAL/lib/RT/Action/RTIR_FindIP.pm
Log:
r55803 at pinglin: jesse | 2007-04-20 16:39:46 -0400
* Cleakup and warning avoidance.
Modified: rtir/branches/2.3-EXPERIMENTAL/html/Callbacks/RTIR/Ticket/Elements/ShowHistory/SkipTransaction
==============================================================================
--- rtir/branches/2.3-EXPERIMENTAL/html/Callbacks/RTIR/Ticket/Elements/ShowHistory/SkipTransaction (original)
+++ rtir/branches/2.3-EXPERIMENTAL/html/Callbacks/RTIR/Ticket/Elements/ShowHistory/SkipTransaction Fri Apr 20 16:40:14 2007
@@ -11,7 +11,7 @@
}
# get out of here asap
-unless ( $Transaction->Field eq 'Status' && $Transaction->Type =~ /^(?:Status|Set)$/ ) {
+unless ( $Transaction->Type =~ /^(?:Status|Set)$/ && $Transaction->Field eq 'Status') {
return $$skip = 0;
}
Modified: rtir/branches/2.3-EXPERIMENTAL/html/RTIR/Display.html
==============================================================================
--- rtir/branches/2.3-EXPERIMENTAL/html/RTIR/Display.html (original)
+++ rtir/branches/2.3-EXPERIMENTAL/html/RTIR/Display.html Fri Apr 20 16:40:14 2007
@@ -237,7 +237,7 @@
}
($Ticket, @results) = CreateTicket( %ARGS, Attachments => delete $session{'Attachments'} );
} elsif( $id ) {
- my $oldstate = $Ticket->FirstCustomFieldValue('_RTIR_State');
+ my $oldstate = $Ticket->FirstCustomFieldValue('_RTIR_State') ||'';
if ( $ARGS{'Action'} && $ARGS{'Action'} =~ /^(Steal|Kill|Take|SetTold)$/ ) {
my $action = $1;
@@ -288,7 +288,7 @@
push @results, ProcessTicketDates( TicketObj => $Ticket, ARGSRef => \%ARGS );
- my $newstate = $Ticket->FirstCustomFieldValue('_RTIR_State');
+ my $newstate = $Ticket->FirstCustomFieldValue('_RTIR_State') || '';
if ($newstate ne $oldstate) {
push (@results, loc("State changed from [_1] to [_2]", $oldstate, $newstate));
}
Modified: rtir/branches/2.3-EXPERIMENTAL/html/RTIR/Elements/QueueTabs
==============================================================================
--- rtir/branches/2.3-EXPERIMENTAL/html/RTIR/Elements/QueueTabs (original)
+++ rtir/branches/2.3-EXPERIMENTAL/html/RTIR/Elements/QueueTabs Fri Apr 20 16:40:14 2007
@@ -334,7 +334,7 @@
};
}
-if ( $subtabs ) {
+if ( $subtabs && $current_tab ) {
foreach my $tab ( values %{$tabs} ) {
next unless $tab->{'path'} eq $current_tab;
Modified: rtir/branches/2.3-EXPERIMENTAL/lib/RT/Action/RTIR_FindIP.pm
==============================================================================
--- rtir/branches/2.3-EXPERIMENTAL/lib/RT/Action/RTIR_FindIP.pm (original)
+++ rtir/branches/2.3-EXPERIMENTAL/lib/RT/Action/RTIR_FindIP.pm Fri Apr 20 16:40:14 2007
@@ -37,15 +37,15 @@
for( @{$cf->ValuesForObject( $ticket )->ItemsArrayRef} ) {
$existing{ $_->Content } = 1;
}
-
- my @IPs = ( $attach->Content =~ /(?<!\d)($RE{net}{IPv4})(?!\d)(?!\/(3[0-2]|[1-2]?[0-9]))/go );
+ my $content = $attach->Content || '';
+ my @IPs = ( $content =~ /(?<!\d)($RE{net}{IPv4})(?!\d)(?!\/(3[0-2]|[1-2]?[0-9]))/go );
$self->AddIP(
IP => $_,
CustomField => $cf,
Skip => \%existing,
) foreach @IPs;
- my @CIDRs = ( $attach->Content =~ /$RE{net}{CIDR}{IPv4}{-keep}/go );
+ my @CIDRs = ( $content =~ /$RE{net}{CIDR}{IPv4}{-keep}/go );
while ( my ($addr, $bits) = splice @CIDRs, 0, 2 ) {
my $cidr = join( '.', map $_||0, (split /\./, $addr)[0..3] ) ."/$bits";
my $range = (Net::CIDR::cidr2range( $cidr ))[0] or next;
More information about the Rt-commit
mailing list