[libcatalyst-model-cdbi-crud-perl] 01/02: add patch from Joachim Breitner adding a redirect after after a change to avoid browser fback/forward weirdness

Damyan Ivanov dmn at moszumanska.debian.org
Sun May 18 15:40:02 UTC 2014


This is an automated email from the git hooks/post-receive script.

dmn pushed a commit to branch master
in repository libcatalyst-model-cdbi-crud-perl.

commit ceec96f3f439f7759e7e902aa05f16e2440bae34
Author: Damyan Ivanov <dmn at debian.org>
Date:   Sun May 18 15:32:44 2014 +0000

    add patch from Joachim Breitner adding a redirect after after a change to avoid browser fback/forward weirdness
    
    Closes: #330387
---
 debian/patches/redirect-after-change.patch | 26 ++++++++++++++++++++++++++
 debian/patches/series                      |  1 +
 2 files changed, 27 insertions(+)

diff --git a/debian/patches/redirect-after-change.patch b/debian/patches/redirect-after-change.patch
new file mode 100644
index 0000000..b3000f4
--- /dev/null
+++ b/debian/patches/redirect-after-change.patch
@@ -0,0 +1,26 @@
+Description: redirect the user to the list after addition or deletion
+ This way there is no weirdness with browser's back/forward actions
+Author: Joachim Breitner <nomeata at debian.org>
+Bug: http://rt.cpan.org/Public/Bug/Display.html?id=49429
+Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=330387
+
+--- a/CRUD.pm
++++ b/CRUD.pm
+@@ -75,7 +75,7 @@ Deletes a L<Class::DBI> object.
+ sub destroy {
+     my ( $self, $c ) = @_;
+     $c->stash->{item}->delete;
+-    $c->stash->{template} = 'list';
++    $c->res->redirect('../list');
+ }
+ 
+ =head3 do_add
+@@ -87,7 +87,7 @@ Creates a new L<Class::DBI> object from
+ sub do_add {
+     my ( $self, $c ) = @_;
+     $self->create_from_form( $c->form );
+-    $c->stash->{template} = 'list';
++    $c->res->redirect('list');
+ }
+ 
+ =head3 do_edit
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..c4d64fc
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+redirect-after-change.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libcatalyst-model-cdbi-crud-perl.git



More information about the Pkg-perl-cvs-commits mailing list