[Rt-commit] r7036 - in rt/branches/3.7-EXPERIMENTAL-RTIR-2.2: .
ruz at bestpractical.com
ruz at bestpractical.com
Tue Feb 20 09:32:51 EST 2007
Author: ruz
Date: Tue Feb 20 09:32:50 2007
New Revision: 7036
Modified:
rt/branches/3.7-EXPERIMENTAL-RTIR-2.2/ (props changed)
rt/branches/3.7-EXPERIMENTAL-RTIR-2.2/lib/RT/Interface/Web.pm
Log:
r4594 at cubic-pc (orig r7027): ruz | 2007-02-19 04:47:24 +0300
* resolve a clobbered regex-match $1 by stashing the principal ID in a
temporary variable. Thanks to Richard Harman.
* type was set incorrect in a case of multiple parameters
Modified: rt/branches/3.7-EXPERIMENTAL-RTIR-2.2/lib/RT/Interface/Web.pm
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL-RTIR-2.2/lib/RT/Interface/Web.pm (original)
+++ rt/branches/3.7-EXPERIMENTAL-RTIR-2.2/lib/RT/Interface/Web.pm Tue Feb 20 09:32:50 2007
@@ -1398,18 +1398,16 @@
# Add new watchers by owner
elsif ( $key =~ /^Ticket-AddWatcher-Principal-(\d*)$/ ) {
+ my $principal_id = $1;
my $form = $ARGSRef->{$key};
foreach my $value ( ref($form) ? @{$form} : ($form) ) {
+ next unless $value =~ /^(?:AdminCc|Cc|Requestor)$/i;
- if ( $value =~ /^(AdminCc|Cc|Requestor)$/ ) {
-
- #They're in this order because otherwise $1 gets clobbered :/
- my ( $code, $msg ) = $Ticket->AddWatcher(
- Type => $ARGSRef->{$key},
- PrincipalId => $1
- );
- push @results, $msg;
- }
+ my ( $code, $msg ) = $Ticket->AddWatcher(
+ Type => $value,
+ PrincipalId => $principal_id
+ );
+ push @results, $msg;
}
}
More information about the Rt-commit
mailing list