From a845bd24895eccba89def66bc4fe8138247c3cca Mon Sep 17 00:00:00 2001 From: tonnesen Date: Tue, 5 Nov 2002 19:54:43 +0000 Subject: [PATCH] Modified opac search script to use itemtypesearchgroups table to generate class list. --- koha-tmpl/opac-tmpl/default/en/opac-search.tmpl | 2 +- opac/opac-search.pl | 13 ++++++++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/opac-tmpl/default/en/opac-search.tmpl b/koha-tmpl/opac-tmpl/default/en/opac-search.tmpl index 68cf782055..1ab7e075c1 100644 --- a/koha-tmpl/opac-tmpl/default/en/opac-search.tmpl +++ b/koha-tmpl/opac-tmpl/default/en/opac-search.tmpl @@ -39,7 +39,7 @@ type=radio name=ttype value=exact>Exact diff --git a/opac/opac-search.pl b/opac/opac-search.pl index 824190457d..129c794892 100755 --- a/opac/opac-search.pl +++ b/opac/opac-search.pl @@ -5,6 +5,16 @@ require Exporter; use C4::Output; use CGI; use C4::Auth; +use C4::Context; + +my $classlist=''; +my $dbh=C4::Context->dbh(); +my $sth=$dbh->prepare("select groupname,itemtypes from itemtypesearchgroups order by groupname"); +$sth->execute; +while (my ($groupname,$itemtypes) = $sth->fetchrow) { + $classlist.="