[Rt-commit] r13252 - in rt/branches/3.8-TESTING: . lib/RT/Interface share/html/Elements share/html/Ticket
jesse at bestpractical.com
jesse at bestpractical.com
Thu Jun 12 20:40:54 EDT 2008
Author: jesse
Date: Thu Jun 12 20:40:50 2008
New Revision: 13252
Modified:
rt/branches/3.8-TESTING/ (props changed)
rt/branches/3.8-TESTING/lib/RT/Interface/Web.pm
rt/branches/3.8-TESTING/share/html/Elements/ListActions
rt/branches/3.8-TESTING/share/html/SelfService/Display.html
rt/branches/3.8-TESTING/share/html/Ticket/Display.html
rt/branches/3.8-TESTING/share/html/Ticket/Forward.html
Log:
r32779 at 68-246-143-252: jesse | 2008-06-12 20:40:11 -0400
* Move "action results" on web ui page redirects to unique ids per page load so we don't end up putting the wrong results on a page
Modified: rt/branches/3.8-TESTING/lib/RT/Interface/Web.pm
==============================================================================
--- rt/branches/3.8-TESTING/lib/RT/Interface/Web.pm (original)
+++ rt/branches/3.8-TESTING/lib/RT/Interface/Web.pm Thu Jun 12 20:40:50 2008
@@ -67,6 +67,8 @@
use RT::SavedSearches;
use URI qw();
+use Digest::MD5 ();
+
# {{{ EscapeUTF8
Modified: rt/branches/3.8-TESTING/share/html/Elements/ListActions
==============================================================================
--- rt/branches/3.8-TESTING/share/html/Elements/ListActions (original)
+++ rt/branches/3.8-TESTING/share/html/Elements/ListActions Thu Jun 12 20:40:50 2008
@@ -56,10 +56,12 @@
</div>
<%init>
-if ( ref( $session{'Actions'} ) eq 'ARRAY' ) {
- unshift @actions, @{ $session{'Actions'} };
+my $actions_pointer = $m->request_args->{'results'};
+
+if ($actions_pointer && ref( $session{'Actions'}->{$actions_pointer} ) eq 'ARRAY' ) {
+ unshift @actions, @{ $session{'Actions'}->{$actions_pointer} };
+ delete $session{'Actions'}->{$actions_pointer};
}
-delete $session{'Actions'};
# XXX: run callbacks per row really crazy idea
@actions =
Modified: rt/branches/3.8-TESTING/share/html/SelfService/Display.html
==============================================================================
--- rt/branches/3.8-TESTING/share/html/SelfService/Display.html (original)
+++ rt/branches/3.8-TESTING/share/html/SelfService/Display.html Thu Jun 12 20:40:50 2008
@@ -217,11 +217,10 @@
# 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.
- push @{ $session{"Actions"} ||= [] }, @results;
+ my $key = Digest::MD5::md5_hex(rand(1024));
+ push @{ $session{"Actions"}->{$key} ||= [] }, @results;
$session{'i'}++;
- RT::Interface::Web::Redirect(
- RT->Config->Get('WebURL') ."SelfService/Display.html?id=". $Ticket->id
- );
+ RT::Interface::Web::Redirect( RT->Config->Get('WebURL') ."SelfService/Display.html?id=". $Ticket->id."&results=".$key);
}
my $Transactions = $Ticket->Transactions;
Modified: rt/branches/3.8-TESTING/share/html/Ticket/Display.html
==============================================================================
--- rt/branches/3.8-TESTING/share/html/Ticket/Display.html (original)
+++ rt/branches/3.8-TESTING/share/html/Ticket/Display.html Thu Jun 12 20:40:50 2008
@@ -189,13 +189,15 @@
# This code does automatic redirection if any updates happen.
if (@Actions) {
- # We've done something, so we need to clear the decks to avoid
+
+ # 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.
- push @{ $session{"Actions"} ||= [] }, @Actions;
+ my $key = Digest::MD5::md5_hex( rand(1024) );
+ push @{ $session{"Actions"}->{$key} ||= [] }, @Actions;
$session{'i'}++;
+ RT::Interface::Web::Redirect( RT->Config->Get('WebURL') . "Ticket/Display.html?id=" . $TicketObj->id . "&results=" . $key );
- RT::Interface::Web::Redirect(RT->Config->Get('WebURL') ."Ticket/Display.html?id=".$TicketObj->id);
}
my $attachments = $m->comp('Elements/FindAttachments', Ticket => $TicketObj, Tickets => $Tickets);
Modified: rt/branches/3.8-TESTING/share/html/Ticket/Forward.html
==============================================================================
--- rt/branches/3.8-TESTING/share/html/Ticket/Forward.html (original)
+++ rt/branches/3.8-TESTING/share/html/Ticket/Forward.html Thu Jun 12 20:40:50 2008
@@ -98,10 +98,9 @@
if ( $ForwardAndReturn ) {
$session{'i'}++;
- push @{ $session{"Actions"} ||= [] }, @results;
- RT::Interface::Web::Redirect(
- RT->Config->Get('WebURL') ."Ticket/Display.html?id=". $id
- );
+ my $key = Digest::MD5::md5_hex(rand(1024));
+ push @{ $session{"Actions"}->{$key} ||= [] }, @results;
+ RT::Interface::Web::Redirect( RT->Config->Get('WebURL') ."Ticket/Display.html?id=". $id."&results=".$key);
}
}
More information about the Rt-commit
mailing list