koha-cvs
[Top][All Lists]
Advanced

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

[Koha-cvs] CVS: koha/marc MARCdetail.pl,1.2,1.3


From: Andrew Arensburger
Subject: [Koha-cvs] CVS: koha/marc MARCdetail.pl,1.2,1.3
Date: Sat, 05 Oct 2002 03:06:10 -0700

Update of /cvsroot/koha/koha/marc
In directory usw-pr-cvs1:/tmp/cvs-serv28208/marc

Modified Files:
        MARCdetail.pl 
Log Message:
Merged with arensb-context branch: use C4::Context->dbh instead of
&C4Connect, and generally prefer C4::Context over C4::Database.


Index: MARCdetail.pl
===================================================================
RCS file: /cvsroot/koha/koha/marc/MARCdetail.pl,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** MARCdetail.pl       14 Aug 2002 18:12:53 -0000      1.2
--- MARCdetail.pl       5 Oct 2002 10:06:07 -0000       1.3
***************
*** 18,25 ****
  # Suite 330, Boston, MA  02111-1307 USA
  
- use HTML::Template;
  use strict;
! require Exporter;
! use C4::Database;
  use C4::Output;  # contains picktemplate
  use CGI;
--- 18,25 ----
  # Suite 330, Boston, MA  02111-1307 USA
  
  use strict;
! use HTML::Template;
! require Exporter;     # FIXME - Is this really necessary?
! use C4::Context;
  use C4::Output;  # contains picktemplate
  use CGI;
***************
*** 30,56 ****
   
  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;
-     }
- }
- 
      
  my $biblionumber=$query->param('bib');
--- 30,33 ----
***************
*** 59,64 ****
  #print STDERR "BIB : $biblionumber // TAG : $tag\n";
  if (! defined $biblionumber) {
!     my $includes=$configfile{'includes'};
!     ($includes) || ($includes="/usr/local/www/hdl/htdocs/includes");
      my $templatebase="MARCdetailbiblioselect.tmpl";
      my $theme=picktemplate($includes, $templatebase);
--- 36,41 ----
  #print STDERR "BIB : $biblionumber // TAG : $tag\n";
  if (! defined $biblionumber) {
!     my $includes = C4::Context->config('includes') ||
!       "/usr/local/www/hdl/htdocs/includes";
      my $templatebase="MARCdetailbiblioselect.tmpl";
      my $theme=picktemplate($includes, $templatebase);
***************
*** 72,82 ****
  sub showmarcrecord {
      my ($biblionumber,$tag) = @_;
!     my $dbh=&C4Connect;
      my $sth=$dbh->prepare("select liblibrarian from marc_subfield_structure 
where tagfield=? and tagsubfield=?");
      my $record =MARCgetbiblio($dbh,$biblionumber);
  # open template
      my $templatebase="catalogue/MARCdetail.tmpl";
!     my $includes=$configfile{'includes'};
!     ($includes) || ($includes="/usr/local/www/hdl/htdocs/includes");
      my $theme=picktemplate($includes, $templatebase);
      my $template = HTML::Template->new(filename => 
"$includes/templates/$theme/$templatebase", die_on_bad_params => 0, path => 
[$includes]);
--- 49,59 ----
  sub showmarcrecord {
      my ($biblionumber,$tag) = @_;
!     my $dbh = C4::Context->dbh;
      my $sth=$dbh->prepare("select liblibrarian from marc_subfield_structure 
where tagfield=? and tagsubfield=?");
      my $record =MARCgetbiblio($dbh,$biblionumber);
  # open template
      my $templatebase="catalogue/MARCdetail.tmpl";
!     my $includes = C4::Context->config('includes') ||
!       "/usr/local/www/hdl/htdocs/includes";
      my $theme=picktemplate($includes, $templatebase);
      my $template = HTML::Template->new(filename => 
"$includes/templates/$theme/$templatebase", die_on_bad_params => 0, path => 
[$includes]);




reply via email to

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