--- loncom/publisher/lonpublisher.pm 2009/11/24 01:01:28 1.249.2.3
+++ loncom/publisher/lonpublisher.pm 2009/03/26 11:27:26 1.254
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Publication Handler
#
-# $Id: lonpublisher.pm,v 1.249.2.3 2009/11/24 01:01:28 raeburn Exp $
+# $Id: lonpublisher.pm,v 1.254 2009/03/26 11:27:26 bisitz Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1062,7 +1062,7 @@ sub publish {
my %oldparmstores=();
unless ($batch) {
- $scrout.='
'.&mt('Metadata Information').' ' .
+ $scrout.=''.&mt('Metadata').' ' .
&Apache::loncommon::help_open_topic("Metadata_Description")
. '
';
}
@@ -1282,11 +1282,11 @@ END
$keywordout.='';
@@ -1504,7 +1504,7 @@ sub phasetwo {
return 0;
}
if ($target=~/\.(\d+)\.(\w+)$/) {
- $r->print(''.&mt('Cannot publish versioned resource, FAIL').'');
+ $r->print(''.&mt('Filename of resource contains internal version number. Cannot publish such resources, FAIL').'');
return 0;
}
}
@@ -1640,8 +1640,7 @@ sub phasetwo {
my $srcf=$2;
my $srct=$3;
my $srcd=$1;
- my $docroot = $Apache::lonnet::perlvar{'lonDocRoot'};
- unless ($srcd=~/^\Q$docroot\E\/res/) {
+ unless ($srcd=~/^\/home\/httpd\/html\/res/) {
print $logfile "\nPANIC: Target dir is ".$srcd;
$r->print(
"".&mt('Invalid target directory, FAIL')."");
@@ -1660,7 +1659,7 @@ sub phasetwo {
}
closedir(DIR);
$maxversion++;
- $r->print('
Creating old version '.$maxversion.'
');
+ $r->print(''.&mt('Creating old version [_1]',$maxversion).'
');
print $logfile "\nCreating old version ".$maxversion."\n";
my $copyfile=$srcd.'/'.$srcf.'.'.$maxversion.'.'.$srct;
@@ -1742,8 +1741,7 @@ sub phasetwo {
# ------------------------------------------------------------- Trigger updates
push(@{$modified_urls},[$target,$source]);
unless ($registered_cleanup) {
- my $handlers = $r->get_handlers('PerlCleanupHandler');
- $r->set_handlers('PerlCleanupHandler' => [\¬ify,@{$handlers}]);
+ $r->register_cleanup(\¬ify);
$registered_cleanup=1;
}
@@ -1774,7 +1772,7 @@ sub phasetwo {
&mt('Back to Source Directory').'');
}
$logfile->close();
- $r->print(''.&mt('Done').'
');
+ $r->print(''.&mt('Done').'
');
return 1;
}
@@ -1841,7 +1839,11 @@ sub batchpublish {
my $thisembstyle=&Apache::loncommon::fileembstyle($thistype);
- $r->print(''.&mt('Publishing').' '.$thisdisfn.'
');
+ $r->print(''
+ .&mt('Publishing [_1]'
+ ,''.$thisdisfn.'')
+ .'
'
+ );
# phase one takes
# my ($source,$target,$style,$batch)=@_;
@@ -1880,7 +1882,7 @@ sub publishdirectory {
&checkbox('pubrec','include subdirectories').
&checkbox('forcerepub','force republication of previously published files').
&checkbox('obsolete','make file(s) obsolete').
- &checkbox('forceoverride','force directory level catalog information over existing').
+ &checkbox('forceoverride','force directory level metadata over existing').
'
');
$lock=0;
} else {
@@ -1951,7 +1953,7 @@ sub defaultmetapublish {
&Apache::loncommon::content_type($r,'text/html');
$r->send_http_header;
- $r->print(&Apache::loncommon::start_page('Catalog Information Publication'));
+ $r->print(&Apache::loncommon::start_page('Metadata Publication'));
# ---------------------------------------------------------------- Write Source
my $copyfile=$target;
@@ -1986,7 +1988,7 @@ sub defaultmetapublish {
# ------------------------------------------------------------------- Link back
my $link=$fn;
$link=~s/^\/home\/$cuname\/public_html\//\/priv\/$cuname\//;
- $r->print("".&mt('Back to Catalog Information').'');
+ $r->print("".&mt('Back to Metadata').'');
$r->print(&Apache::loncommon::end_page());
return OK;
}
@@ -2171,7 +2173,11 @@ sub handler {
my $thisembstyle=&Apache::loncommon::fileembstyle($thistype);
if ($thistype eq 'page') { $thisembstyle = 'rat'; }
- $r->print(''.&mt('Publishing [_1]',''.$thisdisfn.'').'
');
+ $r->print(''
+ .&mt('Publishing [_1]'
+ ,''.$thisdisfn.'')
+ .'
'
+ );
$r->print(''.&mt('Resource Details').'
');