[Koha-patches] [PATCH] 4513: Resetting framework to Default seems impossible

Marcel de Rooy M.de.Rooy at rijksmuseum.nl
Mon May 16 14:48:08 CEST 2011


Test this patch by opening a biblio saved in e.g. books framework.
Change the framework in Staff Cataloging back to Default and save.
Open the biblio again and check if it really has been set to Default.
---
 cataloguing/addbiblio.pl |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/cataloguing/addbiblio.pl b/cataloguing/addbiblio.pl
index 7e146c0..03d9063 100755
--- a/cataloguing/addbiblio.pl
+++ b/cataloguing/addbiblio.pl
@@ -866,6 +866,7 @@ foreach my $thisframeworkcode ( keys %$frameworks ) {
 	push @frameworkcodeloop, \%row;
 } 
 $template->param( frameworkcodeloop => \@frameworkcodeloop,
+	frameworkcode => $frameworkcode||"Default",
 	breedingid => $breedingid );
 
 # ++ Global
@@ -963,6 +964,7 @@ if ( $op eq "addbiblio" ) {
           $template->param( title => $record->title() ) if ($record ne "-1" && C4::Context->preference('marcflavour') eq "usmarc");
           $template->param(
             popup => $mode,
+            frameworkcode => $frameworkcode||'Default',
             itemtype => $frameworkcode,
           );
           output_html_with_http_headers $input, $cookie, $template->output;
@@ -1027,7 +1029,7 @@ if (C4::Context->preference("marcflavour") eq "MARC21"){
 
 $template->param(
     popup => $mode,
-    frameworkcode => $frameworkcode,
+    frameworkcode => $frameworkcode||'Default',
     itemtype => $frameworkcode,
     borrowernumber => $loggedinuser
 );
-- 
1.6.0.6



More information about the Koha-patches mailing list