[Rt-commit] rt branch, 4.2/id-override, created. rt-4.2.13-120-g9ab461b
Shawn Moore
shawn at bestpractical.com
Mon Mar 27 15:37:33 EDT 2017
The branch, 4.2/id-override has been created
at 9ab461b247b038a32e43080e775d3196749423d5 (commit)
- Log -----------------------------------------------------------------
commit 9ab461b247b038a32e43080e775d3196749423d5
Author: Shawn M Moore <shawn at bestpractical.com>
Date: Mon Mar 27 19:32:41 2017 +0000
Avoid using $id in /Ticket/Display.html
This way, the Initial callback can interject its own ticket id. Other
parts of this template use $ARGS{'id'} directly, presumably for this
reason.
diff --git a/share/html/Ticket/Display.html b/share/html/Ticket/Display.html
index 3d9c7f3..cbb4c88 100644
--- a/share/html/Ticket/Display.html
+++ b/share/html/Ticket/Display.html
@@ -95,7 +95,6 @@
% );
<%ARGS>
-$id => undef
$TicketObj => undef
$ShowHeaders => 0
$ForceShowHistory => 0
@@ -106,8 +105,8 @@ $ForceShowHistory => 0
$m->callback( TicketObj => $TicketObj, ARGSRef => \%ARGS, CallbackName => 'Initial' );
if ( ! $ARGS{'NoRedirect'} && RT::Interface::Web->MobileClient()) {
- $id ||= $TicketObj->id if $TicketObj;
- RT::Interface::Web::Redirect(RT->Config->Get('WebURL').'m/ticket/show?id='.$id);
+ $ARGS{'id'} ||= $TicketObj->id if $TicketObj;
+ RT::Interface::Web::Redirect(RT->Config->Get('WebURL').'m/ticket/show?id='.$ARGS{'id'});
$m->abort;
}
@@ -115,7 +114,7 @@ if ( ! $ARGS{'NoRedirect'} && RT::Interface::Web->MobileClient()) {
my (@Actions, $title);
-unless ($id || $TicketObj) {
+unless ($ARGS{'id'} || $TicketObj) {
Abort('No ticket specified');
}
-----------------------------------------------------------------------
More information about the rt-commit
mailing list