--- loncom/publisher/lonpublisher.pm 2009/02/11 11:49:22 1.251 +++ loncom/publisher/lonpublisher.pm 2009/04/04 20:06:43 1.256 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Publication Handler # -# $Id: lonpublisher.pm,v 1.251 2009/02/11 11:49:22 schafran Exp $ +# $Id: lonpublisher.pm,v 1.256 2009/04/04 20:06:43 bisitz Exp $ # # Copyright Michigan State University Board of Trustees # @@ -1062,7 +1062,7 @@ sub publish { my %oldparmstores=(); unless ($batch) { - $scrout.='
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; @@ -1708,8 +1708,12 @@ sub phasetwo { $path.="/$parts[$count]"; if ((-e $path)!=1) { print $logfile "\nCreating directory ".$path; - $r->print(''.&mt('Created directory').' '.$parts[$count].'
'); mkdir($path,0777); + $r->print('' + .&mt('Created directory [_1]' + ,''.$parts[$count].'') + .'
' + ); } } @@ -1752,9 +1756,12 @@ sub phasetwo { &Apache::lonnet::devalidate_cache_new('meta', &Apache::lonnet::declutter($thisdistarget)); +# ------------------------------------------------------------- Everything done + $logfile->close(); + $r->print(''.&mt('Done').'
'); + # ------------------------------------------------ Provide link to new resource unless ($batch) { - my $thissrc=$source; $thissrc=~s{^/home/($match_username)/public_html}{/priv/$1}; @@ -1771,8 +1778,6 @@ sub phasetwo { '">'. &mt('Back to Source Directory').''); } - $logfile->close(); - $r->print(''.&mt('Done').'
'); return 1; } @@ -1839,7 +1844,11 @@ sub batchpublish { my $thisembstyle=&Apache::loncommon::fileembstyle($thistype); - $r->print(''.&mt('Created directory').' '.$parts[$count].'
'); mkdir($path,0777); + $r->print('' + .&mt('Created directory [_1]' + ,''.$parts[$count].'') + .'
' + ); } } @@ -2169,7 +2182,11 @@ sub handler { my $thisembstyle=&Apache::loncommon::fileembstyle($thistype); if ($thistype eq 'page') { $thisembstyle = 'rat'; } - $r->print('