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

git-svn-id: https://develop.svn.wordpress.org/trunk@10561 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2009-02-12 19:39:35 +00:00
parent 6ae1efac3c
commit b12df4027f
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;
}
/**