koha-cvs
[Top][All Lists]
Advanced

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

[Koha-cvs] CVS: koha loadmodules.pl,1.4,1.5


From: Andrew Arensburger
Subject: [Koha-cvs] CVS: koha loadmodules.pl,1.4,1.5
Date: Sat, 05 Oct 2002 16:56:15 -0700

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

Modified Files:
        loadmodules.pl 
Log Message:
Use C4::Context->preference, rather than getting all system
preferences and picking out only what's needed.


Index: loadmodules.pl
===================================================================
RCS file: /cvsroot/koha/koha/loadmodules.pl,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** loadmodules.pl      14 Aug 2002 18:12:51 -0000      1.4
--- loadmodules.pl      5 Oct 2002 23:56:13 -0000       1.5
***************
*** 23,26 ****
--- 23,27 ----
  # Suite 330, Boston, MA  02111-1307 USA
  
+ use C4::Context;
  use C4::Acquisitions;
  use C4::Biblio;
***************
*** 38,50 ****
  
  sub acquisitions {
!     # FIXME
!     # instead of getting a hash, then reading/writing to it at least twice 
!     # and up to four times, maybe this should be a different function -
!     # areAquisitionsSimple() which returns a boolean
!     my %systemprefs=systemprefs();
!     ($systemprefs{'acquisitions'}) || ($systemprefs{'acquisitions'}='normal');
!     if ($systemprefs{'acquisitions'} eq 'simple') {
        print $input->redirect("/cgi-bin/koha/acqui.simple/addbooks.pl");
!     } elsif ($systemprefs{'acquisitions'} eq 'normal') {
        print $input ->redirect("/acquisitions");
      } else {
--- 39,51 ----
  
  sub acquisitions {
!     my $aq_type = C4::Context->preference("acquisitions") || "normal";
!               # Get the acquisition preference. This should be:
!               #       "simple" - minimal information required
!               #       "normal" - full information required
!               #       other - Same as "normal"
! 
!     if ($aq_type eq 'simple') {
        print $input->redirect("/cgi-bin/koha/acqui.simple/addbooks.pl");
!     } elsif ($aq_type eq 'normal') {
        print $input ->redirect("/acquisitions");
      } else {




reply via email to

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