Changeset 18356
- Timestamp:
- 06/27/2011 09:36:48 PM (14 years ago)
- Location:
- branches/3.1
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.1
-
branches/3.1/wp-admin/custom-header.php
r18023 r18356 597 597 'post_mime_type' => $type, 598 598 'guid' => $url, 599 'context' => 'custom-header'); 599 'context' => 'custom-header' 600 ); 600 601 601 602 // Save the data -
branches/3.1/wp-admin/includes/media.php
r18018 r18356 229 229 ), $post_data ); 230 230 231 // This should never be set as it would then overwrite an existing attachment. 232 if ( isset( $attachment['ID'] ) ) 233 unset( $attachment['ID'] ); 234 231 235 // Save the data 232 236 $id = wp_insert_attachment($attachment, $file, $post_id); … … 281 285 'post_content' => $content, 282 286 ), $post_data ); 287 288 // This should never be set as it would then overwrite an existing attachment. 289 if ( isset( $attachment['ID'] ) ) 290 unset( $attachment['ID'] ); 283 291 284 292 // Save the attachment metadata -
branches/3.1/wp-admin/includes/post.php
r18054 r18356 135 135 if ( empty($post_data) ) 136 136 $post_data = &$_POST; 137 138 // Clear out any data in internal vars. 139 if ( isset( $post_data['filter'] ) ) 140 unset( $post_data['filter'] ); 137 141 138 142 $post_ID = (int) $post_data['post_ID']; … … 552 556 return edit_post(); 553 557 } 558 } 559 560 // Edit don't write if we have a post id. 561 if ( isset( $_POST['ID'] ) ) { 562 $_POST['post_ID'] = $_POST['ID']; 563 unset ( $_POST['ID'] ); 564 } 565 if ( isset( $_POST['post_ID'] ) ) { 566 return edit_post(); 554 567 } 555 568 -
branches/3.1/wp-admin/options-general.php
r16736 r18356 128 128 if ( $new_admin_email && $new_admin_email != get_option('admin_email') ) : ?> 129 129 <div class="updated inline"> 130 <p><?php printf( __('There is a pending change of the admin e-mail to <code>%1$s</code>. <a href="%2$s">Cancel</a>'), $new_admin_email, esc_url( admin_url( 'options.php?dismiss=new_admin_email' ) ) ); ?></p>130 <p><?php printf( __('There is a pending change of the admin e-mail to <code>%1$s</code>. <a href="%2$s">Cancel</a>'), esc_html( $new_admin_email ), esc_url( admin_url( 'options.php?dismiss=new_admin_email' ) ) ); ?></p> 131 131 </div> 132 132 <?php endif; ?> -
branches/3.1/wp-includes/formatting.php
r18353 r18356 2441 2441 } 2442 2442 break; 2443 2443 case 'new_admin_email': 2444 $value = sanitize_email($value); 2445 if ( !is_email($value) ) { 2446 $value = get_option( $option ); // Resets option to stored value in the case of failed sanitization 2447 if ( function_exists('add_settings_error') ) 2448 add_settings_error('new_admin_email', 'invalid_admin_email', __('The email address entered did not appear to be a valid email address. Please enter a valid email address.')); 2449 } 2450 break; 2444 2451 case 'thumbnail_size_w': 2445 2452 case 'thumbnail_size_h': … … 2535 2542 } 2536 2543 break; 2544 case 'WPLANG': 2545 $allowed = get_available_languages(); 2546 if ( ! in_array( $value, $allowed ) && ! empty( $value ) ) 2547 $value = get_option( $option ); 2548 break; 2537 2549 2538 2550 default : -
branches/3.1/wp-settings.php
r16558 r18356 259 259 $locale = get_locale(); 260 260 $locale_file = WP_LANG_DIR . "/$locale.php"; 261 if ( is_readable( $locale_file ) )261 if ( ( 0 === validate_file( $locale ) ) && is_readable( $locale_file ) ) 262 262 require( $locale_file ); 263 263 unset($locale_file);
Note: See TracChangeset
for help on using the changeset viewer.