Changeset 3513 for trunk/wp-admin/upgrade-functions.php
- Timestamp:
- 02/11/2006 09:56:02 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/upgrade-functions.php
r3510 r3513 34 34 upgrade_160(); 35 35 36 if ( $wp_current_db_version < 35 06)36 if ( $wp_current_db_version < 3513 ) 37 37 upgrade_210(); 38 38 … … 333 333 global $wpdb, $table_prefix, $wp_current_db_version; 334 334 335 // Update status and type. 336 $posts = $wpdb->get_results("SELECT ID, post_status FROM $wpdb->posts"); 337 338 if ( ! empty($posts) ) foreach ($posts as $post) { 339 $status = $post->post_status; 340 $type = 'post'; 341 342 if ( 'static' == $status ) { 343 $status = 'publish'; 344 $type = 'page'; 345 } else if ( 'attachment' == $status ) { 346 $status = 'inherit'; 347 $type = 'attachment'; 348 } 335 if ( $wp_current_db_version < 3506 ) { 336 // Update status and type. 337 $posts = $wpdb->get_results("SELECT ID, post_status FROM $wpdb->posts"); 338 339 if ( ! empty($posts) ) foreach ($posts as $post) { 340 $status = $post->post_status; 341 $type = 'post'; 342 343 if ( 'static' == $status ) { 344 $status = 'publish'; 345 $type = 'page'; 346 } else if ( 'attachment' == $status ) { 347 $status = 'inherit'; 348 $type = 'attachment'; 349 } 349 350 350 $wpdb->query("UPDATE $wpdb->posts SET post_status = '$status', post_type = '$type' WHERE ID = '$post->ID'"); 351 $wpdb->query("UPDATE $wpdb->posts SET post_status = '$status', post_type = '$type' WHERE ID = '$post->ID'"); 352 } 353 } 354 355 if ( $wp_current_db_version < 3513 ) { 356 populate_roles_210(); 351 357 } 352 358 }
Note: See TracChangeset
for help on using the changeset viewer.