Diff for /loncom/cgi/metadata_keywords.pl between versions 1.2 and 1.5

version 1.2, 2001/09/25 17:35:03 version 1.5, 2003/02/03 18:03:52
Line 5 Line 5
 # Gets keywords from metadata database.  # Gets keywords from metadata database.
 #  #
 # YEAR=2001  # YEAR=2001
 # 9/25 Scott Harrison  #
   # YEAR=2002
 #  #
   
 ###############################################################################  ###############################################################################
Line 26 Line 27
 # 1=horrible 2=poor 3=fair 4=good 5=excellent  # 1=horrible 2=poor 3=fair 4=good 5=excellent
 # Organization 5  # Organization 5
 # Functionality 4  # Functionality 4
 # Has it been tested? 3  # Has it been tested? 4
 #  #
   
 # ------------------------------------------ Purpose and description of program  # ------------------------------------------ Purpose and description of program
Line 42 Line 43
 # should reflect this information) instead.  This is a speedier approach.  # should reflect this information) instead.  This is a speedier approach.
   
 # ------------------------------------------------- Modules used by this script  # ------------------------------------------------- Modules used by this script
   
   use lib '/home/httpd/lib/perl/';
   use LONCAPA::Configuration;
   
 use strict;  use strict;
 use DBI;  use DBI;
   
Line 51  print 'Content-type: text/plain'."\n\n"; Line 56  print 'Content-type: text/plain'."\n\n";
   
 # --- Make sure that database can be accessed and that this is a library server  # --- Make sure that database can be accessed and that this is a library server
 # library server test  # library server test
 my %perlvar;  
 open (CONFIG,"/etc/httpd/conf/access.conf") ||   # By default, loncapa_apache.conf is also read by the read_conf subroutine.
     (print "Can't read access.conf\n" && exit);  my $perlvarref=LONCAPA::Configuration::read_conf('loncapa.conf');
 while (my $configline=<CONFIG>) {  my %perlvar=%{$perlvarref};
     if ($configline =~ /PerlSetVar/) {  undef($perlvarref);
  my ($dummy,$varname,$varvalue)=split(/\s+/,$configline);  
         chomp($varvalue);  
         $perlvar{$varname}=$varvalue;  
     }  
 }  
 close(CONFIG);  
 unless ($perlvar{'lonRole'} eq 'library') {  unless ($perlvar{'lonRole'} eq 'library') {
     print "This can only be run on a library server!\n";      print "This can only be run on a library server!\n";
     exit;      exit;

Removed from v.1.2  
changed lines
  Added in v.1.5


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>