Ignore:
Timestamp:
Jun 29, 2010, 8:42:11 PM (14 years ago)
Author:
plg
Message:

merge r6624 from branch 2.1 to trunk

bug 1747 fixed: some checks were added to verify the upload will fail for a
too big size or if the upload has failed for a too big size (test on
upload_max_filesize and post_max_size)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/include/uploadify/uploadify.php

    r6054 r6625  
    1212
    1313ob_start();
     14echo '$_FILES'."\n";
    1415print_r($_FILES);
     16echo '$_POST'."\n";
    1517print_r($_POST);
     18echo '$user'."\n";
    1619print_r($user);
    1720$tmp = ob_get_contents();
    1821ob_end_clean();
    1922// error_log($tmp, 3, "/tmp/php-".date('YmdHis').'-'.sprintf('%020u', rand()).".log");
     23
     24if ($_FILES['Filedata']['error'] !== UPLOAD_ERR_OK)
     25{
     26  $error_message = file_upload_error_message($_FILES['Filedata']['error']);
     27 
     28  add_upload_error(
     29    $_POST['upload_id'],
     30    sprintf(
     31      l10n('Error on file "%s" : %s'),
     32      $_FILES['Filedata']['name'],
     33      $error_message
     34      )
     35    );
     36
     37  echo "File Size Error";
     38  exit();
     39}
     40
     41ob_start();
    2042
    2143$image_id = add_uploaded_file(
     
    4163  );
    4264
     65$output = ob_get_contents();
     66ob_end_clean();
     67if (!empty($output))
     68{
     69  add_upload_error($_POST['upload_id'], $output);
     70}
     71
    4372echo "1";
    4473?>
Note: See TracChangeset for help on using the changeset viewer.