Ticket #9393: 9393-media-fixes.diff
| File 9393-media-fixes.diff, 1.9 KB (added by , 17 years ago) |
|---|
-
wp-admin/includes/media.php
430 430 return media_send_to_editor($html); 431 431 } 432 432 433 return $errors;433 return isset($errors) ? $errors : ''; 434 434 } 435 435 436 436 /** … … 988 988 'label' => __('File URL'), 989 989 'input' => 'html', 990 990 'html' => "<input type='text' class='urlfield' readonly='readonly' name='attachments[$post->ID][url]' value='" . attribute_escape($image_url) . "' /><br />", 991 'value' => $edit_post->post_url,991 'value' => isset($edit_post->post_url) ? $edit_post->post_url : '', 992 992 'helps' => __('Location of the uploaded file.'), 993 993 ) 994 994 ); … … 1223 1223 foreach ( $hidden_fields as $name => $value ) 1224 1224 $item .= "\t<input type='hidden' name='$name' id='$name' value='" . attribute_escape( $value ) . "' />\n"; 1225 1225 1226 if ( $post->post_parent < 1 && (int) $_REQUEST['post_id']) {1226 if ( $post->post_parent < 1 && isset( $_REQUEST['post_id'] ) ) { 1227 1227 $parent = (int) $_REQUEST['post_id']; 1228 1228 $parent_name = "attachments[$attachment_id][post_parent]"; 1229 1229 -
wp-admin/media.php
94 94 95 95 <p class="submit"> 96 96 <input type="submit" class="button-primary" name="save" value="<?php _e('Update Media'); ?>" /> 97 <input type="hidden" name="post_id" id="post_id" value="<?php echo $post_id; ?>" />97 <input type="hidden" name="post_id" id="post_id" value="<?php echo isset($post_id) ? $post_id : ''; ?>" /> 98 98 <input type="hidden" name="attachment_id" id="attachment_id" value="<?php echo $att_id; ?>" /> 99 99 <input type="hidden" name="action" value="editattachment" /> 100 100 <?php wp_original_referer_field(true, 'previous'); ?>