Changeset 28077
- Timestamp:
- 04/11/2014 05:28:30 PM (12 years ago)
- Location:
- branches/3.7
- Files:
-
- 3 edited
-
. (modified) (1 prop)
-
src/wp-admin/includes/upgrade.php (modified) (2 diffs)
-
src/wp-includes/version.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/3.7
- Property svn:mergeinfo changed
/branches/3.8 merged: 28075-28076
- Property svn:mergeinfo changed
-
branches/3.7/src/wp-admin/includes/upgrade.php
r26450 r28077 409 409 upgrade_372(); 410 410 411 if ( $wp_current_db_version < 26149 ) 412 upgrade_373(); 413 411 414 maybe_disable_link_manager(); 412 415 … … 1236 1239 if ( $wp_current_db_version < 26148 ) 1237 1240 wp_clear_scheduled_hook( 'wp_maybe_auto_update' ); 1241 } 1242 1243 /** 1244 * Execute changes made in WordPress 3.7.3. 1245 * 1246 * @since 3.7.3 1247 */ 1248 function upgrade_373() { 1249 global $wp_current_db_version, $wpdb; 1250 if ( $wp_current_db_version < 26149 ) { 1251 // Find all lost Quick Draft auto-drafts and promote them to proper drafts. 1252 $posts = $wpdb->get_results( "SELECT ID, post_title, post_content FROM $wpdb->posts WHERE post_type = 'post' 1253 AND post_status = 'auto-draft' AND post_date >= '2014-04-08 00:00:00'" ); 1254 1255 foreach ( $posts as $post ) { 1256 // A regular auto-draft should never have content as that would mean it should have been promoted. 1257 // If an auto-draft has content, it's from Quick Draft and it should be recovered. 1258 if ( '' === $post->post_content ) { 1259 // If it does not have content, we must evaluate whether the title should be recovered. 1260 if ( 'Auto Draft' === $post->post_title || __( 'Auto Draft' ) === $post->post_title ) { 1261 // This a plain old auto draft. Ignore it. 1262 continue; 1263 } 1264 } 1265 1266 $wpdb->update( $wpdb->posts, array( 'post_status' => 'draft' ), array( 'ID' => $post->ID ) ); 1267 clean_post_cache( $post->ID ); 1268 } 1269 } 1238 1270 } 1239 1271 -
branches/3.7/src/wp-includes/version.php
r28056 r28077 12 12 * @global int $wp_db_version 13 13 */ 14 $wp_db_version = 2614 8;14 $wp_db_version = 26149; 15 15 16 16 /**
Note: See TracChangeset
for help on using the changeset viewer.