Make WordPress Core

Changeset 10561


Ignore:
Timestamp:
02/12/2009 07:39:35 PM (15 years ago)
Author:
ryan
Message:

Warn if upload dir not writable when importing. Props filosofo. fixes #8048

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/template.php

    r10522 r10561  
    27042704    $bytes = apply_filters( 'import_upload_size_limit', wp_max_upload_size() );
    27052705    $size = wp_convert_bytes_to_hr( $bytes );
     2706    $upload_dir = wp_upload_dir();
     2707    if ( ! empty( $upload_dir['error'] ) ) :
     2708        ?><div class="error"><p><?php _e('Before you can upload your import file, you will need to fix the following error:'); ?></p>
     2709        <p><strong><?php echo $upload_dir['error']; ?></strong></p></div><?php
     2710    else :
    27062711?>
    27072712<form enctype="multipart/form-data" id="import-upload-form" method="post" action="<?php echo attribute_escape($action) ?>">
     
    27182723</form>
    27192724<?php
     2725    endif;
    27202726}
    27212727
Note: See TracChangeset for help on using the changeset viewer.