[Koha-cvs] CVS: koha/tmpl opacsearch.pl,1.1.2.1,1.1.2.2

Finlay Thompson finlayt at users.sourceforge.net
Thu Sep 12 06:42:09 CEST 2002


Update of /cvsroot/koha/koha/tmpl
In directory usw-pr-cvs1:/tmp/cvs-serv1038/tmpl

Modified Files:
      Tag: rel-1-2
	opacsearch.pl 
Log Message:

changed to use the new gettemplate method.


Index: opacsearch.pl
===================================================================
RCS file: /cvsroot/koha/koha/tmpl/Attic/opacsearch.pl,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -C2 -r1.1.2.1 -r1.1.2.2
*** opacsearch.pl	11 Sep 2002 01:58:20 -0000	1.1.2.1
--- opacsearch.pl	12 Sep 2002 04:42:07 -0000	1.1.2.2
***************
*** 1,7 ****
  #!/usr/bin/perl
- use HTML::Template;
  use strict;
  require Exporter;
! use C4::Database;
  use C4::Output;  # contains picktemplate
  use CGI;
--- 1,6 ----
  #!/usr/bin/perl
  use strict;
  require Exporter;
! 
  use C4::Output;  # contains picktemplate
  use CGI;
***************
*** 11,37 ****
  #my ($loggedinuser, $cookie, $sessionID) = checkauth($query);
  
! 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;
!  }
! }
! 
! my $includes=$configfile{'includes'};
! ($includes) || ($includes="/usr/local/www/hdl/htdocs/includes");
! my $templatebase="opac/opac-search.tmpl";
! my $theme=picktemplate($includes, $templatebase);
! 
! my $template = HTML::Template->new(filename => "$includes/templates/$theme/$templatebase", die_on_bad_params => 0, path => [$includes]);
  
  #$template->param(SITE_RESULTS => $sitearray);
--- 10,14 ----
  #my ($loggedinuser, $cookie, $sessionID) = checkauth($query);
  
! my $template = gettemplate("opac-search.tmpl", "opac");
  
  #$template->param(SITE_RESULTS => $sitearray);





More information about the Koha-cvs mailing list