From 9eeb45b3e33504fe590a1a3dd8d4fac30110c756 Mon Sep 17 00:00:00 2001 From: finlayt Date: Wed, 18 Sep 2002 07:53:42 +0000 Subject: [PATCH] fixing up few loose ends. Also made opac-searchresults.pl use only on tmplate: opac-searchresults.tmpl --- opac/opac-detail.pl | 10 +++++----- opac/opac-search.pl | 5 ++--- opac/opac-searchresults.pl | 12 +++++++----- 3 files changed, 14 insertions(+), 13 deletions(-) diff --git a/opac/opac-detail.pl b/opac/opac-detail.pl index e588530249..e3d95d63bc 100755 --- a/opac/opac-detail.pl +++ b/opac/opac-detail.pl @@ -10,15 +10,15 @@ my $query=new CGI; my ($loggedinuser, $cookie, $sessionID) = checkauth($query, 1); -my $template = gettemplate ("detail.tmpl", "opac"); +my $template = gettemplate ("opac-detail.tmpl", "opac"); my $biblionumber=$query->param('bib'); -my $type='intra'; + # change back when ive fixed request.pl -my @items = ItemInfo(undef, $biblionumber, $type); -my $dat=bibdata($biblionumber); -my ($authorcount, $addauthor)= &addauthor($biblionumber); +my @items = &ItemInfo(undef, $biblionumber, 'opac'); +my $dat = &bibdata($biblionumber); +my ($authorcount, $addauthor) = &addauthor($biblionumber); my ($webbiblioitemcount, @webbiblioitems) = &getwebbiblioitems($biblionumber); my ($websitecount, @websites) = &getwebsites($biblionumber); diff --git a/opac/opac-search.pl b/opac/opac-search.pl index 29faa2c4aa..a9927d8bf5 100755 --- a/opac/opac-search.pl +++ b/opac/opac-search.pl @@ -2,14 +2,13 @@ use strict; require Exporter; -use C4::Output; # contains picktemplate +use C4::Output; use CGI; use C4::Auth; my $query = new CGI; -#my ($loggedinuser, $cookie, $sessionID) = checkauth($query); +my ($loggedinuser, $cookie, $sessionID) = checkauth($query ,1); my $template = gettemplate("opac-search.tmpl", "opac"); -#$template->param(SITE_RESULTS => $sitearray); print "Content-Type: text/html\n\n", $template->output; diff --git a/opac/opac-searchresults.pl b/opac/opac-searchresults.pl index 147f63647f..2419d71b83 100755 --- a/opac/opac-searchresults.pl +++ b/opac/opac-searchresults.pl @@ -11,13 +11,15 @@ my $query=new CGI; my ($loggedinuser, $cookie, $sessionID) = checkauth($query, 1); -my $template; +my $template = gettemplate ("opac-searchresults.tmpl", "opac"); + + + my $subject=$query->param('subject'); -# if its a subject we need to use the subject.tmpl + + if ($subject) { - $template = gettemplate ("subject.tmpl", "opac"); -} else { - $template = gettemplate ("searchresults.tmpl", "opac"); + $template->param(subjectsearch => $subject); } # get all the search variables -- 2.39.5