koha-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Koha-cvs] CVS: koha/tmpl opacmain.pl,1.1.2.2,1.1.2.3


From: Finlay Thompson
Subject: [Koha-cvs] CVS: koha/tmpl opacmain.pl,1.1.2.2,1.1.2.3
Date: Wed, 11 Sep 2002 15:11:19 -0700

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

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

A little more refactoring....


Index: opacmain.pl
===================================================================
RCS file: /cvsroot/koha/koha/tmpl/Attic/opacmain.pl,v
retrieving revision 1.1.2.2
retrieving revision 1.1.2.3
diff -C2 -r1.1.2.2 -r1.1.2.3
*** opacmain.pl 11 Sep 2002 03:56:26 -0000      1.1.2.2
--- opacmain.pl 11 Sep 2002 22:11:17 -0000      1.1.2.3
***************
*** 1,34 ****
  #!/usr/bin/perl
! use HTML::Template;
  use strict;
  require Exporter;
! use C4::Database;
! use C4::Output;  # contains picktemplate
! use CGI;
! use C4::Auth;
  
  my $query = new CGI;
  #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 $htdocs=$configfile{'opachtdocs'};
! my $templatebase="opac-main.tmpl";
! my ($theme, $lang)=themelanguage($htdocs, $templatebase);
  
  my $template = HTML::Template->new(filename => 
"$htdocs/$theme/$lang/$templatebase", die_on_bad_params => 0, path => 
["$htdocs/includes"]);
--- 1,21 ----
  #!/usr/bin/perl
! use HTML::Template;   # new Template
  use strict;
  require Exporter;
! use C4::Database;     # configfile
! use C4::Output;       # themelanguage
! use CGI;              # new CGI
! use C4::Auth;         # checkauth
  
  my $query = new CGI;
  #my ($loggedinuser, $cookie, $sessionID) = checkauth($query);
  
! my $configfile = configfile();
  
! my $htdocs = $configfile->{'opachtdocs'};
! 
! my $templatebase = "opac-main.tmpl";
! 
! my ($theme, $lang) = themelanguage($htdocs, $templatebase);
  
  my $template = HTML::Template->new(filename => 
"$htdocs/$theme/$lang/$templatebase", die_on_bad_params => 0, path => 
["$htdocs/includes"]);




reply via email to

[Prev in Thread] Current Thread [Next in Thread]