version 1.567, 2004/11/10 19:03:04
|
version 1.570, 2004/11/17 16:40:00
|
Line 1407 sub finishuserfileupload {
|
Line 1407 sub finishuserfileupload {
|
# Save the file |
# Save the file |
{ |
{ |
#&Apache::lonnet::logthis("Saving to $filepath $file"); |
#&Apache::lonnet::logthis("Saving to $filepath $file"); |
open(my $fh,'>'.$filepath.'/'.$file); |
open(FH,'>'.$filepath.'/'.$file); |
print $fh $ENV{'form.'.$formname}; |
print FH $ENV{'form.'.$formname}; |
close($fh); |
close(FH); |
} |
} |
# Notify homeserver to grep it |
# Notify homeserver to grep it |
# |
# |
Line 4710 sub symbverify {
|
Line 4710 sub symbverify {
|
|
|
sub symbclean { |
sub symbclean { |
my $symb=shift; |
my $symb=shift; |
|
if ($symb=~m|^/enc/|) { $symb=&Apache::lonenc::unencrypted($symb); } |
# remove version from map |
# remove version from map |
$symb=~s/\.(\d+)\.(\w+)\_\_\_/\.$2\_\_\_/; |
$symb=~s/\.(\d+)\.(\w+)\_\_\_/\.$2\_\_\_/; |
|
|
Line 4731 sub encode_symb {
|
Line 4731 sub encode_symb {
|
} |
} |
|
|
sub decode_symb { |
sub decode_symb { |
my ($map,$resid,$url)=split(/\_\_\_/,shift); |
my $symb=shift; |
|
if ($symb=~m|^/enc/|) { $symb=&Apache::lonenc::unencrypted($symb); } |
|
my ($map,$resid,$url)=split(/___/,$symb); |
return (&fixversion($map),$resid,&fixversion($url)); |
return (&fixversion($map),$resid,&fixversion($url)); |
} |
} |
|
|
Line 4780 sub symbread {
|
Line 4782 sub symbread {
|
} |
} |
$thisfn=$ENV{'request.filename'}; |
$thisfn=$ENV{'request.filename'}; |
} |
} |
|
if ($thisfn=~m|^/enc/|) { $thisfn=&Apache::lonenc::unencrypted($thisfn); } |
# is that filename actually a symb? Verify, clean, and return |
# is that filename actually a symb? Verify, clean, and return |
if ($thisfn=~/\_\_\_\d+\_\_\_(.*)$/) { |
if ($thisfn=~/\_\_\_\d+\_\_\_(.*)$/) { |
if (&symbverify($thisfn,$1)) { |
if (&symbverify($thisfn,$1)) { |
Line 5330 sub current_machine_ids {
|
Line 5333 sub current_machine_ids {
|
|
|
sub declutter { |
sub declutter { |
my $thisfn=shift; |
my $thisfn=shift; |
|
if ($thisfn=~m|^/enc/|) { $thisfn=&Apache::lonenc::unencrypted($thisfn); } |
$thisfn=~s/^\Q$perlvar{'lonDocRoot'}\E//; |
$thisfn=~s/^\Q$perlvar{'lonDocRoot'}\E//; |
$thisfn=~s/^\///; |
$thisfn=~s/^\///; |
$thisfn=~s/^res\///; |
$thisfn=~s/^res\///; |
Line 5565 $readit=1;
|
Line 5569 $readit=1;
|
{ |
{ |
use integer; |
use integer; |
my $test=(2**32)+1; |
my $test=(2**32)+1; |
if ($test != 0) { $_64bit=1; } |
if ($test != 0) { $_64bit=1; } else { $_64bit=0; } |
&logthis(" Detected 64bit platform ($_64bit)"); |
&logthis(" Detected 64bit platform ($_64bit)"); |
} |
} |
} |
} |