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:
ryan 2009-02-12 19:39:35 +00:00
parent 36348f054b
commit 13566f1004
1 changed files with 6 additions and 0 deletions

View File

@ -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;
}
/**