--- loncom/publisher/lonpublisher.pm 2003/02/03 18:03:53 1.108 +++ loncom/publisher/lonpublisher.pm 2003/02/18 23:18:50 1.112 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Publication Handler # -# $Id: lonpublisher.pm,v 1.108 2003/02/03 18:03:53 harris41 Exp $ +# $Id: lonpublisher.pm,v 1.112 2003/02/18 23:18:50 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -117,7 +117,6 @@ use File::Copy; use Apache::Constants qw(:common :http :methods); use HTML::LCParser; use Apache::lonxml; -use Apache::lonhomework; use Apache::loncacc; use DBI; use Apache::lonnet(); @@ -1199,11 +1198,18 @@ sub phasetwo { my ($r,$source,$target,$style,$distarget,$batch)=@_; $source=~s/\/+/\//g; $target=~s/\/+/\//g; + + if ($target=~/\_\_\_/) { + $r->print( + 'Unsupported character combination "___" in filename, FAIL'); + return 0; + } $distarget=~s/\/+/\//g; my $logfile; unless ($logfile=Apache::File->new('>>'.$source.'.log')) { - return - 'No write permission to user directory, FAIL'; + $r->print( + 'No write permission to user directory, FAIL'); + return 0; } print $logfile "\n================= Publish ".localtime()." Phase Two ================\n";