Make WordPress Core

Changeset 24449 for branches/3.5


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

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

Merges [24448] to the 3.5 branch. Bump DB version by one.

props SergeyBiryukov.
fixes #23418.

Location:
branches/3.5
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/3.5

  • branches/3.5/wp-admin/includes/upgrade.php

    r22911 r24449  
    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 < 22442 ) {
     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
  • branches/3.5/wp-includes/formatting.php

    r23348 r24449  
    28712871        case 'illegal_names':
    28722872            if ( ! is_array( $value ) )
    2873                 $value = explode( "\n", $value );
     2873                $value = explode( ' ', $value );
    28742874
    28752875            $value = array_values( array_filter( array_map( 'trim', $value ) ) );
  • branches/3.5/wp-includes/version.php

    r23347 r24449  
    1212 * @global int $wp_db_version
    1313 */
    14 $wp_db_version = 22441;
     14$wp_db_version = 22442;
    1515
    1616/**
Note: See TracChangeset for help on using the changeset viewer.