Changeset 28075
- Timestamp:
- 04/11/2014 04:54:44 PM (11 years ago)
- Location:
- branches/3.8/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.8/src/wp-admin/includes/upgrade.php
r26692 r28075 412 412 upgrade_380(); 413 413 414 if ( $wp_current_db_version < 26692 ) 415 upgrade_383(); 416 414 417 maybe_disable_link_manager(); 415 418 … … 1252 1255 } 1253 1256 } 1257 1258 /** 1259 * Execute changes made in WordPress 3.8.3. 1260 * 1261 * @since 3.8.3 1262 */ 1263 function upgrade_383() { 1264 global $wp_current_db_version, $wpdb; 1265 if ( $wp_current_db_version < 26692 ) { 1266 // Find all lost Quick Draft auto-drafts and promote them to proper drafts. 1267 $posts = $wpdb->get_results( "SELECT ID, post_title, post_content FROM $wpdb->posts WHERE post_type = 'post' 1268 AND post_status = 'auto-draft' AND post_date >= '2014-04-08 00:00:00'" ); 1269 1270 foreach ( $posts as $post ) { 1271 // A regular auto-draft should never have content as that would mean it should have been promoted. 1272 // If an auto-draft has content, it's from Quick Draft and it should be recovered. 1273 if ( '' === $post->post_content ) { 1274 // If it does not have content, we must evaluate whether the title should be recovered. 1275 if ( 'Auto Draft' === $post->post_title || __( 'Auto Draft' ) === $post->post_title ) { 1276 // This a plain old auto draft. Ignore it. 1277 continue; 1278 } 1279 } 1280 1281 $wpdb->update( $wpdb->posts, array( 'post_status' => 'draft' ), array( 'ID' => $post->ID ) ); 1282 clean_post_cache( $post->ID ); 1283 } 1284 } 1285 } 1286 1254 1287 /** 1255 1288 * Execute network level changes -
branches/3.8/src/wp-includes/version.php
r28057 r28075 12 12 * @global int $wp_db_version 13 13 */ 14 $wp_db_version = 2669 1;14 $wp_db_version = 26692; 15 15 16 16 /**
Note: See TracChangeset
for help on using the changeset viewer.