[Rt-devel] [PATCH] Stop doogles complaining! :)

Todd Chapman todd at chaka.net
Thu Nov 30 11:52:20 EST 2006


The attached patch duplicates the redirect functionality from
Ticket/Display.html to SelfService/Display.html so that
refresh does not resubmit a ticket creation or change.
-------------- next part --------------
==== Patch <selfserve_redirect> level 1
Source: e4b3ae24-6623-0410-94c5-e08a22d88352:/local/bp/rt-3.6-selfservice-redirect:6556
Target: e417ac7c-1bcc-0310-8ffa-8f5827389a85:/rt/branches/3.6-RELEASE:6547
        (svn://svn.bestpractical.com)
Log:
 r6555 at fe-rtr00a:  todd-chapman | 2006-11-30 11:35:23 -0500
 Stop doogles complaining.
 r6556 at fe-rtr00a:  todd-chapman | 2006-11-30 11:41:09 -0500
 Copy rediect feature from Ticket/Display to SelfService/Display

=== html/SelfService/Display.html
==================================================================
--- html/SelfService/Display.html	(revision 6547)
+++ html/SelfService/Display.html	(patch selfserve_redirect level 1)
@@ -207,6 +207,20 @@
 
     # }}}
 
+    # 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 = @{$session{"Actions"} || [] };
+        delete $session{"Actions"};
+    }
+
     my $Transactions = $Ticket->Transactions;
 
     my $attachments =

==== BEGIN SVK PATCH BLOCK ====
Version: svk 1.08 (linux)

eJyNlG1v2zYQx/M62HcY4apoA0y2ROo5qOduS9FhxTDE7vpiGwyKOsVCZdEgaXdGGGAD9omKvdjH
24m2kgBL1wiGLR+Pv/8d73iv1OJ8FtrpNLBeGNj5zz8UxU/ciNXTMLJeYqFqjFRebFvYQesx28or
L7IdXwOuarlVon8xXF2B6V8a8R7MdBoiLjvgLhxiwDpqyY3stJc7/NIoAC+00Sy2M9Z/ll6YWw24
4rBLBbtGN7JD4SSOE/RA9xC3yw10SyWlc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