diff --git a/C4/Circulation/Circ2.pm b/C4/Circulation/Circ2.pm index 22cf51e205..8326bbca42 100755 --- a/C4/Circulation/Circ2.pm +++ b/C4/Circulation/Circ2.pm @@ -1512,6 +1512,7 @@ sub getissues { biblio.author AS author, biblioitems.dewey AS dewey, itemtypes.description AS itemtype, + itemtypes.publictype AS publictype, biblioitems.subclass AS subclass FROM issues,items,biblioitems,biblio, itemtypes WHERE issues.borrowernumber = ? diff --git a/C4/Output.pm b/C4/Output.pm index 2d080a99ea..a35b18b7ee 100644 --- a/C4/Output.pm +++ b/C4/Output.pm @@ -30,7 +30,7 @@ require Exporter; use HTML::Template; use C4::Database; use C4::Koha; -use C4::Auth; # checkauth, getborrowernumber. + use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS); @@ -119,10 +119,11 @@ sub gettemplate { my ($theme, $lang) = themelanguage($htdocs, $tmplbase); - my $template = HTML::Template->new(filename => "$htdocs/$theme/$lang/$tmplbase", - die_on_bad_params => 0, - global_vars => 1, - path => ["$htdocs/$theme/$lang/includes"]); + my $template = HTML::Template->new(filename => "$htdocs/$theme/$lang/$tmplbase", + die_on_bad_params => 0, + global_vars => 1, + debug => 0, + path => ["$htdocs/$theme/$lang/includes"]); $template->param(themelang => "/$theme/$lang"); return $template; diff --git a/C4/Reserves2.pm b/C4/Reserves2.pm index 77fbabfd1f..a83d4f6745 100755 --- a/C4/Reserves2.pm +++ b/C4/Reserves2.pm @@ -38,8 +38,8 @@ $VERSION = 0.01; sub FindReserves { my ($bib,$bor)=@_; my $dbh=C4Connect; - my $query="SELECT *,reserves.branchcode,biblio.title AS btitle - FROM reserves,borrowers,biblio "; + my $query="SELECT *,reserves.branchcode AS branchcode, biblio.title AS btitle + FROM borrowers,reserves,biblio "; if ($bib){ $bib = $dbh->quote($bib); if ($bor ne ''){ @@ -461,13 +461,14 @@ sub getreservetitle { my ($biblio,$bor,$date,$timestamp)=@_; my $dbh=C4Connect; my $query = "SELECT biblioitems.volumeddesc AS volumeddesc, - biblioitems.itemtype AS itemtype - FROM reserveconstraints,biblioitems + itemtypes.description AS itemtype, + itemtypes.publictype AS publictype + FROM reserveconstraints,biblioitems,itemtypes WHERE reserveconstraints.biblioitemnumber = biblioitems.biblioitemnumber + AND biblioitems.itemtype = itemtypes.itemtype AND reserveconstraints.biblionumber = $biblio AND reserveconstraints.borrowernumber = $bor - AND reserveconstraints.reservedate = '$date' - AND reserveconstraints.timestamp = $timestamp"; + AND reserveconstraints.reservedate = '$date'"; my $sth=$dbh->prepare($query); $sth->execute; my $data=$sth->fetchrow_hashref;