Ticket #18310: 18310-3.diff
File 18310-3.diff, 1.2 KB (added by , 10 years ago) |
---|
-
wp-includes/post.php
3982 3982 $wpdb->update( $wpdb->posts, compact("post_name"), array( 'ID' => $post_ID ) ); 3983 3983 } 3984 3984 3985 if ( empty( $guid ) ) 3986 $wpdb->update( $wpdb->posts, array( 'guid' => get_permalink( $post_ID ) ), array( 'ID' => $post_ID ) ); 3987 3985 3988 if ( is_object_in_taxonomy($post_type, 'category') ) 3986 3989 wp_set_post_categories( $post_ID, $post_category ); 3987 3990 -
wp-includes/class-wp-xmlrpc-server.php
4338 4338 $attachments = $wpdb->get_results( "SELECT ID, guid FROM {$wpdb->posts} WHERE post_parent = '0' AND post_type = 'attachment'" ); 4339 4339 if ( is_array( $attachments ) ) { 4340 4340 foreach ( $attachments as $file ) { 4341 if ( strpos( $post_content, $file->guid ) !== false )4341 if ( isset( $file->guid ) && strpos( $post_content, $file->guid ) !== false ) 4342 4342 $wpdb->update($wpdb->posts, array('post_parent' => $post_ID), array('ID' => $file->ID) ); 4343 4343 } 4344 4344 }