[Bps-public-commit] r9466 - in RT-Extension-TicketLocking/html: Elements
ruz at bestpractical.com
ruz at bestpractical.com
Thu Oct 25 19:08:04 EDT 2007
Author: ruz
Date: Thu Oct 25 19:08:04 2007
New Revision: 9466
Modified:
RT-Extension-TicketLocking/html/Callbacks/RT-Extension-TicketLocking/Ticket/Display.html/BeforeActionList
RT-Extension-TicketLocking/html/Elements/ShowLock
Log:
* get rid of uninit warnings
Modified: RT-Extension-TicketLocking/html/Callbacks/RT-Extension-TicketLocking/Ticket/Display.html/BeforeActionList
==============================================================================
--- RT-Extension-TicketLocking/html/Callbacks/RT-Extension-TicketLocking/Ticket/Display.html/BeforeActionList (original)
+++ RT-Extension-TicketLocking/html/Callbacks/RT-Extension-TicketLocking/Ticket/Display.html/BeforeActionList Thu Oct 25 19:08:04 2007
@@ -7,7 +7,7 @@
#A somewhat inelegant hack to get around /Ticket/Display.html's redirect, which nukes all
#variables except for id
unless($Duration) {
- my $msg = (grep m{You have unlocked this ticket\. It was locked for (\d+) seconds\.}i, @$Actions)[-1];
+ my $msg = (grep defined && m{You have unlocked this ticket\. It was locked for (\d+) seconds\.}i, @$Actions)[-1];
if ( $msg && $msg =~ /(You have unlocked this ticket\.) It was locked for (\d+) seconds\./i ) {
$ARGS{'Duration'} = $2 if $2 && $2 !~ /\./;
}
Modified: RT-Extension-TicketLocking/html/Elements/ShowLock
==============================================================================
--- RT-Extension-TicketLocking/html/Elements/ShowLock (original)
+++ RT-Extension-TicketLocking/html/Elements/ShowLock Thu Oct 25 19:08:04 2007
@@ -46,7 +46,9 @@
</div>
%}
<%INIT>
-grep {$_ =~ s/(You have unlocked this ticket\.) It was locked for \d+ seconds\./$1/i} @{$ARGS{'Actions'}} if $ARGS{'Actions'};
+foreach ( grep defined, @{ $ARGS{'Actions'} || [] } ) {
+ s/(You have unlocked this ticket\.) It was locked for \d+ seconds\./$1/i;
+}
if ( $Id ) {
$Ticket = LoadTicket($Id);
}
More information about the Bps-public-commit
mailing list