From e4bf83e4b429a0368d8d047bef3f4318f572d8b1 Mon Sep 17 00:00:00 2001
From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Date: Thu, 22 Mar 2012 11:03:19 +0100
Subject: [PATCH] 7788 Followup: GetShelf call in addbybiblio script corrected
Content-Type: text/plain; charset="utf-8"

Patch resolves incorrect call to GetShelf in opac and staff. It was and is harmless, because the singlecategory variable was not really used (the category$x param was ignored in the template). Just a cleanup operation.
---
 opac/opac-addbybiblionumber.pl      |    3 +--
 virtualshelves/addbybiblionumber.pl |    3 +--
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/opac/opac-addbybiblionumber.pl b/opac/opac-addbybiblionumber.pl
index bea130d..29ad0a8 100755
--- a/opac/opac-addbybiblionumber.pl
+++ b/opac/opac-addbybiblionumber.pl
@@ -115,12 +115,11 @@ sub HandleShelfNumber {
 sub HandleSelectedShelf {
     if($authorized= ShelfPossibleAction( $loggedinuser, $selectedshelf, 'add')){
         #adding to specific shelf
-        my ($singleshelf, $singleshelfname, $singlecategory)= GetShelf($query->param('selectedshelf'));
+        my ($singleshelf, $singleshelfname)= GetShelf($query->param('selectedshelf'));
         $template->param(
         singleshelf               => 1,
         shelfnumber               => $singleshelf,
         shelfname                 => $singleshelfname,
-        "category$singlecategory" => 1
         );
     }
 }
diff --git a/virtualshelves/addbybiblionumber.pl b/virtualshelves/addbybiblionumber.pl
index 0927622..8d939ee 100755
--- a/virtualshelves/addbybiblionumber.pl
+++ b/virtualshelves/addbybiblionumber.pl
@@ -161,12 +161,11 @@ sub HandleShelfNumber {
 sub HandleSelectedShelf {
     if($authorized= ShelfPossibleAction( $loggedinuser, $shelfnumber, 'add')){
         #confirm adding to specific shelf
-        my ($singleshelf, $singleshelfname, $singlecategory)= GetShelf($shelfnumber);
+        my ($singleshelf, $singleshelfname)= GetShelf($shelfnumber);
         $template->param(
         singleshelf               => 1,
         shelfnumber               => $singleshelf,
         shelfname                 => $singleshelfname,
-        "category$singlecategory" => 1
         );
     }
     else {
-- 
1.6.0.6