From 2dd58a43695f2a6eb0b5bbdaaea1c6bd2a3f8cab Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Fri, 5 Feb 2010 10:45:10 -0500 Subject: [PATCH] Fix for Bug 4121, Cataloging record modification should obey IntranetBiblioDefaultView pref - Re-used redirect logic found in search.pl Signed-off-by: Galen Charlton --- cataloguing/addbiblio.pl | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/cataloguing/addbiblio.pl b/cataloguing/addbiblio.pl index d519aed16c..845ee855a8 100755 --- a/cataloguing/addbiblio.pl +++ b/cataloguing/addbiblio.pl @@ -936,9 +936,17 @@ if ( $op eq "addbiblio" ) { exit; } elsif($is_a_modif){ - print $input->redirect( - "/cgi-bin/koha/catalogue/MARCdetail.pl?biblionumber=$biblionumber&frameworkcode=$frameworkcode" - ); + my $defaultview = C4::Context->preference('IntranetBiblioDefaultView'); + my $views = { C4::Search::enabled_staff_search_views }; + if ($defaultview eq 'isbd' && $views->{can_view_ISBD}) { + print $input->redirect("/cgi-bin/koha/catalogue/ISBDdetail.pl?biblionumber=$biblionumber"); + } elsif ($defaultview eq 'marc' && $views->{can_view_MARC}) { + print $input->redirect("/cgi-bin/koha/catalogue/MARCdetail.pl?biblionumber=$biblionumber&frameworkcode=$frameworkcode"); + } elsif ($defaultview eq 'labeled_marc' && $views->{can_view_labeledMARC}) { + print $input->redirect("/cgi-bin/koha/catalogue/labeledMARCdetail.pl?biblionumber=$biblionumber"); + } else { + print $input->redirect("/cgi-bin/koha/catalogue/detail.pl?biblionumber=$biblionumber"); + } exit; }else { -- 2.39.5