version 1.144, 2003/11/05 20:27:20
|
version 1.157, 2003/12/29 19:13:23
|
Line 25
|
Line 25
|
# |
# |
# http://www.lon-capa.org/ |
# http://www.lon-capa.org/ |
# |
# |
# |
|
# (TeX Content Handler |
|
# |
|
# 05/29/00,05/30,10/11 Gerd Kortemeyer) |
|
# |
|
# 11/28,11/29,11/30,12/01,12/02,12/04,12/23 Gerd Kortemeyer |
|
# 03/23 Guy Albertelli |
|
# 03/24,03/29,04/03 Gerd Kortemeyer |
|
# 05/03,05/05,05/07 Gerd Kortemeyer |
|
# 06/23,08/07,08/11,8/13,8/17,8/18,8/24,9/26,10/16 Gerd Kortemeyer |
|
# 12/04,12/05 Guy Albertelli |
|
# 12/05 Gerd Kortemeyer |
|
# 12/05 Guy Albertelli |
|
# 12/06,12/07 Gerd Kortemeyer |
|
# 12/25 Gerd Kortemeyer |
|
# YEAR=2002 |
|
# 1/17 Gerd Kortemeyer |
|
# |
|
### |
### |
|
|
############################################################################### |
############################################################################### |
Line 143 use Apache::lonnet();
|
Line 125 use Apache::lonnet();
|
use Apache::loncommon(); |
use Apache::loncommon(); |
use Apache::lonmysql; |
use Apache::lonmysql; |
use Apache::lonlocal; |
use Apache::lonlocal; |
|
use Apache::loncfile; |
|
use Apache::lonmeta; |
use vars qw(%metadatafields %metadatakeys); |
use vars qw(%metadatafields %metadatakeys); |
|
|
my %addid; |
my %addid; |
Line 218 sub metaeval {
|
Line 202 sub metaeval {
|
$newentry=~s/^\s*//; |
$newentry=~s/^\s*//; |
if ($newentry !~m|^/res|) { $newentry=$prefix.$newentry; } |
if ($newentry !~m|^/res|) { $newentry=$prefix.$newentry; } |
} |
} |
unless ($metadatafields{$unikey}=~/\w/) { |
# actually store |
$metadatafields{$unikey}=$newentry; |
$metadatafields{$unikey}=$newentry; |
} |
|
} |
} |
} |
} |
} |
} |
Line 266 sub metaread {
|
Line 249 sub metaread {
|
my ($logfile,$fn,$prefix)=@_; |
my ($logfile,$fn,$prefix)=@_; |
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>'.&mt('No file').':</b> <tt>'. |
|
&Apache::loncfile::display($fn).'</tt>'; |
} |
} |
print($logfile 'Processing '.$fn."\n"); |
print($logfile 'Processing '.$fn."\n"); |
my $metastring; |
my $metastring; |
Line 275 sub metaread {
|
Line 259 sub metaread {
|
$metastring=join('',<$metafh>); |
$metastring=join('',<$metafh>); |
} |
} |
&metaeval($metastring,$prefix); |
&metaeval($metastring,$prefix); |
return '<br /><b>Processed file:</b> <tt>'.$fn.'</tt>'; |
return '<br /><b>'.&mt('Processed file').':</b> <tt>'. |
|
&Apache::loncfile::display($fn).'</tt>'; |
} |
} |
|
|
######################################### |
######################################### |
Line 332 sub textfield {
|
Line 317 sub textfield {
|
$value=~s/\s+$//gs; |
$value=~s/\s+$//gs; |
$value=~s/\s+/ /gs; |
$value=~s/\s+/ /gs; |
$title=&mt($title); |
$title=&mt($title); |
my $uctitle=uc($title); |
return "\n<p><font color=\"#800000\" face=\"helvetica\"><b>$title:". |
return "\n<p><font color=\"#800000\" face=\"helvetica\"><b>$uctitle:". |
|
"</b></font></p><br />". |
"</b></font></p><br />". |
'<input type="text" name="'.$name.'" size=80 value="'.$value.'" />'; |
'<input type="text" name="'.$name.'" size=80 value="'.$value.'" />'; |
} |
} |
Line 346 sub hiddenfield {
|
Line 330 sub hiddenfield {
|
sub selectbox { |
sub selectbox { |
my ($title,$name,$value,$functionref,@idlist)=@_; |
my ($title,$name,$value,$functionref,@idlist)=@_; |
$title=&mt($title); |
$title=&mt($title); |
my $uctitle=uc($title); |
|
$value=(split(/\s*,\s*/,$value))[-1]; |
$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>$title:". |
'</b></font></p><br /><select name="'.$name.'">'; |
'</b></font></p><br /><select name="'.$name.'">'; |
foreach (@idlist) { |
foreach (@idlist) { |
$selout.='<option value=\''.$_.'\''; |
$selout.='<option value=\''.$_.'\''; |
Line 625 sub fix_ids_and_indices {
|
Line 608 sub fix_ids_and_indices {
|
join(', ',@duplicatedids)); |
join(', ',@duplicatedids)); |
if ($duplicateids) { |
if ($duplicateids) { |
print $logfile "Duplicate ID(s) exist, ".join(', ',@duplicatedids)."\n"; |
print $logfile "Duplicate ID(s) exist, ".join(', ',@duplicatedids)."\n"; |
my $outstring='<font color="red">Unable to publish file, it contains duplicated ID(s), ID(s) need to be unique. The duplicated ID(s) are: '.join(', ',@duplicatedids).'</font>'; |
my $outstring='<font color="red">'.&mt('Unable to publish file, it contains duplicated ID(s), ID(s) need to be unique. The duplicated ID(s) are').': '.join(', ',@duplicatedids).'</font>'; |
return ($outstring,1); |
return ($outstring,1); |
} |
} |
if ($needsfixup) { |
if ($needsfixup) { |
Line 690 sub fix_ids_and_indices {
|
Line 673 sub fix_ids_and_indices {
|
} |
} |
if ($lctag eq 'applet') { |
if ($lctag eq 'applet') { |
my $codebase=''; |
my $codebase=''; |
if (defined($parms{'codebase'})) { |
my $havecodebase=0; |
my $oldcodebase=$parms{'codebase'}; |
foreach my $key (keys(%parms)) { |
|
if (lc($key) eq 'codebase') { |
|
$codebase=$parms{$key}; |
|
$havecodebase=1; |
|
} |
|
} |
|
if ($havecodebase) { |
|
my $oldcodebase=$codebase; |
unless ($oldcodebase=~/\/$/) { |
unless ($oldcodebase=~/\/$/) { |
$oldcodebase.='/'; |
$oldcodebase.='/'; |
} |
} |
Line 705 sub fix_ids_and_indices {
|
Line 695 sub fix_ids_and_indices {
|
} |
} |
$allow{&absoluteurl($codebase,$target).'/*'}=1; |
$allow{&absoluteurl($codebase,$target).'/*'}=1; |
} else { |
} else { |
foreach ('archive','code','object') { |
foreach my $key (keys(%parms)) { |
if (defined($parms{$_})) { |
if ($key =~ /(archive|code|object)/i) { |
my $oldurl=$parms{$_}; |
my $oldurl=$parms{$key}; |
my $newurl=&urlfixup($oldurl,$target); |
my $newurl=&urlfixup($oldurl,$target); |
$newurl=~s/\/[^\/]+$/\/\*/; |
$newurl=~s/\/[^\/]+$/\/\*/; |
print $logfile 'Allow: applet '.$_.':'. |
print $logfile 'Allow: applet '.lc($key).':'. |
$oldurl.' allows '. |
$oldurl.' allows '.$newurl."\n"; |
$newurl."\n"; |
|
$allow{&absoluteurl($newurl,$target)}=1; |
$allow{&absoluteurl($newurl,$target)}=1; |
} |
} |
} |
} |
Line 777 Returns: (error,status). error is undef
|
Line 766 Returns: (error,status). error is undef
|
######################################### |
######################################### |
######################################### |
######################################### |
sub store_metadata { |
sub store_metadata { |
my %metadata = %{shift()}; |
my %metadata = @_; |
my $error; |
my $error; |
# Determine if the table exists |
# Determine if the table exists |
my $status = &Apache::lonmysql::check_table('metadata'); |
my $status = &Apache::lonmysql::check_table('metadata'); |
Line 794 sub store_metadata {
|
Line 783 sub store_metadata {
|
&Apache::lonnet::logthis($error); |
&Apache::lonnet::logthis($error); |
return ($error,undef); |
return ($error,undef); |
} |
} |
# Remove old value from table |
if (($metadata{'obsolete'}) || ($metadata{'copyright'} eq 'priv') || |
$status = &Apache::lonmysql::remove_from_table |
($metadata{'copyright'} eq 'custom')) { |
('metadata','url',$metadata{'url'}); |
# remove this entry |
if (! defined($status)) { |
$status=&Apache::lonmysql::remove_from_table |
$error = '<font color="red">Error when removing old values from '. |
('metadata','url',$metadata{'url'}); |
'metadata table in LON-CAPA database.</font>'; |
} else { |
&Apache::lonnet::logthis($error); |
# store new data |
return ($error,undef); |
# adjust some values to metadatadatabase (e.g., "usage" is a reserved word) |
|
$metadata{'creationdate'}= |
|
&Apache::lonmysql::sqltime($metadata{'creationdate'}); |
|
$metadata{'lastrevisiondate'}= |
|
&Apache::lonmysql::sqltime($metadata{'lastrevisiondate'}); |
|
$metadata{'sequsage'}=$metadata{'usage'}; |
|
$metadata{'sequsage_list'}=$metadata{'usage_list'}; |
|
my %newmetadata=(); |
|
# see if we have old entries |
|
my @oldmeta=&Apache::lonmysql::get_rows('metadata', |
|
"url LIKE BINARY '". |
|
$metadata{'url'}."'"); |
|
if ($#oldmeta==0) { |
|
# yes, there is one old entry, transfer to newmetadata |
|
%newmetadata=&Apache::lonmeta::metadata_col_to_hash(@{$oldmeta[0]}); |
|
# remove old entry |
|
$status=&Apache::lonmysql::remove_from_table |
|
('metadata','url',$metadata{'url'}); |
|
} elsif ($#oldmeta>0) { |
|
# more than one entry fit - how did that happen? |
|
$error='<font color="red">Error occured retrieving old values in '. |
|
'metadata table in LON-CAPA database: '.$#oldmeta. |
|
' matches</font>'; |
|
&Apache::lonnet::logthis($error); |
|
return ($error,undef); |
|
} |
|
# store new data on top of it |
|
foreach (keys %metadata) { |
|
$newmetadata{$_}=$metadata{$_}; |
|
} |
|
$status = &Apache::lonmysql::store_row('metadata',\%newmetadata); |
} |
} |
# Store data in table. |
|
$status = &Apache::lonmysql::store_row('metadata',\%metadata); |
|
if (! defined($status)) { |
if (! defined($status)) { |
$error='<font color="red">Error occured storing new values in '. |
$error='<font color="red">Error occured storing new values in '. |
'metadata table in LON-CAPA database</font>'; |
'metadata table in LON-CAPA database</font>'; |
Line 865 sub publish {
|
Line 882 sub publish {
|
my %allow=(); |
my %allow=(); |
|
|
unless ($logfile=Apache::File->new('>>'.$source.'.log')) { |
unless ($logfile=Apache::File->new('>>'.$source.'.log')) { |
return ('<font color="red">No write permission to user directory, FAIL</font>',1); |
return ('<font color="red">'.&mt('No write permission to user directory, FAIL').'</font>',1); |
} |
} |
print $logfile |
print $logfile |
"\n\n================= Publish ".localtime()." Phase One ================\n".$ENV{'user.name'}.'@'.$ENV{'user.domain'}."\n"; |
"\n\n================= Publish ".localtime()." Phase One ================\n".$ENV{'user.name'}.'@'.$ENV{'user.domain'}."\n"; |
Line 889 sub publish {
|
Line 906 sub publish {
|
if ($error) { return ($outstring,$error); } |
if ($error) { return ($outstring,$error); } |
# ------------------------------------------------------------ Construct Allows |
# ------------------------------------------------------------ Construct Allows |
|
|
$scrout.='<h3>Dependencies</h3>'; |
$scrout.='<h3>'.&mt('Dependencies').'</h3>'; |
my $allowstr=''; |
my $allowstr=''; |
foreach (sort(keys(%allow))) { |
foreach (sort(keys(%allow))) { |
my $thisdep=$_; |
my $thisdep=$_; |
Line 907 sub publish {
|
Line 924 sub publish {
|
if ( |
if ( |
&Apache::lonnet::getfile($Apache::lonnet::perlvar{'lonDocRoot'}.'/'. |
&Apache::lonnet::getfile($Apache::lonnet::perlvar{'lonDocRoot'}.'/'. |
$thisdep.'.meta') eq '-1') { |
$thisdep.'.meta') eq '-1') { |
$scrout.= ' - <font color="red">Currently not available'. |
$scrout.= ' - <font color="red">'.&mt('Currently not available'). |
'</font>'; |
'</font>'; |
} else { |
} else { |
my %temphash=(&Apache::lonnet::declutter($target).'___'. |
my %temphash=(&Apache::lonnet::declutter($target).'___'. |
Line 968 sub publish {
|
Line 985 sub publish {
|
$metadatafields{'author'}=~s/\s+/ /g; |
$metadatafields{'author'}=~s/\s+/ /g; |
$metadatafields{'author'}=~s/\s+$//; |
$metadatafields{'author'}=~s/\s+$//; |
$metadatafields{'owner'}=$cuname.'@'.$cudom; |
$metadatafields{'owner'}=$cuname.'@'.$cudom; |
$metadatafields{'modifyinguser'}=$ENV{'user.name'}.'@'. |
|
$ENV{'user.domain'}; |
|
$metadatafields{'authorspace'}=$cuname.'@'.$cudom; |
|
|
|
# ----------------------------------------------------------- Parse file itself |
|
# read %metadatafields from file itself |
|
|
|
$allmeta=&parseformeta($source,$style); |
|
# ------------------------------------------------ Check out directory hierachy |
# ------------------------------------------------ Check out directory hierachy |
|
|
my $thisdisfn=$source; |
my $thisdisfn=$source; |
Line 992 sub publish {
|
Line 1002 sub publish {
|
$scrout.=&metaread($logfile,$currentpath.'default.meta',$prefix); |
$scrout.=&metaread($logfile,$currentpath.'default.meta',$prefix); |
$prefix=~s|^\.\./||; |
$prefix=~s|^\.\./||; |
} |
} |
|
# ----------------------------------------------------------- Parse file itself |
|
# read %metadatafields from file itself |
|
|
|
$allmeta=&parseformeta($source,$style); |
|
|
# ------------------- Clear out parameters and stores (there should not be any) |
# ------------------- Clear out parameters and stores (there should not be any) |
|
|
Line 1084 sub publish {
|
Line 1098 sub publish {
|
unless ($batch) { |
unless ($batch) { |
$scrout.= |
$scrout.= |
'<form name="pubform" action="/adm/publish" method="post">'. |
'<form name="pubform" action="/adm/publish" method="post">'. |
'<p><input type="submit" value="Finalize Publication" /></p>'. |
'<p><input type="submit" value="'.&mt('Finalize Publication').'" /></p>'. |
&hiddenfield('phase','two'). |
&hiddenfield('phase','two'). |
&hiddenfield('filename',$ENV{'form.filename'}). |
&hiddenfield('filename',$ENV{'form.filename'}). |
&hiddenfield('allmeta',&Apache::lonnet::escape($allmeta)). |
&hiddenfield('allmeta',&Apache::lonnet::escape($allmeta)). |
Line 1096 sub publish {
|
Line 1110 sub publish {
|
# --------------------------------------------------- Scan content for keywords |
# --------------------------------------------------- Scan content for keywords |
|
|
my $keywords_help = Apache::loncommon::help_open_topic("Publishing_Keywords"); |
my $keywords_help = Apache::loncommon::help_open_topic("Publishing_Keywords"); |
|
my $KEYWORDS=&mt('Keywords'); |
|
my $CheckAll=&mt('check all'); |
|
my $UncheckAll=&mt('uncheck all'); |
my $keywordout=<<"END"; |
my $keywordout=<<"END"; |
<script> |
<script> |
function checkAll(field) { |
function checkAll(field) { |
Line 1108 function uncheckAll(field) {
|
Line 1125 function uncheckAll(field) {
|
field[i].checked = false ; |
field[i].checked = false ; |
} |
} |
</script> |
</script> |
<p><font color="#800000" face="helvetica"><b>KEYWORDS:</b></font> |
<p><font color="#800000" face="helvetica"><b>$KEYWORDS:</b></font> |
$keywords_help</b> |
$keywords_help</b> |
<input type="button" value="check all" onclick="javascript:checkAll(document.pubform.keywords)" /> |
<input type="button" value="$CheckAll" onclick="javascript:checkAll(document.pubform.keywords)" /> |
<input type="button" value="uncheck all" onclick="javascript:uncheckAll(document.pubform.keywords)" /> |
<input type="button" value="$UncheckAll" onclick="javascript:uncheckAll(document.pubform.keywords)" /> |
</p> |
</p> |
<br /> |
<br /> |
END |
END |
Line 1144 END
|
Line 1161 END
|
$scrout.=&textfield('Notes','notes',$metadatafields{'notes'}); |
$scrout.=&textfield('Notes','notes',$metadatafields{'notes'}); |
|
|
$scrout.= |
$scrout.= |
"\n<p><font color=\"#800000\" face=\"helvetica\"><b>ABSTRACT:". |
"\n<p><font color=\"#800000\" face=\"helvetica\"><b>".&mt('Abstract').":". |
"</b></font></p><br />". |
"</b></font></p><br />". |
'<textarea cols="80" rows="5" name="abstract">'. |
'<textarea cols="80" rows="5" name="abstract">'. |
$metadatafields{'abstract'}.'</textarea></p>'; |
$metadatafields{'abstract'}.'</textarea></p>'; |
|
|
$source=~/\.(\w+)$/; |
$source=~/\.(\w+)$/; |
|
|
|
|
|
$scrout.= |
|
"\n<p><font color=\"#800000\" face=\"helvetica\"><b>". |
|
&mt('Lowest Grade Level').':'. |
|
"</b></font></p><br />". |
|
&Apache::loncommon::select_level_form($metadatafields{'lowestgradelevel'},'lowestgradelevel'). |
|
"\n<p><font color=\"#800000\" face=\"helvetica\"><b>". |
|
&mt('Highest Grade Level').':'. |
|
"</b></font></p><br />". |
|
&Apache::loncommon::select_level_form($metadatafields{'highestgradelevel'},'highestgradelevel'). |
|
&textfield('Standards','standards',$metadatafields{'standards'}); |
|
|
|
|
|
|
|
|
$scrout.=&hiddenfield('mime',$1); |
$scrout.=&hiddenfield('mime',$1); |
|
|
my $defaultlanguage=$metadatafields{'language'}; |
my $defaultlanguage=$metadatafields{'language'}; |
Line 1168 END
|
Line 1200 END
|
$metadatafields{'creationdate'}=time; |
$metadatafields{'creationdate'}=time; |
} |
} |
$scrout.=&hiddenfield('creationdate', |
$scrout.=&hiddenfield('creationdate', |
&Apache::loncommon::unsqltime($metadatafields{'creationdate'})); |
&Apache::lonmysql::unsqltime($metadatafields{'creationdate'})); |
|
|
$scrout.=&hiddenfield('lastrevisiondate',time); |
$scrout.=&hiddenfield('lastrevisiondate',time); |
|
|
Line 1326 sub phasetwo {
|
Line 1358 sub phasetwo {
|
$metadatafields{'lastrevisiondate'}=$ENV{'form.lastrevisiondate'}; |
$metadatafields{'lastrevisiondate'}=$ENV{'form.lastrevisiondate'}; |
$metadatafields{'owner'}=$ENV{'form.owner'}; |
$metadatafields{'owner'}=$ENV{'form.owner'}; |
$metadatafields{'copyright'}=$ENV{'form.copyright'}; |
$metadatafields{'copyright'}=$ENV{'form.copyright'}; |
|
$metadatafields{'standards'}=$ENV{'form.standards'}; |
|
$metadatafields{'lowestgradelevel'}=$ENV{'form.lowestgradelevel'}; |
|
$metadatafields{'highestgradelevel'}=$ENV{'form.highestgradelevel'}; |
$metadatafields{'customdistributionfile'}= |
$metadatafields{'customdistributionfile'}= |
$ENV{'form.customdistributionfile'}; |
$ENV{'form.customdistributionfile'}; |
$metadatafields{'obsolete'}=$ENV{'form.obsolete'}; |
$metadatafields{'obsolete'}=$ENV{'form.obsolete'}; |
$metadatafields{'obsoletereplacement'}= |
$metadatafields{'obsoletereplacement'}= |
$ENV{'form.obsoletereplacement'}; |
$ENV{'form.obsoletereplacement'}; |
$metadatafields{'dependencies'}=$ENV{'form.dependencies'}; |
$metadatafields{'dependencies'}=$ENV{'form.dependencies'}; |
|
$metadatafields{'modifyinguser'}=$ENV{'user.name'}.'@'. |
|
$ENV{'user.domain'}; |
|
$metadatafields{'authorspace'}=$cuname.'@'.$cudom; |
|
|
my $allkeywords=$ENV{'form.addkey'}; |
my $allkeywords=$ENV{'form.addkey'}; |
if (exists($ENV{'form.keywords'})) { |
if (exists($ENV{'form.keywords'})) { |
Line 1345 sub phasetwo {
|
Line 1383 sub phasetwo {
|
$allkeywords=~s/^\,//; |
$allkeywords=~s/^\,//; |
$metadatafields{'keywords'}=$allkeywords; |
$metadatafields{'keywords'}=$allkeywords; |
|
|
|
# check if custom distribution file is specified |
|
if ($metadatafields{'copyright'} eq 'custom') { |
|
my $file=$metadatafields{'customdistributionfile'}; |
|
unless ($file=~/\.rights$/) { |
|
return |
|
'<font color="red">'.&mt('No valid custom distribution rights file specified, FAIL'). |
|
'</font>'; |
|
} |
|
} |
{ |
{ |
print $logfile "\nWrite metadata file for ".$source; |
print $logfile "\nWrite metadata file for ".$source; |
my $mfh; |
my $mfh; |
Line 1378 sub phasetwo {
|
Line 1425 sub phasetwo {
|
|
|
$metadatafields{'url'} = $distarget; |
$metadatafields{'url'} = $distarget; |
$metadatafields{'version'} = 'current'; |
$metadatafields{'version'} = 'current'; |
unless ($metadatafields{'copyright'} eq 'priv') { |
|
my ($error,$success) = &store_metadata(\%metadatafields); |
my ($error,$success) = &store_metadata(%metadatafields); |
if ($success) { |
if ($success) { |
$r->print('<p>'.&mt('Synchronized SQL metadata database').'</p>'); |
$r->print('<p>'.&mt('Synchronized SQL metadata database').'</p>'); |
print $logfile "\nSynchronized SQL metadata database"; |
print $logfile "\nSynchronized SQL metadata database"; |
} else { |
|
$r->print($error); |
|
print $logfile "\n".$error; |
|
} |
|
} else { |
} else { |
$r->print('<p>'. |
$r->print($error); |
&mt('Private Publication - did not synchronize database').'</p>'); |
print $logfile "\n".$error; |
print $logfile "\nPrivate: Did not synchronize data into ". |
|
"SQL metadata database"; |
|
} |
} |
|
|
# ----------------------------------------------------------- Copy old versions |
# ----------------------------------------------------------- Copy old versions |
|
|
if (-e $target) { |
if (-e $target) { |
Line 1550 sub phasetwo {
|
Line 1592 sub phasetwo {
|
'"><font size="+2">'. |
'"><font size="+2">'. |
&mt('Back to Source Directory').'</font></a></p>'); |
&mt('Back to Source Directory').'</font></a></p>'); |
} |
} |
|
return '<p><font color="green">'.&mt('Done').'</font></p>'; |
} |
} |
|
|
######################################### |
######################################### |
Line 1604 sub publishdirectory {
|
Line 1647 sub publishdirectory {
|
my $resdir= |
my $resdir= |
$Apache::lonnet::perlvar{'lonDocRoot'}.'/res/'.$cudom.'/'.$cuname.'/'. |
$Apache::lonnet::perlvar{'lonDocRoot'}.'/res/'.$cudom.'/'.$cuname.'/'. |
$thisdisfn; |
$thisdisfn; |
$r->print('<h1>Directory <tt>'.$thisdisfn.'</tt></h1>'. |
$r->print('<h1>'.&mt('Directory').' <tt>'.$thisdisfn.'</tt></h1>'. |
'Target: <tt>'.$resdir.'</tt><br />'); |
&mt('Target').': <tt>'.$resdir.'</tt><br />'); |
|
|
my $dirptr=16384; # Mask indicating a directory in stat.cmode. |
my $dirptr=16384; # Mask indicating a directory in stat.cmode. |
|
|
Line 1643 sub publishdirectory {
|
Line 1686 sub publishdirectory {
|
if ($publishthis) { |
if ($publishthis) { |
&batchpublish($r,$fn.'/'.$filename,$resdir.'/'.$filename); |
&batchpublish($r,$fn.'/'.$filename,$resdir.'/'.$filename); |
} else { |
} else { |
$r->print('<br />Skipping '.$filename.'<br />'); |
$r->print('<br />'.&mt('Skipping').' '.$filename.'<br />'); |
} |
} |
$r->rflush(); |
$r->rflush(); |
} |
} |
Line 1849 ENDDIFF
|
Line 1892 ENDDIFF
|
my ($outstring,$error)=&publish($thisfn,$thistarget,$thisembstyle); |
my ($outstring,$error)=&publish($thisfn,$thistarget,$thisembstyle); |
$r->print('<hr />'.$outstring); |
$r->print('<hr />'.$outstring); |
} else { |
} else { |
$r->print('<hr />'); |
$r->print('<hr />'. |
&phasetwo($r,$thisfn,$thistarget,$thisembstyle,$thisdistarget); |
&phasetwo($r,$thisfn,$thistarget,$thisembstyle,$thisdistarget)); |
} |
} |
} |
} |
$r->print('</body></html>'); |
$r->print('</body></html>'); |