--- loncom/publisher/lonpublisher.pm 2001/12/07 22:34:56 1.63 +++ loncom/publisher/lonpublisher.pm 2001/12/07 22:37:56 1.64 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Publication Handler # -# $Id: lonpublisher.pm,v 1.63 2001/12/07 22:34:56 albertel Exp $ +# $Id: lonpublisher.pm,v 1.64 2001/12/07 22:37:56 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -40,7 +40,7 @@ # 12/04,12/05 Guy Albertelli # 12/05 Gerd Kortemeyer # 12/05 Guy Albertelli -# 12/06 Gerd Kortemeyer +# 12/06,12/07 Gerd Kortemeyer package Apache::lonpublisher; @@ -675,23 +675,15 @@ sub phasetwo { } # -------------------------------- Synchronize entry with SQL metadata database - my %perlvar; - open (CONFIG,"/etc/httpd/conf/access.conf") || die "Can't read access.conf"; - my $configline; - while ($configline=) { - if ($configline =~ /PerlSetVar/) { - my ($dummy,$varname,$varvalue)=split(/\s+/,$configline); - chomp($varvalue); - $perlvar{$varname}=$varvalue; - } - } - close(CONFIG); + my $warning; + + unless ($metadatafields{'copyright'} eq 'priv') { - my $warning; my $dbh; { unless ( - $dbh = DBI->connect("DBI:mysql:loncapa","www",$perlvar{'lonSqlAccess'},{ RaiseError =>0,PrintError=>0}) + $dbh = DBI->connect("DBI:mysql:loncapa","www", + $Apache::lonnet::perlvar{'lonSqlAccess'},{ RaiseError =>0,PrintError=>0}) ) { $warning='WARNING: Cannot connect to '. 'database!'; @@ -736,7 +728,10 @@ sub phasetwo { } } - +} else { + $scrout.='

Private Publication - did not synchronize database'; + print $logfile "\nPrivate: Did not ynchronized SQL metadata database"; +} # ----------------------------------------------------------- Copy old versions if (-e $target) {