Diff for /loncom/publisher/lonupload.pm between versions 1.63 and 1.65

version 1.63, 2013/07/02 19:04:49 version 1.65, 2013/07/09 21:35:06
Line 201  sub phaseone { Line 201  sub phaseone {
         return;          return;
     }      }
     $filesize = int($filesize/1000); #expressed in kb      $filesize = int($filesize/1000); #expressed in kb
     my $disk_quota = &Apache::loncommon::get_user_quota($uname,$udom,'author'); #expressed in Mb      my $output = &Apache::loncommon::excess_filesize_warning($uname,$udom,'author',
     $disk_quota = int($disk_quota * 1000);                                                               $env{'form.upfile.filename'},$filesize,'upload');
     my $londocroot = $Apache::lonnet::perlvar{'lonDocRoot'};      if ($output) {
     my $current_disk_usage = &Apache::lonnet::diskusage($udom,$uname,"$londocroot/priv/$udom/$uname");          $r->print($output.&earlyout($fn,$uname,$udom));
     if (($current_disk_usage + $filesize) > $disk_quota){  
         $r->print('<span class="LC_warning">'.  
                   &mt('Unable to upload [_1]. (size = [_2] kilobytes). Disk quota will be exceeded.','<span class="LC_filename">'.$env{'form.upfile.filename'}.'</span>',$filesize).'</span>'.  
                   '<br />'.&mt('Disk quota is [_1] kilobytes. Your current disk usage is [_2] kilobytes.',$disk_quota,$current_disk_usage).  
                   '</p>'.  
                   &earlyout($fn,$uname,$udom));  
         return;          return;
     }      }
       
 # Split part that I can change from the part that I cannot change  # Split part that I can change from the part that I cannot change
     my ($fn1,$fn2)=($fn=~/^(\/priv\/[^\/]+\/[^\/]+\/)(.*)$/);      my ($fn1,$fn2)=($fn=~/^(\/priv\/[^\/]+\/[^\/]+\/)(.*)$/);
     # Display additional options for upload      # Display additional options for upload

Removed from v.1.63  
changed lines
  Added in v.1.65


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>