version 1.13, 2002/08/24 03:56:58
|
version 1.16, 2003/06/23 21:56:31
|
Line 44
|
Line 44
|
# |
# |
# 04/05,04/09,05/25,06/23,06/24,08/22 Gerd Kortemeyer |
# 04/05,04/09,05/25,06/23,06/24,08/22 Gerd Kortemeyer |
# 11/29 Matthew Hall |
# 11/29 Matthew Hall |
# 12/16 Scott Harrison |
|
# |
# |
### |
### |
|
|
Line 59 use Apache::loncacc;
|
Line 58 use Apache::loncacc;
|
use Apache::loncommon(); |
use Apache::loncommon(); |
use Apache::Log(); |
use Apache::Log(); |
use Apache::lonnet; |
use Apache::lonnet; |
|
use HTML::Entities(); |
|
|
my $DEBUG=0; |
my $DEBUG=0; |
|
|
Line 159 sub phasetwo {
|
Line 159 sub phasetwo {
|
# target is the full filesystem path of the destination file. |
# target is the full filesystem path of the destination file. |
my $base = &File::Basename::basename($fn); |
my $base = &File::Basename::basename($fn); |
my $path = &File::Basename::dirname($fn); |
my $path = &File::Basename::dirname($fn); |
$base = Apache::lonnet::escape($base); |
$base = &HTML::Entities::encode($base); |
my $url = $path."/".$base; |
my $url = $path."/".$base; |
&Debug($r, "URL is now ".$url); |
&Debug($r, "URL is now ".$url); |
my $datatoken=$ENV{'form.datatoken'}; |
my $datatoken=$ENV{'form.datatoken'}; |
Line 195 sub phasetwo {
|
Line 195 sub phasetwo {
|
$r->print('File copied.'); |
$r->print('File copied.'); |
$r->print('<p><font size=+2><a href="'.$url. |
$r->print('<p><font size=+2><a href="'.$url. |
'">View file</a></font>'); |
'">View file</a></font>'); |
|
$r->print('<p><font size=+2><a href="'.$path. |
|
'">Back to Directory</a></font>'); |
} else { |
} else { |
$r->print('Failed to copy: '.$!); |
$r->print('Failed to copy: '.$!); |
} |
} |