koha-cvs
[Top][All Lists]
Advanced

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

[Koha-cvs] CVS: koha/C4 Koha.pm,1.4.2.3,1.4.2.4 Database.pm,1.2.2.4,1.2.


From: Steve Tonnesen
Subject: [Koha-cvs] CVS: koha/C4 Koha.pm,1.4.2.3,1.4.2.4 Database.pm,1.2.2.4,1.2.2.5
Date: Fri, 12 Jul 2002 16:58:37 -0700

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

Modified Files:
      Tag: rel-1-2
        Koha.pm Database.pm 
Log Message:
I had Koha.pm using Database.pm and vice versa.  Subroutines don't get exported 
properly when this is done.  Moved configfile subroutine to Database.pm


Index: Koha.pm
===================================================================
RCS file: /cvsroot/koha/koha/C4/Koha.pm,v
retrieving revision 1.4.2.3
retrieving revision 1.4.2.4
diff -C2 -r1.4.2.3 -r1.4.2.4
*** Koha.pm     11 Jul 2002 19:43:10 -0000      1.4.2.3
--- Koha.pm     12 Jul 2002 23:58:35 -0000      1.4.2.4
***************
*** 14,18 ****
             &borrowercategories
             &ethnicitycategories
-            &configfile
             $DEBUG); 
  
--- 14,17 ----
***************
*** 20,43 ****
        
  my $DEBUG = 0;
- 
- sub configfile {
-     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;
-       }
-     }
-     return $configfile;
- }
  
  sub slashifyDate {
--- 19,22 ----

Index: Database.pm
===================================================================
RCS file: /cvsroot/koha/koha/C4/Database.pm,v
retrieving revision 1.2.2.4
retrieving revision 1.2.2.5
diff -C2 -r1.2.2.4 -r1.2.2.5
*** Database.pm 11 Jul 2002 19:43:10 -0000      1.2.2.4
--- Database.pm 12 Jul 2002 23:58:35 -0000      1.2.2.5
***************
*** 14,18 ****
--- 14,40 ----
  @EXPORT = qw(
        &C4Connect &requireDBI
+            &configfile
  );
+ 
+ 
+ sub configfile {
+     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;
+       }
+     }
+     return $configfile;
+ }
  
  




reply via email to

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