Ticket #8205: 8205.diff
File 8205.diff, 699 bytes (added by , 16 years ago) |
---|
-
wp-admin/includes/media.php
173 173 */ 174 174 function media_handle_upload($file_id, $post_id, $post_data = array()) { 175 175 $overrides = array('test_form'=>false); 176 177 $post = get_post($post_id);178 $time = $post->post_date_gmt;179 176 177 $time = current_time('mysql', true); 178 if ( $post = get_post($post_id) ) { 179 if ( '0000-00-00 00:00:00' != $post->post_date_gmt ) 180 $time = $post->post_date_gmt; 181 } 182 180 183 $file = wp_handle_upload($_FILES[$file_id], $overrides, $time); 181 184 182 185 if ( isset($file['error']) )