[Bps-public-commit] rt-extension-mobileui branch, master, updated. 0.96-3-g370034d

Thomas Sibley trs at bestpractical.com
Thu Oct 28 11:38:23 EDT 2010


The branch, master has been updated
       via  370034d01633b463ab013af4d1ad0cb0ce41c5fa (commit)
      from  ae7294e262fdfefeedfb04c2a1254f3de2799b1a (commit)

Summary of changes:
 .../Ticket/Display.html/Initial                    |    3 ++-
 html/m/ticket/show                                 |    4 ++++
 2 files changed, 6 insertions(+), 1 deletions(-)

- Log -----------------------------------------------------------------
commit 370034d01633b463ab013af4d1ad0cb0ce41c5fa
Author: Thomas Sibley <trs at bestpractical.com>
Date:   Thu Oct 28 11:36:33 2010 -0400

    Redirect to the right path and with an actual ticket id

diff --git a/html/Callbacks/RT-Extension-MobileUI/Ticket/Display.html/Initial b/html/Callbacks/RT-Extension-MobileUI/Ticket/Display.html/Initial
index 129207f..2fe6ba4 100644
--- a/html/Callbacks/RT-Extension-MobileUI/Ticket/Display.html/Initial
+++ b/html/Callbacks/RT-Extension-MobileUI/Ticket/Display.html/Initial
@@ -1,7 +1,8 @@
 <%INIT>
 return if $ARGSRef->{'NoRedirect'};
 if (RT::Extension::MobileUI::MobileClient()) {
-    RT::Interface::Web::Redirect(RT->Config->Get('WebURL').'/m/ticket/show.html?id='.$TicketObj->id);
+    my $id = $ARGSRef->{'id'} || ($TicketObj ? $TicketObj->id : undef);
+    RT::Interface::Web::Redirect(RT->Config->Get('WebURL').'/m/ticket/show?id='.$id);
     $m->abort;
 }
 </%INIT>
diff --git a/html/m/ticket/show b/html/m/ticket/show
index c650019..ed70047 100644
--- a/html/m/ticket/show
+++ b/html/m/ticket/show
@@ -5,6 +5,10 @@ $id => undef
 my $Ticket;
 my @Actions; 
 
+unless ($id) {
+    Abort('No ticket specified');
+}
+
 if ($ARGS{'id'} eq 'new') {
     # {{{ Create a new ticket
 

-----------------------------------------------------------------------



More information about the Bps-public-commit mailing list