--- loncom/publisher/loncfile.pm 2006/04/13 18:30:30 1.76 +++ loncom/publisher/loncfile.pm 2006/11/22 22:10:58 1.78 @@ -9,7 +9,7 @@ # and displays a page showing the results of the action. # # -# $Id: loncfile.pm,v 1.76 2006/04/13 18:30:30 albertel Exp $ +# $Id: loncfile.pm,v 1.78 2006/11/22 22:10:58 banghart Exp $ # # Copyright Michigan State University Board of Trustees # @@ -72,6 +72,9 @@ use Apache::loncacc; use Apache::lonnet; use Apache::loncommon(); use Apache::lonlocal; +use lib '/home/httpd/lib/perl/'; +use LONCAPA; + my $DEBUG=0; my $r; # Needs to be global for some stuff RF. @@ -1135,7 +1138,7 @@ sub phasetwo { &Debug($r, "loncfile - Entering phase 2 for $fn"); - # Break down the file into it's component pieces. + # Break down the file into its component pieces. my $dir; # Directory path my $main; # Filename. @@ -1176,7 +1179,7 @@ sub phasetwo { if(!&Rename2($r, $uname, $dir, $fn, $env{'form.newfilename'})) { return; } - $dest = $env{'form.newfilename'}; + $dest = $dir."/"; } } elsif ($env{'form.action'} eq 'delete') { if(!&Delete2($r, $uname, $env{'form.newfilename'})) { @@ -1229,12 +1232,12 @@ sub handler { if ($env{'form.filename'}) { &Debug($r, "test: $env{'form.filename'}"); - $fn=&Apache::lonnet::unescape($env{'form.filename'}); + $fn=&unescape($env{'form.filename'}); $fn=&URLToPath($fn); } elsif($ENV{'QUERY_STRING'} && $env{'form.phase'} ne 'two') { #Just hijack the script only the first time around to inject the #correct information for further processing - $fn=&Apache::lonnet::unescape($env{'form.decompress'}); + $fn=&unescape($env{'form.decompress'}); $fn=&URLToPath($fn); $env{'form.action'}="decompress"; } elsif ($env{'form.qualifiedfilename'}) {