--- loncom/interface/lonprintout.pm 2003/08/01 19:22:47 1.207 +++ loncom/interface/lonprintout.pm 2003/08/13 19:52:05 1.208.2.1 @@ -1,7 +1,7 @@ # The LearningOnline Network # Printout # -# $Id: lonprintout.pm,v 1.207 2003/08/01 19:22:47 sakharuk Exp $ +# $Id: lonprintout.pm,v 1.208.2.1 2003/08/13 19:52:05 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -465,7 +465,7 @@ sub page_format { sub get_name { my ($uname,$udom)=@_; if (!defined($uname)) { $uname=$ENV{'user.name'}; } - if (!defined($udom)) { $uname=$ENV{'user.domain'}; } + if (!defined($udom)) { $udom=$ENV{'user.domain'}; } my $plainname=&Apache::loncommon::plainname($uname,$udom); if ($plainname=~/^\s*$/) { $plainname=$uname; } return &Apache::lonxml::latex_special_symbols($plainname,undef,undef, @@ -958,8 +958,7 @@ sub printHelper { # This will persistently load in the data we want from the # very first screen. # Detect whether we're coming from construction space - if ($ENV{'form.postdata'} =~ /http:\/\// ) { - $ENV{'form.postdata'} =~ /http:\/\/[^\/]+\/~([^\/]+)\/(.*)/; + if ($ENV{'form.postdata'}=~/^(?:http:\/\/[^\/]+\/|\/|)\~([^\/]+)\/(.*)$/) { $helper->{VARS}->{'filename'} = "/home/$1/public_html/$2"; $helper->{VARS}->{'construction'} = 1; } else {