version 1.116, 2003/03/14 15:29:46
|
version 1.124, 2003/07/05 10:07:12
|
Line 190 sub metaeval {
|
Line 190 sub metaeval {
|
} |
} |
if ($metadatafields{$unikey}) { |
if ($metadatafields{$unikey}) { |
my $newentry=$parser->get_text('/'.$entry); |
my $newentry=$parser->get_text('/'.$entry); |
unless (($metadatafields{$unikey}=~/$newentry/) || |
unless (($metadatafields{$unikey}=~/\Q$newentry\E/) || |
($newentry eq '')) { |
($newentry eq '')) { |
$metadatafields{$unikey}.=', '.$newentry; |
$metadatafields{$unikey}.=', '.$newentry; |
} |
} |
Line 242 sub metaread {
|
Line 242 sub metaread {
|
my ($logfile,$fn)=@_; |
my ($logfile,$fn)=@_; |
unless (-e $fn) { |
unless (-e $fn) { |
print($logfile 'No file '.$fn."\n"); |
print($logfile 'No file '.$fn."\n"); |
return '<br><b>No file:</b> <tt>'.$fn.'</tt>'; |
return '<br /><b>No file:</b> <tt>'.$fn.'</tt>'; |
} |
} |
print($logfile 'Processing '.$fn."\n"); |
print($logfile 'Processing '.$fn."\n"); |
my $metastring; |
my $metastring; |
Line 251 sub metaread {
|
Line 251 sub metaread {
|
$metastring=join('',<$metafh>); |
$metastring=join('',<$metafh>); |
} |
} |
&metaeval($metastring); |
&metaeval($metastring); |
return '<br><b>Processed file:</b> <tt>'.$fn.'</tt>'; |
return '<br /><b>Processed file:</b> <tt>'.$fn.'</tt>'; |
} |
} |
|
|
######################################### |
######################################### |
Line 304 string which presents the form field (fo
|
Line 304 string which presents the form field (fo
|
######################################### |
######################################### |
sub textfield { |
sub textfield { |
my ($title,$name,$value)=@_; |
my ($title,$name,$value)=@_; |
return "\n<p><b>$title:</b><br>". |
my $uctitle=uc($title); |
|
return "\n<p><font color=\"#800000\" face=\"helvetica\"><b>$uctitle:". |
|
"</b></font></p><br />". |
'<input type="text" name="'.$name.'" size=80 value="'.$value.'" />'; |
'<input type="text" name="'.$name.'" size=80 value="'.$value.'" />'; |
} |
} |
|
|
Line 316 sub hiddenfield {
|
Line 318 sub hiddenfield {
|
sub selectbox { |
sub selectbox { |
my ($title,$name,$value,$functionref,@idlist)=@_; |
my ($title,$name,$value,$functionref,@idlist)=@_; |
my $uctitle=uc($title); |
my $uctitle=uc($title); |
|
$value=(split(/\s*,\s*/,$value))[-1]; |
my $selout="\n<p><font color=\"#800000\" face=\"helvetica\"><b>$uctitle:". |
my $selout="\n<p><font color=\"#800000\" face=\"helvetica\"><b>$uctitle:". |
"</b></font><br />".'<select name="'.$name.'">'; |
'</b></font></p><br /><select name="'.$name.'">'; |
foreach (@idlist) { |
foreach (@idlist) { |
$selout.='<option value=\''.$_.'\''; |
$selout.='<option value=\''.$_.'\''; |
if ($_ eq $value) { |
if ($_ eq $value) { |
Line 436 sub get_subscribed_hosts {
|
Line 439 sub get_subscribed_hosts {
|
my $srcf=$2; |
my $srcf=$2; |
opendir(DIR,$1); |
opendir(DIR,$1); |
while ($filename=readdir(DIR)) { |
while ($filename=readdir(DIR)) { |
if ($filename=~/$srcf\.(\w+)$/) { |
if ($filename=~/\Q$srcf\E\.(\w+)$/) { |
my $subhost=$1; |
my $subhost=$1; |
if (($subhost ne 'meta' && $subhost ne 'subscription') && |
if (($subhost ne 'meta' && $subhost ne 'subscription') && |
($subhost ne $Apache::lonnet::perlvar{'lonHostID'})) { |
($subhost ne $Apache::lonnet::perlvar{'lonHostID'})) { |
Line 814 sub publish {
|
Line 817 sub publish {
|
print $logfile |
print $logfile |
"\n\n================= Publish ".localtime()." Phase One ================\n"; |
"\n\n================= Publish ".localtime()." Phase One ================\n"; |
|
|
if (($style eq 'ssi') || ($style eq 'rat')) { |
if (($style eq 'ssi') || ($style eq 'rat') || ($style eq 'prv')) { |
# ------------------------------------------------------- This needs processing |
# ------------------------------------------------------- This needs processing |
|
|
# ----------------------------------------------------------------- Backup Copy |
# ----------------------------------------------------------------- Backup Copy |
Line 841 sub publish {
|
Line 844 sub publish {
|
unless ($style eq 'rat') { |
unless ($style eq 'rat') { |
$allowstr.="\n".'<allow src="'.$thisdep.'" />'; |
$allowstr.="\n".'<allow src="'.$thisdep.'" />'; |
} |
} |
$scrout.='<br>'; |
$scrout.='<br />'; |
unless ($thisdep=~/\*/) { |
unless ($thisdep=~/\*/) { |
$scrout.='<a href="'.$thisdep.'">'; |
$scrout.='<a href="'.$thisdep.'">'; |
} |
} |
Line 911 sub publish {
|
Line 914 sub publish {
|
# ------------------------------------------------ Check out directory hierachy |
# ------------------------------------------------ Check out directory hierachy |
|
|
my $thisdisfn=$source; |
my $thisdisfn=$source; |
$thisdisfn=~s/^\/home\/$cuname\///; |
$thisdisfn=~s/^\/home\/\Q$cuname\E\///; |
|
|
my @urlparts=split(/\//,$thisdisfn); |
my @urlparts=split(/\//,$thisdisfn); |
$#urlparts--; |
$#urlparts--; |
Line 946 sub publish {
|
Line 949 sub publish {
|
} |
} |
|
|
# -------------------------------------------------- Parse content for metadata |
# -------------------------------------------------- Parse content for metadata |
if ($style eq 'ssi') { |
if (($style eq 'ssi') || ($style eq 'prv')) { |
my $oldenv=$ENV{'request.uri'}; |
my $oldenv=$ENV{'request.uri'}; |
|
|
$ENV{'request.uri'}=$target; |
$ENV{'request.uri'}=$target; |
Line 969 sub publish {
|
Line 972 sub publish {
|
} |
} |
} |
} |
if ($chparms) { |
if ($chparms) { |
$scrout.='<p><b>New parameters or stored values:</b> '.$chparms; |
$scrout.='<p><b>New parameters or stored values:</b> '.$chparms.'</p>'; |
} |
} |
|
|
$chparms=''; |
$chparms=''; |
Line 984 sub publish {
|
Line 987 sub publish {
|
} |
} |
if ($chparms) { |
if ($chparms) { |
$scrout.='<p><b>Obsolete parameters or stored values:</b> '. |
$scrout.='<p><b>Obsolete parameters or stored values:</b> '. |
$chparms; |
$chparms.'</p>'; |
} |
} |
|
|
# ------------------------------------------------------- Now have all metadata |
# ------------------------------------------------------- Now have all metadata |
Line 1042 function uncheckAll(field) {
|
Line 1045 function uncheckAll(field) {
|
field[i].checked = false ; |
field[i].checked = false ; |
} |
} |
</script> |
</script> |
<p><b>Keywords: $keywords_help</b> |
<p><font color="#800000" face="helvetica"><b>KEYWORDS:</b></font> |
<input type="button" value="check all" onclick="javascript:checkAll(document.pubform.keywords)"> |
$keywords_help</b> |
<input type="button" value="uncheck all" onclick="javascript:uncheckAll(document.pubform.keywords)"> |
<input type="button" value="check all" onclick="javascript:checkAll(document.pubform.keywords)" /> |
|
<input type="button" value="uncheck all" onclick="javascript:uncheckAll(document.pubform.keywords)" /> |
|
</p> |
<br /> |
<br /> |
END |
END |
$keywordout.='<table border=2><tr>'; |
$keywordout.='<table border="2"><tr>'; |
my $colcount=0; |
my $colcount=0; |
|
|
foreach (sort keys %keywords) { |
foreach (sort keys %keywords) { |
$keywordout.='<td><input type=checkbox name="keywords" value="'.$_.'"'; |
$keywordout.='<td><input type="checkbox" name="keywords" value="'.$_.'"'; |
if ($metadatafields{'keywords'}) { |
if ($metadatafields{'keywords'}) { |
if ($metadatafields{'keywords'}=~/$_/) { |
if ($metadatafields{'keywords'}=~/\Q$_\E/) { |
$keywordout.=' checked'; |
$keywordout.=' checked="on"'; |
} |
} |
} elsif (&Apache::loncommon::keyword($_)) { |
} elsif (&Apache::loncommon::keyword($_)) { |
$keywordout.=' checked'; |
$keywordout.=' checked="on"'; |
} |
} |
$keywordout.='>'.$_.'</td>'; |
$keywordout.=' />'.$_.'</td>'; |
if ($colcount>10) { |
if ($colcount>10) { |
$keywordout.="</tr><tr>\n"; |
$keywordout.="</tr><tr>\n"; |
$colcount=0; |
$colcount=0; |
Line 1076 END
|
Line 1081 END
|
$scrout.=&textfield('Notes','notes',$metadatafields{'notes'}); |
$scrout.=&textfield('Notes','notes',$metadatafields{'notes'}); |
|
|
$scrout.= |
$scrout.= |
'<p><b>Abstract:</b><br><textarea cols=80 rows=5 name=abstract>'. |
"\n<p><font color=\"#800000\" face=\"helvetica\"><b>ABSTRACT:". |
$metadatafields{'abstract'}.'</textarea>'; |
"</b></font></p><br />". |
|
'<textarea cols="80" rows="5" name="abstract">'. |
|
$metadatafields{'abstract'}.'</textarea></p>'; |
|
|
$source=~/\.(\w+)$/; |
$source=~/\.(\w+)$/; |
|
|
$scrout.=&hiddenfield('mime',$1); |
$scrout.=&hiddenfield('mime',$1); |
|
|
|
my $defaultlanguage=$metadatafields{'language'}; |
|
$defaultlanguage =~ s/\s*notset\s*//g; |
|
$defaultlanguage =~ s/^,\s*//g; |
|
$defaultlanguage =~ s/,\s*$//g; |
|
|
$scrout.=&selectbox('Language','language', |
$scrout.=&selectbox('Language','language', |
$metadatafields{'language'}, |
$defaultlanguage, |
\&Apache::loncommon::languagedescription, |
\&Apache::loncommon::languagedescription, |
(&Apache::loncommon::languageids), |
(&Apache::loncommon::languageids), |
); |
); |
Line 1102 END
|
Line 1114 END
|
$metadatafields{'owner'}); |
$metadatafields{'owner'}); |
|
|
# -------------------------------------------------- Correct copyright for rat. |
# -------------------------------------------------- Correct copyright for rat. |
|
my $defaultoption=$metadatafields{'copyright'}; |
|
unless ($defaultoption) { $defaultoption='default'; } |
unless ($style eq 'prv') { |
unless ($style eq 'prv') { |
if ($style eq 'rat') { |
if ($style eq 'rat') { |
if ($metadatafields{'copyright'} eq 'public') { |
if ($metadatafields{'copyright'} eq 'public') { |
delete $metadatafields{'copyright'}; |
delete $metadatafields{'copyright'}; |
|
$defaultoption='default'; |
} |
} |
$scrout.=&selectbox('Copyright/Distribution','copyright', |
$scrout.=&selectbox('Copyright/Distribution','copyright', |
$metadatafields{'copyright'}, |
$defaultoption, |
\&Apache::loncommon::copyrightdescription, |
\&Apache::loncommon::copyrightdescription, |
(grep !/^public$/,(&Apache::loncommon::copyrightids))); |
(grep !/^public$/,(&Apache::loncommon::copyrightids))); |
} else { |
} else { |
$scrout.=&selectbox('Copyright/Distribution','copyright', |
$scrout.=&selectbox('Copyright/Distribution','copyright', |
$metadatafields{'copyright'}, |
$defaultoption, |
\&Apache::loncommon::copyrightdescription, |
\&Apache::loncommon::copyrightdescription, |
(&Apache::loncommon::copyrightids)); |
(&Apache::loncommon::copyrightids)); |
} |
} |
Line 1140 END
|
Line 1155 END
|
$ENV{'form.keywords'}=''; |
$ENV{'form.keywords'}=''; |
foreach (keys %keywords) { |
foreach (keys %keywords) { |
if ($metadatafields{'keywords'}) { |
if ($metadatafields{'keywords'}) { |
if ($metadatafields{'keywords'}=~/$_/) { |
if ($metadatafields{'keywords'}=~/\Q$_\E/) { |
$ENV{'form.keywords'}.=$_.','; |
$ENV{'form.keywords'}.=$_.','; |
} |
} |
} elsif (&Apache::loncommon::keyword($_)) { |
} elsif (&Apache::loncommon::keyword($_)) { |
Line 1274 sub phasetwo {
|
Line 1289 sub phasetwo {
|
.'</'.$tag.'>'; |
.'</'.$tag.'>'; |
} |
} |
} |
} |
$r->print('<p>Wrote Metadata'); |
$r->print('<p>Wrote Metadata</p>'); |
print $logfile "\nWrote metadata"; |
print $logfile "\nWrote metadata"; |
} |
} |
|
|
Line 1285 sub phasetwo {
|
Line 1300 sub phasetwo {
|
unless ($metadatafields{'copyright'} eq 'priv') { |
unless ($metadatafields{'copyright'} eq 'priv') { |
my ($error,$success) = &store_metadata(\%metadatafields); |
my ($error,$success) = &store_metadata(\%metadatafields); |
if ($success) { |
if ($success) { |
$r->print('<p>Synchronized SQL metadata database'); |
$r->print('<p>Synchronized SQL metadata database</p>'); |
print $logfile "\nSynchronized SQL metadata database"; |
print $logfile "\nSynchronized SQL metadata database"; |
} else { |
} else { |
$r->print($error); |
$r->print($error); |
print $logfile "\n".$error; |
print $logfile "\n".$error; |
} |
} |
} else { |
} else { |
$r->print('<p>Private Publication - did not synchronize database'); |
$r->print('<p>Private Publication - did not synchronize database</p>'); |
print $logfile "\nPrivate: Did not synchronize data into ". |
print $logfile "\nPrivate: Did not synchronize data into ". |
"SQL metadata database"; |
"SQL metadata database"; |
} |
} |
Line 1315 sub phasetwo {
|
Line 1330 sub phasetwo {
|
unlink($srcd.'/'.$filename); |
unlink($srcd.'/'.$filename); |
unlink($srcd.'/'.$filename.'.meta'); |
unlink($srcd.'/'.$filename.'.meta'); |
} else { |
} else { |
if ($filename=~/$srcf\.(\d+)\.$srct$/) { |
if ($filename=~/\Q$srcf\E\.(\d+)\.\Q$srct\E$/) { |
$maxversion=($1>$maxversion)?$1:$maxversion; |
$maxversion=($1>$maxversion)?$1:$maxversion; |
} |
} |
} |
} |
} |
} |
closedir(DIR); |
closedir(DIR); |
$maxversion++; |
$maxversion++; |
$r->print('<p>Creating old version '.$maxversion); |
$r->print('<p>Creating old version '.$maxversion.'</p>'); |
print $logfile "\nCreating old version ".$maxversion; |
print $logfile "\nCreating old version ".$maxversion; |
|
|
my $copyfile=$srcd.'/'.$srcf.'.'.$maxversion.'.'.$srct; |
my $copyfile=$srcd.'/'.$srcf.'.'.$maxversion.'.'.$srct; |
|
|
if (copy($target,$copyfile)) { |
if (copy($target,$copyfile)) { |
print $logfile "Copied old target to ".$copyfile."\n"; |
print $logfile "Copied old target to ".$copyfile."\n"; |
$r->print('<p>Copied old target file'); |
$r->print('<p>Copied old target file</p>'); |
} else { |
} else { |
print $logfile "Unable to write ".$copyfile.':'.$!."\n"; |
print $logfile "Unable to write ".$copyfile.':'.$!."\n"; |
return "<font color=\"red\">Failed to copy old target, $!, FAIL</font>"; |
return "<font color=\"red\">Failed to copy old target, $!, FAIL</font>"; |
Line 1341 sub phasetwo {
|
Line 1356 sub phasetwo {
|
|
|
if (copy($target.'.meta',$copyfile)) { |
if (copy($target.'.meta',$copyfile)) { |
print $logfile "Copied old target metadata to ".$copyfile."\n"; |
print $logfile "Copied old target metadata to ".$copyfile."\n"; |
$r->print('<p>Copied old metadata') |
$r->print('<p>Copied old metadata</p>') |
} else { |
} else { |
print $logfile "Unable to write metadata ".$copyfile.':'.$!."\n"; |
print $logfile "Unable to write metadata ".$copyfile.':'.$!."\n"; |
if (-e $target.'.meta') { |
if (-e $target.'.meta') { |
Line 1352 sub phasetwo {
|
Line 1367 sub phasetwo {
|
|
|
|
|
} else { |
} else { |
$r->print('<p>Initial version'); |
$r->print('<p>Initial version</p>'); |
print $logfile "\nInitial version"; |
print $logfile "\nInitial version"; |
} |
} |
|
|
Line 1367 sub phasetwo {
|
Line 1382 sub phasetwo {
|
$path.="/$parts[$count]"; |
$path.="/$parts[$count]"; |
if ((-e $path)!=1) { |
if ((-e $path)!=1) { |
print $logfile "\nCreating directory ".$path; |
print $logfile "\nCreating directory ".$path; |
$r->print('<p>Created directory '.$parts[$count]); |
$r->print('<p>Created directory '.$parts[$count].'</p>'); |
mkdir($path,0777); |
mkdir($path,0777); |
} |
} |
} |
} |
|
|
if (copy($source,$copyfile)) { |
if (copy($source,$copyfile)) { |
print $logfile "\nCopied original source to ".$copyfile."\n"; |
print $logfile "\nCopied original source to ".$copyfile."\n"; |
$r->print('<p>Copied source file'); |
$r->print('<p>Copied source file</p>'); |
} else { |
} else { |
print $logfile "\nUnable to write ".$copyfile.':'.$!."\n"; |
print $logfile "\nUnable to write ".$copyfile.':'.$!."\n"; |
return "<font color=\"red\">Failed to copy source, $!, FAIL</font>"; |
return "<font color=\"red\">Failed to copy source, $!, FAIL</font>"; |
Line 1386 sub phasetwo {
|
Line 1401 sub phasetwo {
|
|
|
if (copy($source.'.meta',$copyfile)) { |
if (copy($source.'.meta',$copyfile)) { |
print $logfile "\nCopied original metadata to ".$copyfile."\n"; |
print $logfile "\nCopied original metadata to ".$copyfile."\n"; |
$r->print('<p>Copied metadata'); |
$r->print('<p>Copied metadata</p>'); |
} else { |
} else { |
print $logfile "\nUnable to write metadata ".$copyfile.':'.$!."\n"; |
print $logfile "\nUnable to write metadata ".$copyfile.':'.$!."\n"; |
return |
return |
Line 1400 sub phasetwo {
|
Line 1415 sub phasetwo {
|
$r->print('<p>Notifying host '.$subhost.':');$r->rflush; |
$r->print('<p>Notifying host '.$subhost.':');$r->rflush; |
print $logfile "\nNotifying host ".$subhost.':'; |
print $logfile "\nNotifying host ".$subhost.':'; |
my $reply=&Apache::lonnet::critical('update:'.$target,$subhost); |
my $reply=&Apache::lonnet::critical('update:'.$target,$subhost); |
$r->print($reply.'<br />');$r->rflush; |
$r->print($reply.'</p><br />');$r->rflush; |
print $logfile $reply; |
print $logfile $reply; |
} |
} |
|
|
Line 1412 sub phasetwo {
|
Line 1427 sub phasetwo {
|
print $logfile "\nNotifying host for metadata only ".$subhost.':'; |
print $logfile "\nNotifying host for metadata only ".$subhost.':'; |
my $reply=&Apache::lonnet::critical('update:'.$target.'.meta', |
my $reply=&Apache::lonnet::critical('update:'.$target.'.meta', |
$subhost); |
$subhost); |
$r->print($reply.'<br />');$r->rflush; |
$r->print($reply.'</p><br />');$r->rflush; |
print $logfile $reply; |
print $logfile $reply; |
} |
} |
|
|
Line 1425 sub phasetwo {
|
Line 1440 sub phasetwo {
|
my ($cdom,$cname)=split(/\_/,$_); |
my ($cdom,$cname)=split(/\_/,$_); |
my $reply=&Apache::lonnet::cput |
my $reply=&Apache::lonnet::cput |
('versionupdate',{$target => $now},$cdom,$cname); |
('versionupdate',{$target => $now},$cdom,$cname); |
$r->print($reply.'<br />');$r->rflush; |
$r->print($reply.'</p><br />');$r->rflush; |
print $logfile $reply; |
print $logfile $reply; |
} |
} |
# ------------------------------------------------ Provide link to new resource |
# ------------------------------------------------ Provide link to new resource |
unless ($batch) { |
unless ($batch) { |
my $thisdistarget=$target; |
my $thisdistarget=$target; |
$thisdistarget=~s/^$docroot//; |
$thisdistarget=~s/^\Q$docroot\E//; |
|
|
my $thissrc=$source; |
my $thissrc=$source; |
$thissrc=~s/^\/home\/(\w+)\/public_html/\/priv\/$1/; |
$thissrc=~s/^\/home\/(\w+)\/public_html/\/priv\/$1/; |
Line 1441 sub phasetwo {
|
Line 1456 sub phasetwo {
|
|
|
|
|
$r->print( |
$r->print( |
'<hr><a href="'.$thisdistarget.'"><font size="+2">'. |
'<hr /><a href="'.$thisdistarget.'"><font size="+2">'. |
'View Published Version</font></a>'. |
'View Published Version</font></a>'. |
'<p><a href="'.$thissrc.'"><font size=+2>Back to Source</font></a>'. |
'<p><a href="'.$thissrc.'"><font size=+2>Back to Source</font></a></p>'. |
'<p><a href="'.$thissrcdir. |
'<p><a href="'.$thissrcdir. |
'"><font size="+2">Back to Source Directory</font></a>'); |
'"><font size="+2">Back to Source Directory</font></a></p>'); |
} |
} |
} |
} |
|
|
Line 1461 sub batchpublish {
|
Line 1476 sub batchpublish {
|
|
|
my $docroot=$r->dir_config('lonDocRoot'); |
my $docroot=$r->dir_config('lonDocRoot'); |
my $thisdistarget=$targetfile; |
my $thisdistarget=$targetfile; |
$thisdistarget=~s/^$docroot//; |
$thisdistarget=~s/^\Q$docroot\E//; |
|
|
|
|
undef %metadatafields; |
undef %metadatafields; |
Line 1528 sub publishdirectory {
|
Line 1543 sub publishdirectory {
|
$ruid,$rgid,$rrdev,$rsize, |
$ruid,$rgid,$rrdev,$rsize, |
$ratime,$rmtime,$rctime, |
$ratime,$rmtime,$rctime, |
$rblksize,$rblocks)=stat($resdir.'/'.$filename); |
$rblksize,$rblocks)=stat($resdir.'/'.$filename); |
if ($rmtime<$cmtime) { |
if (($rmtime<$cmtime) || ($ENV{'form.forcerepub'})) { |
# previously published, modified now |
# previously published, modified now |
$publishthis=1; |
$publishthis=1; |
} |
} |
Line 1698 unless ($ENV{'form.phase'} eq 'two') {
|
Line 1713 unless ($ENV{'form.phase'} eq 'two') {
|
$thistarget=~s/\/public\_html//; |
$thistarget=~s/\/public\_html//; |
|
|
my $thisdistarget=$thistarget; |
my $thisdistarget=$thistarget; |
$thisdistarget=~s/^$docroot//; |
$thisdistarget=~s/^\Q$docroot\E//; |
|
|
my $thisdisfn=$thisfn; |
my $thisdisfn=$thisfn; |
$thisdisfn=~s/^\/home\/$cuname\/public_html\///; |
$thisdisfn=~s/^\/home\/\Q$cuname\E\/public_html\///; |
|
|
if ($fn=~/\/$/) { |
if ($fn=~/\/$/) { |
# -------------------------------------------------------- This is a directory |
# -------------------------------------------------------- This is a directory |
Line 1716 unless ($ENV{'form.phase'} eq 'two') {
|
Line 1731 unless ($ENV{'form.phase'} eq 'two') {
|
$r->print('<h2>Publishing '. |
$r->print('<h2>Publishing '. |
&Apache::loncommon::filedescription($thistype).' <tt>'. |
&Apache::loncommon::filedescription($thistype).' <tt>'. |
'<a href="/~'.$cuname.'/'.$thisdisfn.'" target="cat">'.$thisdisfn. |
'<a href="/~'.$cuname.'/'.$thisdisfn.'" target="cat">'.$thisdisfn. |
'</a></tt></h2><b>Target:</b> <tt>'.$thisdistarget.'</tt><p>'); |
'</a></tt></h2><b>Target:</b> <tt>'.$thisdistarget.'</tt><br />'); |
|
|
if (($cuname ne $ENV{'user.name'}) || ($cudom ne $ENV{'user.domain'})) { |
if (($cuname ne $ENV{'user.name'}) || ($cudom ne $ENV{'user.domain'})) { |
$r->print('<h3><font color="red">Co-Author: '.$cuname.' at '.$cudom. |
$r->print('<h3><font color="red">Co-Author: '.$cuname.' at '.$cudom. |
Line 1726 unless ($ENV{'form.phase'} eq 'two') {
|
Line 1741 unless ($ENV{'form.phase'} eq 'two') {
|
if (&Apache::loncommon::fileembstyle($thistype) eq 'ssi') { |
if (&Apache::loncommon::fileembstyle($thistype) eq 'ssi') { |
$r->print('<br /><a href="/adm/diff?filename=/~'.$cuname.'/'. |
$r->print('<br /><a href="/adm/diff?filename=/~'.$cuname.'/'. |
$thisdisfn. |
$thisdisfn. |
'&versiontwo=priv" target="cat">Diffs with Current Version</a><p>'); |
'&versiontwo=priv" target="cat">Diffs with Current Version</a><br />'); |
} |
} |
|
|
# ------------------ Publishing from $thisfn to $thistarget with $thisembstyle. |
# ------------------ Publishing from $thisfn to $thistarget with $thisembstyle. |