[Koha-cvs] CVS: koha/html-template search.pl,1.17,1.17.2.1

Andrew Arensburger arensb at users.sourceforge.net
Fri Oct 4 04:53:23 CEST 2002


Update of /cvsroot/koha/koha/html-template
In directory usw-pr-cvs1:/tmp/cvs-serv26335

Modified Files:
      Tag: arensb-context
	search.pl 
Log Message:
Use C4::Connect instead of C4::Database, C4::Connect->dbh instead
C4Connect.
Removed old code for reading /etc/koha.conf.


Index: search.pl
===================================================================
RCS file: /cvsroot/koha/koha/html-template/search.pl,v
retrieving revision 1.17
retrieving revision 1.17.2.1
diff -C2 -r1.17 -r1.17.2.1
*** search.pl	14 Aug 2002 18:12:53 -0000	1.17
--- search.pl	4 Oct 2002 02:53:21 -0000	1.17.2.1
***************
*** 20,25 ****
  use HTML::Template;
  use strict;
! require Exporter;
! use C4::Database;
  use CGI;
  use C4::Search;
--- 20,25 ----
  use HTML::Template;
  use strict;
! require Exporter;	# FIXME - Is this really needed?
! use C4::Context;
  use CGI;
  use C4::Search;
***************
*** 28,58 ****
  my $query=new CGI;
  
! 
! my $language='french';
! 
! 
! my %configfile;
! open (KC, "/etc/koha.conf");
! while (<KC>) {
!  chomp;
!  (next) if (/^\s*#/);
!  if (/(.*)\s*=\s*(.*)/) {
!    my $variable=$1;
!    my $value=$2;
!    # Clean up white space at beginning and end
!    $variable=~s/^\s*//g;
!    $variable=~s/\s*$//g;
!    $value=~s/^\s*//g;
!    $value=~s/\s*$//g;
!    $configfile{$variable}=$value;
!  }
! }
! #print $query->header;
! 
! my $includes=$configfile{'includes'};
! ($includes) || ($includes="/usr/local/www/hdl/htdocs/includes");
  my $templatebase="catalogue/searchresults.tmpl";
! my $startfrom=$query->param('startfrom');
! ($startfrom) || ($startfrom=0);
  my $theme=picktemplate($includes, $templatebase);
  
--- 28,35 ----
  my $query=new CGI;
  
! my $includes = C4::Context->config('includes') ||
! 	"/usr/local/www/hdl/htdocs/includes";
  my $templatebase="catalogue/searchresults.tmpl";
! my $startfrom=$query->param('startfrom') || 0;
  my $theme=picktemplate($includes, $templatebase);
  
***************
*** 71,74 ****
--- 48,54 ----
  # get all the search variables
  # we assume that C4::Search will validate these values for us
+ # FIXME - This looks like it could go inside a
+ #	foreach my $term (qw(keyword subject author ...))
+ # loop.
  my %search;
  my $keyword=$query->param('keyword');
***************
*** 89,93 ****
  $search{'class'}=$class;
  my $dewey=$query->param('dewey');
! $search{'dewey'};
  my $branch=$query->param('branch');
  $search{'branch'}=$branch;
--- 69,73 ----
  $search{'class'}=$class;
  my $dewey=$query->param('dewey');
! $search{'dewey'};	# FIXME - Was this supposed to be $search{'dewey'} = $dewey ?
  my $branch=$query->param('branch');
  $search{'branch'}=$branch;





More information about the Koha-cvs mailing list