plugins/SpecialUpdownload.php
changeset 832 7152ca0a0ce9
parent 801 eb8b23f11744
child 898 c75754f5b1da
equal deleted inserted replaced
831:45e887f23282 832:7152ca0a0ce9
    68     }
    68     }
    69     if ( !is_array($file) )
    69     if ( !is_array($file) )
    70     {
    70     {
    71       die_friendly($lang->get('upload_err_title'), '<p>' . $lang->get('upload_err_cant_get_file_meta') . '</p>');
    71       die_friendly($lang->get('upload_err_title'), '<p>' . $lang->get('upload_err_cant_get_file_meta') . '</p>');
    72     }
    72     }
    73     if ( $file['size'] == 0 || $file['size'] > (int)getConfig('max_file_size') )
    73     if ( $file['size'] == 0 || $file['size'] > (int)getConfig('max_file_size', '256000') )
    74     {
    74     {
    75       die_friendly($lang->get('upload_err_title'), '<p>' . $lang->get('upload_err_too_big_or_small') . '</p>');
    75       die_friendly($lang->get('upload_err_title'), '<p>' . $lang->get('upload_err_too_big_or_small') . '</p>');
    76     }
    76     }
    77     
    77     
    78     $types = fetch_allowed_extensions();
    78     $types = fetch_allowed_extensions();
   163     ?>
   163     ?>
   164     <p><?php echo $lang->get('upload_intro'); ?></p>
   164     <p><?php echo $lang->get('upload_intro'); ?></p>
   165     <p><?php 
   165     <p><?php 
   166       // Get the max file size, and format it in a way that is user-friendly
   166       // Get the max file size, and format it in a way that is user-friendly
   167       
   167       
   168       $fs = getConfig('max_file_size');
   168       $fs = getConfig('max_file_size', '256000');
   169       $fs = (int)$fs;
   169       $fs = (int)$fs;
   170       if($fs >= 1048576)
   170       if($fs >= 1048576)
   171       {
   171       {
   172         $fs = round($fs / 1048576, 1);
   172         $fs = round($fs / 1048576, 1);
   173         $unitized = $fs . ' ' . $lang->get('etc_unit_megabytes_short');
   173         $unitized = $fs . ' ' . $lang->get('etc_unit_megabytes_short');