Warn if upload dir not writable when importing. Props filosofo. fixes #8048
git-svn-id: http://svn.automattic.com/wordpress/trunk@10561 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
36348f054b
commit
13566f1004
|
@ -2703,6 +2703,11 @@ function wp_max_upload_size() {
|
|||
function wp_import_upload_form( $action ) {
|
||||
$bytes = apply_filters( 'import_upload_size_limit', wp_max_upload_size() );
|
||||
$size = wp_convert_bytes_to_hr( $bytes );
|
||||
$upload_dir = wp_upload_dir();
|
||||
if ( ! empty( $upload_dir['error'] ) ) :
|
||||
?><div class="error"><p><?php _e('Before you can upload your import file, you will need to fix the following error:'); ?></p>
|
||||
<p><strong><?php echo $upload_dir['error']; ?></strong></p></div><?php
|
||||
else :
|
||||
?>
|
||||
<form enctype="multipart/form-data" id="import-upload-form" method="post" action="<?php echo attribute_escape($action) ?>">
|
||||
<p>
|
||||
|
@ -2717,6 +2722,7 @@ function wp_import_upload_form( $action ) {
|
|||
</p>
|
||||
</form>
|
||||
<?php
|
||||
endif;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue