';
- my $allowstr="\n";
+ my $allowstr='';
map {
- $allowstr.=''."\n";
+ my $thisdep=$_;
+ unless ($style eq 'rat') {
+ $allowstr.="\n".'';
+ }
$scrout.=' ';
- unless ($_=~/\*/) {
- $scrout.='';
+ unless ($thisdep=~/\*/) {
+ $scrout.='';
}
- $scrout.=''.$_.'';
- unless ($_=~/\*/) {
+ $scrout.=''.$thisdep.'';
+ unless ($thisdep=~/\*/) {
$scrout.='';
- if (&Apache::lonnet::getfile(
- $Apache::lonnet::perlvar{'lonDocRoot'}.'/'.
- $_.'.meta') eq '-1') {
+ if (
+ &Apache::lonnet::getfile($Apache::lonnet::perlvar{'lonDocRoot'}.'/'.
+ $thisdep.'.meta') eq '-1') {
$scrout.=
' - Currently not available';
- }
+ } else {
+ my %temphash=(&Apache::lonnet::declutter($target).'___'.
+ &Apache::lonnet::declutter($thisdep).'___usage'
+ => time);
+ $thisdep=~/^\/res\/(\w+)\/(\w+)\//;
+ if ((defined($1)) && (defined($2))) {
+ &Apache::lonnet::put('resevaldata',\%temphash,$1,$2);
+ }
+ }
}
} keys %allow;
$outstring=~s/(\<\/[^\>]+\>\s*)$/$allowstr$1/s;
- }
+
# ------------------------------------------------------------- Write modified
{
@@ -497,6 +510,7 @@ sub publish {
$scrout.=
'';
+ '';
}
# -------------------------------------------------------- Publication Step Two
@@ -622,6 +636,7 @@ sub phasetwo {
$metadatafields{'lastrevisiondate'}=$ENV{'form.lastrevisiondate'};
$metadatafields{'owner'}=$ENV{'form.owner'};
$metadatafields{'copyright'}=$ENV{'form.copyright'};
+ $metadatafields{'dependencies'}=$ENV{'form.dependencies'};
my $allkeywords=$ENV{'form.addkey'};
map {
@@ -660,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!';
@@ -721,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) {