Ticket #10238: dont_lose_error_msgs.10238.diff
| File dont_lose_error_msgs.10238.diff, 1.5 KB (added by , 17 years ago) |
|---|
-
wp-admin/includes/media.php
380 380 function media_upload_form_handler() { 381 381 check_admin_referer('media-form'); 382 382 383 $errors = array();383 $errors = null; 384 384 385 385 if ( isset($_POST['send']) ) { 386 386 $keys = array_keys($_POST['send']); -
wp-admin/media-upload.php
29 29 wp_die(__("You are not allowed to be here")); 30 30 31 31 if ( isset($_GET['inline']) ) { 32 $errors = array(); 32 33 33 if ( isset($_GET['upload-page-form']) ) {34 $errors = media_upload_form_handler();35 36 $location = 'upload.php';37 if ( $errors )38 $location .= '?message=3';39 40 wp_redirect( admin_url($location) );41 }42 43 34 if ( isset($_POST['html-upload']) && !empty($_FILES) ) { 44 35 // Upload File button was clicked 45 36 $id = media_handle_upload('async-upload', $_REQUEST['post_id']); … … 50 41 } 51 42 } 52 43 44 if ( isset($_GET['upload-page-form']) ) { 45 $errors = array_merge($errors, (array) media_upload_form_handler()); 46 47 $location = 'upload.php'; 48 if ( $errors ) 49 $location .= '?message=3'; 50 51 wp_redirect( admin_url($location) ); 52 } 53 53 54 $title = __('Upload New Media'); 54 55 $parent_file = 'upload.php'; 55 56 require_once('admin-header.php'); ?>
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)