Bug 22034: Handle default framework for MARC view with framework
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Thu, 20 Dec 2018 22:55:46 +0000 (19:55 -0300)
committerFridolin Somers <fridolin.somers@biblibre.com>
Wed, 16 Jan 2019 08:19:04 +0000 (09:19 +0100)
To test:

- Create a record in any framework that is not default
- Search for the record in your catalog
- Switch to the MARC tab
- Change framework pull down to default on top
- Note the page reloads and the framework stay default
- Verify it works for other frameworks

Also test the "labeled MARC" view (you will need the pref viewLabeledMARC turned on)

Signed-off-by: Nazlı Çetin <nazli@devinim.com.tr>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 54e295e4c14e3d2b3959e3185a54447a9b90d945)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 270138aa678e858b835f65f5533e6b182e07ac76)

Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>
(cherry picked from commit 2c15a838be5a51b82cb866b261836b7586dfa6a2)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>

catalogue/MARCdetail.pl
catalogue/labeledMARCdetail.pl

index 7a5d951..aa8ca80 100755 (executable)
@@ -69,8 +69,7 @@ my $query        = new CGI;
 my $dbh          = C4::Context->dbh;
 my $biblionumber = $query->param('biblionumber');
 $biblionumber = HTML::Entities::encode($biblionumber);
-my $frameworkcode = $query->param('frameworkcode');
-$frameworkcode = GetFrameworkCode( $biblionumber ) unless ($frameworkcode);
+my $frameworkcode = $query->param('frameworkcode') // GetFrameworkCode( $biblionumber );
 my $popup        =
   $query->param('popup')
   ;    # if set to 1, then don't insert links, it's just to show the biblio
index d84c75f..8826b58 100755 (executable)
@@ -38,8 +38,7 @@ my $query        = new CGI;
 my $dbh          = C4::Context->dbh;
 my $biblionumber = $query->param('biblionumber');
 $biblionumber = HTML::Entities::encode($biblionumber);
-my $frameworkcode = $query->param('frameworkcode');
-$frameworkcode = GetFrameworkCode( $biblionumber ) unless ($frameworkcode);
+my $frameworkcode = $query->param('frameworkcode') // GetFrameworkCode( $biblionumber );
 my $popup        =
   $query->param('popup')
   ;    # if set to 1, then don't insert links, it's just to show the biblio