mirror of
https://github.com/WordPress/WordPress.git
synced 2024-11-12 13:44:21 +01:00
Fix storage of illegal_names. Add an upgrade routine to fix bad values.
props SergeyBiryukov. see #23418. for trunk. git-svn-id: http://core.svn.wordpress.org/trunk@24448 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
e1923d4783
commit
d80469f8a5
@ -1277,6 +1277,16 @@ function upgrade_network() {
|
||||
// 3.5
|
||||
if ( $wp_current_db_version < 21823 )
|
||||
update_site_option( 'ms_files_rewriting', '1' );
|
||||
|
||||
// 3.5.2
|
||||
if ( $wp_current_db_version < 24448 ) {
|
||||
$illegal_names = get_site_option( 'illegal_names' );
|
||||
if ( is_array( $illegal_names ) && count( $illegal_names ) === 1 ) {
|
||||
$illegal_name = reset( $illegal_names );
|
||||
$illegal_names = explode( ' ', $illegal_name );
|
||||
update_site_option( 'illegal_names', $illegal_names );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// The functions we use to actually do stuff
|
||||
|
@ -2901,7 +2901,7 @@ function sanitize_option($option, $value) {
|
||||
|
||||
case 'illegal_names':
|
||||
if ( ! is_array( $value ) )
|
||||
$value = explode( "\n", $value );
|
||||
$value = explode( ' ', $value );
|
||||
|
||||
$value = array_values( array_filter( array_map( 'trim', $value ) ) );
|
||||
|
||||
|
@ -11,7 +11,7 @@ $wp_version = '3.6-beta3-24432';
|
||||
*
|
||||
* @global int $wp_db_version
|
||||
*/
|
||||
$wp_db_version = 23588;
|
||||
$wp_db_version = 24448;
|
||||
|
||||
/**
|
||||
* Holds the TinyMCE version
|
||||
|
Loading…
Reference in New Issue
Block a user