Bugzilla – Attachment 6849 Details for
Bug 6947
OPAC top-issues doesn't respect item-level itypes
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[SIGNED-OFF] Bug 6947 : opac-topissues.pl wasn't respecting item live itemtypes
SIGNED-OFF-Bug-6947--opac-topissuespl-wasnt-respec.patch (text/plain), 1.54 KB, created by
Katrin Fischer
on 2011-12-18 07:44:55 UTC
(
hide
)
Description:
[SIGNED-OFF] Bug 6947 : opac-topissues.pl wasn't respecting item live itemtypes
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2011-12-18 07:44:55 UTC
Size:
1.54 KB
patch
obsolete
>From 80071873d95a8cb77bd0645a4a427dae11eecb95 Mon Sep 17 00:00:00 2001 >From: Chris Cormack <chrisc@catalyst.net.nz> >Date: Sat, 29 Oct 2011 08:49:20 +1300 >Subject: [PATCH] [SIGNED-OFF] Bug 6947 : opac-topissues.pl wasn't respecting > item live itemtypes > >Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> >The search was only looking for bib level itypes independent >from the settings for item-level_itypes. > >After patch the system preference setting is respected >and search works accordingly. >--- > opac/opac-topissues.pl | 10 +++++++++- > 1 files changed, 9 insertions(+), 1 deletions(-) > >diff --git a/opac/opac-topissues.pl b/opac/opac-topissues.pl >index 6899215..05b7a27 100755 >--- a/opac/opac-topissues.pl >+++ b/opac/opac-topissues.pl >@@ -2,6 +2,7 @@ > > > # Copyright 2000-2002 Katipo Communications >+# Parts Copyright Catalyst IT 2011 > # > # This file is part of Koha. > # >@@ -83,7 +84,14 @@ if($advanced_search_types eq 'ccode'){ > "; > $template->param(ccodesearch => 1); > }else{ >- $whereclause .= ' AND biblioitems.itemtype='.$dbh->quote($itemtype) if $itemtype; >+ if ($itemtype){ >+ if (C4::Context->preference('item-level_itypes')){ >+ $whereclause .= ' AND items.itype = ' . $dbh->quote($itemtype); >+ } >+ else { >+ $whereclause .= ' AND biblioitems.itemtype='.$dbh->quote($itemtype); >+ } >+ } > $query = "SELECT datecreated, biblio.biblionumber, title, > author, sum( items.issues ) AS tot, biblioitems.itemtype, > biblioitems.publishercode,biblioitems.publicationyear, >-- >1.7.5.4
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 6947
:
6104
| 6849