--- loncom/metadata_database/searchcat.pl 2001/04/16 20:32:20 1.13 +++ loncom/metadata_database/searchcat.pl 2001/04/17 13:36:07 1.15 @@ -2,7 +2,7 @@ # The LearningOnline Network # searchcat.pl "Search Catalog" batch script -# 04/14/2001 Scott Harrison +# 04/14/2001, 04/16/2001 Scott Harrison # This script goes through a LON-CAPA resource # directory and gathers metadata. @@ -34,6 +34,9 @@ while ($configline=) { } close(CONFIG); +# ------------------------------------- Only run if machine is a library server +exit unless $perlvar{'lonRole'} eq 'library'; + my $dbh; # ------------------------------------- Make sure that database can be accessed { @@ -188,6 +191,6 @@ sub propath { sub sqltime { my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(@_[0]); - $year+=1900; + $mon++; $year+=1900; return "$year-$mon-$mday $hour:$min:$sec"; }