[Koha-cvs] CVS: koha/opac opac-search.pl,1.1.2.5,1.1.2.6

Steve Tonnesen tonnesen at users.sourceforge.net
Tue Nov 5 20:54:46 CET 2002


Update of /cvsroot/koha/koha/opac
In directory usw-pr-cvs1:/tmp/cvs-serv29223/opac

Modified Files:
      Tag: rel-1-2
	opac-search.pl 
Log Message:
Modified opac search script to use itemtypesearchgroups table to generate class
list.


Index: opac-search.pl
===================================================================
RCS file: /cvsroot/koha/koha/opac/opac-search.pl,v
retrieving revision 1.1.2.5
retrieving revision 1.1.2.6
diff -C2 -r1.1.2.5 -r1.1.2.6
*** opac-search.pl	28 Oct 2002 19:56:09 -0000	1.1.2.5
--- opac-search.pl	5 Nov 2002 19:54:43 -0000	1.1.2.6
***************
*** 6,9 ****
--- 6,19 ----
  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.="<option value=\"$itemtypes\">$groupname\n";
+ }
+ 
  
  my $query = new CGI;
***************
*** 16,20 ****
  my $template = gettemplate("opac-search.tmpl", "opac");
  
! $template->param(loggedinuser => $loggedinuser);
  
  print "Content-Type: text/html\n\n", $template->output;
--- 26,31 ----
  my $template = gettemplate("opac-search.tmpl", "opac");
  
! $template->param(loggedinuser => $loggedinuser,
! 		classlist => $classlist);
  
  print "Content-Type: text/html\n\n", $template->output;





More information about the Koha-cvs mailing list