koha-cvs
[Top][All Lists]
Advanced

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

[Koha-cvs] CVS: koha/C4 Print.pm,1.3.2.7,1.3.2.8


From: Steve Tonnesen
Subject: [Koha-cvs] CVS: koha/C4 Print.pm,1.3.2.7,1.3.2.8
Date: Mon, 28 Oct 2002 10:24:27 -0800

Update of /cvsroot/koha/koha/C4
In directory usw-pr-cvs1:/tmp/cvs-serv16887

Modified Files:
      Tag: rel-1-2
        Print.pm 
Log Message:
Was loading 'printcirculationslips' parameter from config file instead of
system preferences.  Switched to using Context.pm to load system prefs.


Index: Print.pm
===================================================================
RCS file: /cvsroot/koha/koha/C4/Print.pm,v
retrieving revision 1.3.2.7
retrieving revision 1.3.2.8
diff -C2 -r1.3.2.7 -r1.3.2.8
*** Print.pm    24 Oct 2002 20:55:01 -0000      1.3.2.7
--- Print.pm    28 Oct 2002 18:24:23 -0000      1.3.2.8
***************
*** 23,28 ****
  #use C4::InterfaceCDK;
  
! # Database is only used for configfile, remove this once Context.pm is used
! use C4::Database;
  
  
--- 23,27 ----
  #use C4::InterfaceCDK;
  
! use C4::Context;
  
  
***************
*** 39,44 ****
    my ($env,$items,$borrower)address@hidden;
  
!   my $config=configfile();
!   (return) unless ($config->{printcirculationslips});
    my $file=time;
    my $queue = $env->{'queue'};
--- 38,42 ----
    my ($env,$items,$borrower)address@hidden;
  
!   (return) unless (C4::Context->preference('printcirculationslips'));
    my $file=time;
    my $queue = $env->{'queue'};
***************
*** 46,50 ****
      open (PRINTER,">/tmp/kohaiss");
    } else {  
!     open(PRINTER, "| lpr -P $queue") or die "Couldn't write to 
queue:$queue!\n";
    }  
    #open (FILE,">/tmp/$file");
--- 44,48 ----
      open (PRINTER,">/tmp/kohaiss");
    } else {  
!     open(PRINTER, "| lpr -P $queue >/dev/null") or die "Couldn't write to 
queue:$queue!\n";
    }  
    #open (FILE,">/tmp/$file");
***************
*** 78,87 ****
    my $file=time;
    my $printer = $env->{'printer'};
!   my $config=configfile();
!   (return) unless ($config->{'printreserveslips'});
    if ($printer eq "" || $printer eq 'nulllp') {
      open (PRINTER,">>/tmp/kohares");
    } else {
!     open (PRINTER, "| lpr -P $printer") or die "Couldn't write to queue:$!\n";
    }
    my @da = localtime(time());
--- 76,84 ----
    my $file=time;
    my $printer = $env->{'printer'};
!   (return) unless (C4::Context->preference('printreserveslips'));
    if ($printer eq "" || $printer eq 'nulllp') {
      open (PRINTER,">>/tmp/kohares");
    } else {
!     open (PRINTER, "| lpr -P $printer >/dev/null") or die "Couldn't write to 
queue:$!\n";
    }
    my @da = localtime(time());
***************
*** 117,128 ****
  
  sub printslip {
    my($env, $slip)address@hidden;
    my $printer = $env->{'printer'};
!   my $config=configfile();
!   (return) unless ($config->{printcirculationslips});
    if ($printer eq "" || $printer eq 'nulllp') {
      open (PRINTER,">/tmp/kohares");
    } else {
!     open (PRINTER, "| lpr -P $printer") or die "Couldn't write to queue:$!\n";
    }
    print PRINTER $slip;
--- 114,125 ----
  
  sub printslip {
+       warn "PRINTSLIP\n";
    my($env, $slip)address@hidden;
    my $printer = $env->{'printer'};
!   (return) unless (C4::Context->preference('printcirculationslips'));
    if ($printer eq "" || $printer eq 'nulllp') {
      open (PRINTER,">/tmp/kohares");
    } else {
!     open (PRINTER, "| lpr -P $printer >/dev/null") or die "Couldn't write to 
queue:$!\n";
    }
    print PRINTER $slip;




reply via email to

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