[Rt-commit] r6847 - in rt/branches/3.7-EXPERIMENTAL-RTIR-2.2: . html/SelfService

ruz at bestpractical.com ruz at bestpractical.com
Fri Jan 26 13:56:50 EST 2007


Author: ruz
Date: Fri Jan 26 13:56:50 2007
New Revision: 6847

Modified:
   rt/branches/3.7-EXPERIMENTAL-RTIR-2.2/   (props changed)
   rt/branches/3.7-EXPERIMENTAL-RTIR-2.2/html/SelfService/Display.html
   rt/branches/3.7-EXPERIMENTAL-RTIR-2.2/html/Ticket/Display.html

Log:
 r4323 at cubic-pc (orig r6690):  ruz | 2006-12-23 03:23:37 +0300
 * Copy rediect feature from Ticket/Display to SelfService/Display
   Thanks to doogles and Todd.


Modified: rt/branches/3.7-EXPERIMENTAL-RTIR-2.2/html/SelfService/Display.html
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL-RTIR-2.2/html/SelfService/Display.html	(original)
+++ rt/branches/3.7-EXPERIMENTAL-RTIR-2.2/html/SelfService/Display.html	Fri Jan 26 13:56:50 2007
@@ -198,6 +198,19 @@
 
     # }}}
 
+    # This code does automatic redirection if any updates happen.
+
+    if (@results) {
+        # We've done something, so we need to clear the decks to avoid
+        # resubmission on refresh.
+        # But we need to store Actions somewhere too, so we don't lose them.
+        $session{"Actions"} = \@results;
+        RT::Interface::Web::Redirect($RT::WebURL."SelfService/Display.html?id="
+                                     . $Ticket->id);
+    } else {
+        @results = @{ delete $session{"Actions"} || [] };
+    }
+
     my $Transactions = $Ticket->Transactions;
 
     my $attachments =

Modified: rt/branches/3.7-EXPERIMENTAL-RTIR-2.2/html/Ticket/Display.html
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL-RTIR-2.2/html/Ticket/Display.html	(original)
+++ rt/branches/3.7-EXPERIMENTAL-RTIR-2.2/html/Ticket/Display.html	Fri Jan 26 13:56:50 2007
@@ -145,8 +145,7 @@
     $session{"Actions"} = \@Actions;
     $m->redirect(RT->Config->Get('WebURL')."Ticket/Display.html?id=".$TicketObj->id);
 } else {
-    @Actions = @{$session{"Actions"} || [] };
-    delete $session{"Actions"};
+    @Actions = @{ delete $session{"Actions"} || [] };
 }
 
 $m->comp('/Elements/Callback', _CallbackName => 'BeforeDisplay',


More information about the Rt-commit mailing list