Changeset 13618 for trunk/wp-admin/includes/upgrade.php
- Timestamp:
- 03/08/2010 04:31:12 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
-
Property
svn:ignore
set to
.empty.php.swp
-
Property
svn:ignore
set to
-
trunk/wp-admin/includes/upgrade.php
r13592 r13618 1062 1062 */ 1063 1063 function upgrade_280() { 1064 global $wp_current_db_version ;1064 global $wp_current_db_version, $wpdb; 1065 1065 1066 1066 if ( $wp_current_db_version < 10360 ) 1067 1067 populate_roles_280(); 1068 if ( is_multisite() ) { 1069 $start = 0; 1070 while( $rows = $wpdb->get_results( "SELECT option_name, option_value FROM $wpdb->options ORDER BY option_id LIMIT $start, 20" ) ) { 1071 foreach( $rows as $row ) { 1072 $value = $row->option_value; 1073 if ( !@unserialize( $value ) ) 1074 $value = stripslashes( $value ); 1075 if ( $value !== $row->option_value ) { 1076 update_option( $row->option_name, $value ); 1077 } 1078 } 1079 $start += 20; 1080 } 1081 refresh_blog_details( $wpdb->blogid ); 1082 } 1068 1083 } 1069 1084 … … 1106 1121 */ 1107 1122 function upgrade_network() { 1108 global $wp_current_db_version ;1123 global $wp_current_db_version, $wpdb; 1109 1124 // 2.8 1110 1125 if ( $wp_current_db_version < 11549 ) { … … 1121 1136 delete_site_option( 'wpmu_sitewide_plugins' ); 1122 1137 delete_site_option( 'deactivated_sitewide_plugins' ); 1138 1139 $start = 0; 1140 while( $rows = $wpdb->get_results( "SELECT meta_key, meta_value FROM {$wpdb->sitemeta} ORDER BY meta_id LIMIT $start, 20" ) ) { 1141 foreach( $rows as $row ) { 1142 $value = $row->meta_value; 1143 if ( !@unserialize( $value ) ) 1144 $value = stripslashes( $value ); 1145 if ( $value !== $row->meta_value ) { 1146 update_site_option( $row->meta_key, $value ); 1147 } 1148 } 1149 $start += 20; 1150 } 1123 1151 } 1124 1152 }
Note: See TracChangeset
for help on using the changeset viewer.