--- loncom/metadata_database/searchcat.pl 2005/03/21 20:36:11 1.63 +++ loncom/metadata_database/searchcat.pl 2006/02/05 19:46:31 1.67 @@ -2,7 +2,7 @@ # The LearningOnline Network # searchcat.pl "Search Catalog" batch script # -# $Id: searchcat.pl,v 1.63 2005/03/21 20:36:11 matthew Exp $ +# $Id: searchcat.pl,v 1.67 2006/02/05 19:46:31 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -65,7 +65,9 @@ and correct user experience. =cut use strict; - +BEGIN { + eval "use Apache2::compat();"; +}; use DBI; use lib '/home/httpd/lib/perl/'; use LONCAPA::lonmetadata; @@ -198,6 +200,7 @@ foreach my $dom (@domains) { #wanted => \&print_filename, #wanted => \&log_metadata, wanted => \&process_meta_file, + no_chdir => 1, }, join('/',($Apache::lonnet::perlvar{'lonDocRoot'},'res',$dom,$user)) ); } } @@ -262,7 +265,7 @@ sub only_meta_files { foreach my $file (@PossibleFiles) { if ( ($file =~ /\.meta$/ && # Ends in meta $file !~ /\.\d+\.[^\.]+\.meta$/ # is not for a prior version - ) || (-d $file )) { # directories are okay + ) || (-d $File::Find::dir."/".$file )) { # directories are okay # but we do not want /. or /.. push(@ChosenFiles,$file); } @@ -504,7 +507,7 @@ sub process_dynamic_metadata { %DynamicData = &LONCAPA::lonmetadata::process_reseval_data(\%evaldata); untie(%evaldata); $DynamicData{'domain'} = $dom; - print('user = '.$user.' domain = '.$dom.$/); + #print('user = '.$user.' domain = '.$dom.$/); # # Read in the access count data &log(7,'Reading access count data') if ($debug);