Ticket #25545: 25545.4.diff
File 25545.4.diff, 1.0 KB (added by , 11 years ago) |
---|
-
src/wp-includes/ms-functions.php
279 279 $link_ids = $wpdb->get_col( $wpdb->prepare( "SELECT ID FROM $wpdb->links WHERE link_owner = %d", $user_id ) ); 280 280 281 281 if ( ! empty( $post_ids ) ) { 282 $wpdb->query( $wpdb->prepare( "UPDATE $wpdb->posts SET post_author = %d WHERE ID IN (" . implode( ',', $post_ids ) . ")", $reassign) );282 $wpdb->query( $wpdb->prepare( "UPDATE $wpdb->posts SET post_author = %d WHERE post_author = %d", $reassign, $user_id ) ); 283 283 array_walk( $post_ids, 'clean_post_cache' ); 284 284 } 285 285 286 286 if ( ! empty( $link_ids ) ) { 287 $wpdb->query( $wpdb->prepare( "UPDATE $wpdb->links SET link_owner = %d WHERE ID IN (" . implode( ',', $link_ids ) . ")", $reassign) );287 $wpdb->query( $wpdb->prepare( "UPDATE $wpdb->links SET link_owner = %d WHERE link_owner = %d", $reassign, $user_id ) ); 288 288 array_walk( $link_ids, 'clean_bookmark_cache' ); 289 289 } 290 290 }