Bugzilla – Attachment 20824 Details for
Bug 10584
Hide OPAC biblio details if all items are hidden.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 10584 - Hide OPAC biblio details if all items are hidden
Bug-10584---Hide-OPAC-biblio-details-if-all-items-.patch (text/plain), 1.67 KB, created by
Kyle M Hall (khall)
on 2013-09-06 12:37:24 UTC
(
hide
)
Description:
Bug 10584 - Hide OPAC biblio details if all items are hidden
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2013-09-06 12:37:24 UTC
Size:
1.67 KB
patch
obsolete
>From 66d9c44918ef70f3e4df15db70bc21f5cb509916 Mon Sep 17 00:00:00 2001 >From: Mark Tompsett <mtompset@hotmail.com> >Date: Thu, 11 Jul 2013 23:13:42 -0400 >Subject: [PATCH] Bug 10584 - Hide OPAC biblio details if all items are hidden > >If there are items for a given biblio number, and they are all >hidden, then biblio needs to be hidden. If the biblio needs to >be hidden, this is done by setting the biblionumber to 0, which >triggers the same output as if the biblionumber does not exist. > >Signed-off-by: Srdjan <srdjan@catalyst.net.nz> >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >Passes koha-qa.pl, works as advertised. >--- > opac/opac-detail.pl | 13 ++++++++++++- > 1 files changed, 12 insertions(+), 1 deletions(-) > >diff --git a/opac/opac-detail.pl b/opac/opac-detail.pl >index d1f5d91..f06b535 100755 >--- a/opac/opac-detail.pl >+++ b/opac/opac-detail.pl >@@ -70,9 +70,20 @@ my ( $template, $borrowernumber, $cookie ) = get_template_and_user( > } > ); > >-my $biblionumber = $query->param('biblionumber') || $query->param('bib'); >+my $biblionumber = $query->param('biblionumber') || $query->param('bib') || 0; > $biblionumber = int($biblionumber); > >+my @itemsmatchingbiblionumber = GetItemsInfo($biblionumber); >+if (scalar @itemsmatchingbiblionumber >= 1) { >+ my @items2hide = GetHiddenItemnumbers(@itemsmatchingbiblionumber); >+ >+ if (scalar @items2hide == scalar @itemsmatchingbiblionumber ) { >+ # biblionumber=0 effectively hides the biblio record >+ # since there is no such biblionumber. >+ $biblionumber = 0; >+ } >+} >+ > my $record = GetMarcBiblio($biblionumber); > if ( ! $record ) { > print $query->redirect("/cgi-bin/koha/errors/404.pl"); # escape early >-- >1.7.2.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 10584
:
19614
|
19712
|
19720
|
19737
|
20824
|
20892
|
20893
|
21068
|
21073
|
21076