[Rt-commit] r7071 - in rt/branches/3.7-EXPERIMENTAL: .
ruz at bestpractical.com
ruz at bestpractical.com
Mon Feb 26 09:42:29 EST 2007
Author: ruz
Date: Mon Feb 26 09:42:29 2007
New Revision: 7071
Modified:
rt/branches/3.7-EXPERIMENTAL/ (props changed)
rt/branches/3.7-EXPERIMENTAL/lib/RT/Interface/Web.pm
Log:
r4600 at cubic-pc (orig r7036): ruz | 2007-02-20 17:32:50 +0300
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/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 Mon Feb 26 09:42:29 2007
@@ -1401,18 +1401,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