--- loncom/interface/lonindexer.pm 2003/06/16 17:27:33 1.67 +++ loncom/interface/lonindexer.pm 2003/06/16 22:09:02 1.68 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Directory Indexer # -# $Id: lonindexer.pm,v 1.67 2003/06/16 17:27:33 matthew Exp $ +# $Id: lonindexer.pm,v 1.68 2003/06/16 22:09:02 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -126,13 +126,16 @@ sub handler { my $diropendb = "/home/httpd/perl/tmp/$ENV{'user.domain'}_$ENV{'user.name'}_indexer.db"; %hash = (); - my %dbfile; - if (tie(%dbfile,'GDBM_File',$diropendb,&GDBM_WRCREAT(),0640)) { - while(my($key,$value)=each(%dbfile)) { - $hash{$key}=$value; - } - untie(%dbfile); - + { + my %dbfile; + if (tie(%dbfile,'GDBM_File',$diropendb,&GDBM_WRCREAT(),0640)) { + while(my($key,$value)=each(%dbfile)) { + $hash{$key}=$value; + } + untie(%dbfile); + } + } + { if ($ENV{'form.launch'} eq '1') { &start_fresh_session(); } @@ -499,12 +502,13 @@ END # --------------------------------------------------- end the output and return $r->print(''."\n"); - } else { - $r->print('Unable to tie hash to db '. - 'file'); - return OK; +# } else { +# $r->print('Unable to tie hash to db '. +# 'file'); +# return OK; } if(! $c->aborted()) { + my %dbfile; if (tie(%dbfile,'GDBM_File',$diropendb,&GDBM_NEWDB(),0640)) { while (my($key,$value) = each(%hash)) { $dbfile{$key}=$value;