WordPress.org

Make WordPress Core

Changeset 24448


Ignore:
Timestamp:
06/19/2013 10:06:42 PM (8 years ago)
Author:
nacin
Message:

Fix storage of illegal_names. Add an upgrade routine to fix bad values.

props SergeyBiryukov.
see #23418.
for trunk.

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/upgrade.php

    r24065 r24448  
    12781278    if ( $wp_current_db_version < 21823 )
    12791279        update_site_option( 'ms_files_rewriting', '1' );
     1280
     1281    // 3.5.2
     1282    if ( $wp_current_db_version < 24448 ) {
     1283        $illegal_names = get_site_option( 'illegal_names' );
     1284        if ( is_array( $illegal_names ) && count( $illegal_names ) === 1 ) {
     1285            $illegal_name = reset( $illegal_names );
     1286            $illegal_names = explode( ' ', $illegal_name );
     1287            update_site_option( 'illegal_names', $illegal_names );
     1288        }
     1289    }
    12801290}
    12811291
  • trunk/wp-includes/formatting.php

    r24241 r24448  
    29022902        case 'illegal_names':
    29032903            if ( ! is_array( $value ) )
    2904                 $value = explode( "\n", $value );
     2904                $value = explode( ' ', $value );
    29052905
    29062906            $value = array_values( array_filter( array_map( 'trim', $value ) ) );
  • trunk/wp-includes/version.php

    r24432 r24448  
    1212 * @global int $wp_db_version
    1313 */
    14 $wp_db_version = 23588;
     14$wp_db_version = 24448;
    1515
    1616/**
Note: See TracChangeset for help on using the changeset viewer.