From 5bb0978f1bff9fc1b04e072ea3bd190a32db731b Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 13 Sep 2016 15:03:55 +0100 Subject: [PATCH] Bug 16358: Do not redirect to the editor when deleting records MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit The "Delete record" button goes to addbiblio.pl?op=delete, which incorrectly redirects to Rancor when selected. Test plan: 0/ Enable EnableAdvancedCatalogingEditor 1/ Edit a record 2/ Switch to the Advanced editor 3/ click on "View the record" 4/ Delete the record => Without this patch you are redirected to the editor => With this patch you are redirected to the advanced search Signed-off-by: Mirko Tietgen Signed-off-by: Kyle M Hall Signed-off-by: Brendan Gallagher (cherry picked from commit ba8ee98e1bb3b18f579c0b122b14d43e88cda2c8) Signed-off-by: Frédéric Demians (cherry picked from commit 537d7d9fa4650aa35b8e20cbaf0cad7f7a4d2ba4) Signed-off-by: Julian Maurice --- cataloguing/addbiblio.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cataloguing/addbiblio.pl b/cataloguing/addbiblio.pl index d366209ac7..7cddb2f6e1 100755 --- a/cataloguing/addbiblio.pl +++ b/cataloguing/addbiblio.pl @@ -741,11 +741,12 @@ if ($frameworkcode eq 'FA'){ 'stickyduedate' => $fa_stickyduedate, 'duedatespec' => $fa_duedatespec, ); -} elsif ( C4::Context->preference('EnableAdvancedCatalogingEditor') && $input->cookie( 'catalogue_editor_' . $loggedinuser ) eq 'advanced' && !$breedingid ) { +} elsif ( $op ne "delete" && C4::Context->preference('EnableAdvancedCatalogingEditor') && $input->cookie( 'catalogue_editor_' . $loggedinuser ) eq 'advanced' && !$breedingid ) { # Only use the advanced editor for non-fast-cataloging. # breedingid is not handled because those would only come off a Z39.50 # search initiated by the basic editor. print $input->redirect( '/cgi-bin/koha/cataloguing/editor.pl' . ( $biblionumber ? ( '#catalog/' . $biblionumber ) : '' ) ); + exit; } -- 2.39.5