[Rt-commit] rt branch, 3.9-trunk, updated. rt-3.9.4-178-g42be2d4
Chia-liang Kao
clkao at bestpractical.com
Tue Oct 19 12:06:12 EDT 2010
The branch, 3.9-trunk has been updated
via 42be2d45c1ec305a5c64e8d356ee1ffe33464d1b (commit)
via 54f92bb793589e548a62e966a1ab483e538c90e8 (commit)
from db08f1c3e9a6d6fa3bd9fa36ac4fc653b5a5e6cb (commit)
Summary of changes:
lib/RT/Action/CreateTickets.pm | 4 ++--
lib/RT/Ticket_Overlay.pm | 8 ++++----
lib/RT/Transaction_Overlay.pm | 6 +++---
share/html/Admin/CustomFields/Modify.html | 2 +-
share/html/Admin/CustomFields/Objects.html | 2 +-
share/html/Search/Bulk.html | 6 +++---
share/html/Search/Elements/SelectChartType | 2 +-
share/html/Ticket/ModifyPeople.html | 4 ++--
t/web/compilation_errors.t | 2 +-
9 files changed, 18 insertions(+), 18 deletions(-)
- Log -----------------------------------------------------------------
commit 54f92bb793589e548a62e966a1ab483e538c90e8
Author: Chia-liang Kao <clkao at bestpractical.com>
Date: Wed Oct 20 01:00:31 2010 +0900
Make compilation error easier to diagnose.
diff --git a/t/web/compilation_errors.t b/t/web/compilation_errors.t
index 5789ff8..cbe7415 100644
--- a/t/web/compilation_errors.t
+++ b/t/web/compilation_errors.t
@@ -55,7 +55,7 @@ sub test_get {
is($agent->status, 200, "Loaded $file");
$agent->content_lacks('Not logged in', "Still logged in for $file");
$agent->content_lacks('raw error', "Didn't get a Mason compilation error on $file") or do {
- if (my ($error) = $agent->content =~ /<pre>(.*)/) {
+ if (my ($error) = $agent->content =~ /<pre>(.*?line.*?)$/s) {
diag "$file: $error";
}
};
commit 42be2d45c1ec305a5c64e8d356ee1ffe33464d1b
Author: Chia-liang Kao <clkao at bestpractical.com>
Date: Wed Oct 20 01:01:11 2010 +0900
Fix more deprecated construct uses
diff --git a/lib/RT/Action/CreateTickets.pm b/lib/RT/Action/CreateTickets.pm
index 6b0315a..42f5995 100755
--- a/lib/RT/Action/CreateTickets.pm
+++ b/lib/RT/Action/CreateTickets.pm
@@ -717,7 +717,7 @@ sub ParseLines {
}
}
- foreach my $date qw(due starts started resolved) {
+ foreach my $date (qw(due starts started resolved)) {
my $dateobj = RT::Date->new( $self->CurrentUser );
next unless $args{$date};
if ( $args{$date} =~ /^\d+$/ ) {
@@ -1074,7 +1074,7 @@ sub UpdateWatchers {
my @results;
- foreach my $type qw(Requestor Cc AdminCc) {
+ foreach my $type (qw(Requestor Cc AdminCc)) {
my $method = $type . 'Addresses';
my $oldaddr = $ticket->$method;
diff --git a/lib/RT/Ticket_Overlay.pm b/lib/RT/Ticket_Overlay.pm
index 9aef9ef..59172dc 100755
--- a/lib/RT/Ticket_Overlay.pm
+++ b/lib/RT/Ticket_Overlay.pm
@@ -760,7 +760,7 @@ sub _Parse822HeadersForAttributes {
}
- foreach my $date qw(due starts started resolved) {
+ foreach my $date (qw(due starts started resolved)) {
my $dateobj = RT::Date->new(RT->SystemUser);
if ( defined ($args{$date}) and $args{$date} =~ /^\d+$/ ) {
$dateobj->Set( Format => 'unix', Value => $args{$date} );
@@ -992,7 +992,7 @@ It will return true on success and undef on failure.
sub _CreateTicketGroups {
my $self = shift;
- my @types = qw(Requestor Owner Cc AdminCc);
+ my @types = (qw(Requestor Owner Cc AdminCc));
foreach my $type (@types) {
my $type_obj = RT::Group->new($self->CurrentUser);
@@ -2705,7 +2705,7 @@ sub _MergeInto {
}
# Update time fields
- foreach my $type qw(TimeEstimated TimeWorked TimeLeft) {
+ foreach my $type (qw(TimeEstimated TimeWorked TimeLeft)) {
my $mutator = "Set$type";
$MergeInto->$mutator(
@@ -2713,7 +2713,7 @@ sub _MergeInto {
}
#add all of this ticket's watchers to that ticket.
- foreach my $watcher_type qw(Requestors Cc AdminCc) {
+ foreach my $watcher_type (qw(Requestors Cc AdminCc)) {
my $people = $self->$watcher_type->MembersObj;
my $addwatcher_type = $watcher_type;
diff --git a/lib/RT/Transaction_Overlay.pm b/lib/RT/Transaction_Overlay.pm
index 35f9d26..a480927 100755
--- a/lib/RT/Transaction_Overlay.pm
+++ b/lib/RT/Transaction_Overlay.pm
@@ -144,7 +144,7 @@ sub Create {
);
# Parameters passed in during an import that we probably don't want to touch, otherwise
- foreach my $attr qw(id Creator Created LastUpdated TimeTaken LastUpdatedBy) {
+ foreach my $attr (qw(id Creator Created LastUpdated TimeTaken LastUpdatedBy)) {
$params{$attr} = $args{$attr} if ($args{$attr});
}
@@ -1220,7 +1220,7 @@ sub Recipients {
my $action = $scrip->ActionObj->Action;
next unless $action->isa('RT::Action::SendEmail');
- foreach my $type qw(To Cc Bcc) {
+ foreach my $type (qw(To Cc Bcc)) {
push @recipients, $action->$type();
}
}
@@ -1229,7 +1229,7 @@ sub Recipients {
for my $rule (@{$self->Rules}) {
next unless $rule->{hints} && $rule->{hints}{class} eq 'SendEmail';
my $data = $rule->{hints}{recipients};
- foreach my $type qw(To Cc Bcc) {
+ foreach my $type (qw(To Cc Bcc)) {
push @recipients, map {Email::Address->new($_)} @{$data->{$type}};
}
}
diff --git a/share/html/Admin/CustomFields/Modify.html b/share/html/Admin/CustomFields/Modify.html
index 5f26a21..51f162b 100644
--- a/share/html/Admin/CustomFields/Modify.html
+++ b/share/html/Admin/CustomFields/Modify.html
@@ -238,7 +238,7 @@ if ( $ARGS{'Update'} && $id ne 'new' ) {
# Update any existing values
my $values = $CustomFieldObj->ValuesObj;
while ( my $value = $values->Next ) {
- foreach my $attr qw(Name Description SortOrder Category) {
+ foreach my $attr (qw(Name Description SortOrder Category)) {
my $param = join("-", $paramtag, $value->Id, $attr);
next unless exists $ARGS{$param};
$ARGS{$param} =~ s/^\s+//;
diff --git a/share/html/Admin/CustomFields/Objects.html b/share/html/Admin/CustomFields/Objects.html
index d643fab..484ef7a 100644
--- a/share/html/Admin/CustomFields/Objects.html
+++ b/share/html/Admin/CustomFields/Objects.html
@@ -107,7 +107,7 @@
<%INIT>
my $CF = RT::CustomField->new($session{'CurrentUser'});
-$CF->Load($id) or Abort(loc("Could not load CustomField [_1]"), $id);
+$CF->Load($id) or Abort(loc("Could not load CustomField [_1]", $id));
my $class = $CF->RecordClassFromLookupType;
Abort(loc("Something wrong. Contact system administrator"))
diff --git a/share/html/Search/Bulk.html b/share/html/Search/Bulk.html
index 82f1eb2..a1a6bf9 100755
--- a/share/html/Search/Bulk.html
+++ b/share/html/Search/Bulk.html
@@ -60,7 +60,7 @@
<& /Elements/ListActions, actions => \@results &>
<form method="post" action="<% RT->Config->Get('WebPath') %>/Search/Bulk.html" enctype="multipart/form-data">
-% foreach my $var qw(Query Format OrderBy Order Rows Page SavedChartSearchId) {
+% foreach my $var (qw(Query Format OrderBy Order Rows Page SavedChartSearchId)) {
<input type="hidden" class="hidden" name="<%$var%>" value="<%$ARGS{$var} || ''%>" />
%}
<& /Elements/CollectionList,
@@ -344,13 +344,13 @@ unless ( $ARGS{'AddMoreAttach'} ) {
my @watchresults =
ProcessTicketWatchers( TicketObj => $Ticket, ARGSRef => \%ARGS );
- foreach my $type qw(MergeInto DependsOn MemberOf RefersTo) {
+ foreach my $type (qw(MergeInto DependsOn MemberOf RefersTo)) {
$ARGS{ $Ticket->id . "-" . $type } = $ARGS{"Ticket-$type"};
$ARGS{ $type . "-" . $Ticket->id } = $ARGS{"$type-Ticket"};
}
@linkresults =
ProcessTicketLinks( TicketObj => $Ticket, ARGSRef => \%ARGS );
- foreach my $type qw(MergeInto DependsOn MemberOf RefersTo) {
+ foreach my $type (qw(MergeInto DependsOn MemberOf RefersTo)) {
delete $ARGS{ $type . "-" . $Ticket->id };
delete $ARGS{ $Ticket->id . "-" . $type };
}
diff --git a/share/html/Search/Elements/SelectChartType b/share/html/Search/Elements/SelectChartType
index b106977..bbf67a4 100644
--- a/share/html/Search/Elements/SelectChartType
+++ b/share/html/Search/Elements/SelectChartType
@@ -50,7 +50,7 @@ $Name => 'ChartType'
$Default => 'bar'
</%args>
<select id="<%$Name%>" name="<%$Name%>">
-% foreach my $option qw(bar pie) {
+% foreach my $option (qw(bar pie)) {
% # 'bar' # loc
% # 'pie' # loc
<option value="<%$option%>"<% $option eq $Default ? qq[ selected="selected"] : '' |n %>><%loc($option)%></option>
diff --git a/share/html/Ticket/ModifyPeople.html b/share/html/Ticket/ModifyPeople.html
index 195a7de..9982cc2 100755
--- a/share/html/Ticket/ModifyPeople.html
+++ b/share/html/Ticket/ModifyPeople.html
@@ -111,13 +111,13 @@ my @txns = map {$Ticket->DryRun( Action => $_ )} qw/comment respond/;
my %recips=();
for my $scrip (map {@{$_->Scrips->Prepared}} @txns) {
next unless $scrip->ActionObj->Action->isa('RT::Action::SendEmail');
- for my $type qw(To Cc Bcc) {
+ for my $type (qw(To Cc Bcc)) {
$recips{$_->address} = 1 for $scrip->ActionObj->Action->$type();
}
}
for my $rule (map {@{$_->Rules}} @txns) {
next unless $rule->{hints} && $rule->{hints}{class} eq "SendEmail";
- for my $type qw(To Cc Bcc) {
+ for my $type (qw(To Cc Bcc)) {
$recips{$_} = 1 for @{$rule->{hints}{recips}{$type}};
}
}
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list