~canonical-sysadmins/wordpress/3.9.x

« back to all changes in this revision

Viewing changes to wp-admin/includes/import.php

  • Committer: Chris Jones
  • Date: 2010-01-19 13:17:33 UTC
  • Revision ID: cmsj@tenshu.net-20100119131733-rf31jv9k1v0xzo2h
[CJ] Import wordpress 2.9.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
59
59
 * @return array
60
60
 */
61
61
function wp_import_handle_upload() {
 
62
        if ( !isset($_FILES['import']) ) {
 
63
                $file['error'] = __( 'File is empty. Please upload something more substantial. This error could also be caused by uploads being disabled in your php.ini or by post_max_size being defined as smaller than upload_max_filesize in php.ini.' );
 
64
                return $file;
 
65
        }
 
66
 
62
67
        $overrides = array( 'test_form' => false, 'test_type' => false );
63
68
        $_FILES['import']['name'] .= '.txt';
64
69
        $file = wp_handle_upload( $_FILES['import'], $overrides );