version 1.119, 2013/06/04 22:20:16
|
version 1.120, 2013/07/03 05:03:19
|
Line 700 sub Copy1 {
|
Line 700 sub Copy1 {
|
my ($type,$return)=&exists($user, $domain, $newfilename); |
my ($type,$return)=&exists($user, $domain, $newfilename); |
$request->print($return); |
$request->print($return); |
if ($type eq 'error') { |
if ($type eq 'error') { |
$request->print('<br /><a href="'.&url($fn).'">'.&mt('Cancel').'</a>'); |
$request->print('<br /><a href="'.&url($fn).'">'.&mt('Cancel').'</a></form>'); |
return; |
return; |
} |
} |
|
# Check if there is enough space. |
|
my @fileinfo = stat($fn); |
|
my ($dir,$fname) = ($fn =~ m{^(.+/)([^/]+)$}); |
|
my $filesize = $fileinfo[7]; |
|
$filesize = int($filesize/1000); #expressed in kb |
|
my $authorspace = $Apache::lonnet::perlvar{'lonDocRoot'}."/priv/$domain/$user"; |
|
my $output = &Apache::loncommon::excess_filesize_authorspace($user,$domain,$authorspace, |
|
$fname,$filesize,'copy'); |
|
if ($output) { |
|
$request->print($output.'<br /><a href="'.&url($dir).'">'.&mt('Cancel').'</a></form>'); |
|
return; |
|
} |
$request->print( |
$request->print( |
'<input type="hidden" name="newfilename"' |
'<input type="hidden" name="newfilename"' |
.' value="'.$newfilename.'" />' |
.' value="'.$newfilename.'" />' |