X-Git-Url: http://koha-dev.rot13.org:8081/gitweb/?a=blobdiff_plain;f=opac%2Fopac-topissues.pl;h=05b7a278d1c4ee17d8e46acf7a4c7c2c70042a27;hb=d91bb113f04149c020c851a904de69619b6e9dd8;hp=6899215cc7cb9cd40d44e074faf8cd1e571ca3fd;hpb=16f1fffdd1f5d1c97db0bf664f83496864b7e24d;p=koha_fer diff --git a/opac/opac-topissues.pl b/opac/opac-topissues.pl index 6899215cc7..05b7a278d1 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,