Ticket #6492: uuid_guid.6492.diff
File uuid_guid.6492.diff, 1.5 KB (added by , 15 years ago) |
---|
-
wp-includes/post.php
1665 1665 clean_post_cache($post_ID); 1666 1666 1667 1667 // Set GUID 1668 if ( !$update && '' == $current_guid ) 1669 $wpdb->update( $wpdb->posts, array( 'guid' => get_permalink( $post_ID ) ), $where ); 1668 if ( !$update && '' == $current_guid ) { 1669 $uuid = $wpdb->get_var('SELECT UUID()'); 1670 $wpdb->update( $wpdb->posts, array( 'guid' => $uuid ), $where ); 1671 } 1670 1672 1671 1673 $post = get_post($post_ID); 1672 1674 -
wp-admin/includes/upgrade.php
156 156 // First post 157 157 $now = date('Y-m-d H:i:s'); 158 158 $now_gmt = gmdate('Y-m-d H:i:s'); 159 $first_post_guid = get_option('home') . '/?p=1';159 $first_post_guid = $wpdb->get_var('SELECT UUID()'); 160 160 161 161 $wpdb->insert( $wpdb->posts, array( 162 162 'post_author' => $user_id, … … 188 188 'comment_content' => __('Hi, this is a comment.<br />To delete a comment, just log in and view the post's comments. There you will have the option to edit or delete them.') 189 189 )); 190 190 // First Page 191 $first_post_guid = get_option('home') . '/?page_id=2';191 $first_post_guid = $wpdb->get_var('SELECT UUID()'); 192 192 $wpdb->insert( $wpdb->posts, array( 193 193 'post_author' => $user_id, 194 194 'post_date' => $now,