[LON-CAPA-cvs] cvs: loncom /interface lonindexer.pm

matthew lon-capa-cvs@mail.lon-capa.org
Thu, 13 Jun 2002 15:05:16 -0000


matthew		Thu Jun 13 11:05:16 2002 EDT

  Modified files:              
    /loncom/interface	lonindexer.pm 
  Log:
  Fixes Bug 524.  @Omit and @Only are now undef'ed in the handler() call.  The
  bug resulted from stale values hanging around.
  
  
Index: loncom/interface/lonindexer.pm
diff -u loncom/interface/lonindexer.pm:1.42 loncom/interface/lonindexer.pm:1.43
--- loncom/interface/lonindexer.pm:1.42	Fri May 31 17:50:30 2002
+++ loncom/interface/lonindexer.pm	Thu Jun 13 11:05:16 2002
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Directory Indexer
 #
-# $Id: lonindexer.pm,v 1.42 2002/05/31 21:50:30 albertel Exp $
+# $Id: lonindexer.pm,v 1.43 2002/06/13 15:05:16 matthew Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -81,7 +81,7 @@
 my $dnum; # directory counter
 
 # ----- Used to include or exclude files with certain extensions.
-my @Only = (); 
+my @Only = ();
 my @Omit = ();
 
 
@@ -95,6 +95,11 @@
     $dnum=0;
     untie %hash;
 
+    # Deal with stupid global variables (is there a way around making
+    # these global to this package?  It is just so wrong....)
+    undef (@Only);
+    undef (@Omit);
+
 # ------------------------------------- read in machine configuration variables
     my $iconpath= $r->dir_config('lonIconsURL') . "/";
     my $domain  = $r->dir_config('lonDefDomain');
@@ -127,8 +132,7 @@
     if (tie(%hash,'GDBM_File',$diropendb,&GDBM_WRCREAT,0640)) {
 	if ($ENV{'form.launch'} eq '1') {
 	    &start_fresh_session();
-	}
-
+        }
 # -------------------- refresh environment with user database values (in %hash)
 	if ($hash{'mode_catalog'} eq 'interactive') {
 	    $ENV{'form.catalogmode'}='interactive';