Ticket #20447: 20447.patch
| File 20447.patch, 1.9 KB (added by kurtpayne, 13 months ago) |
|---|
-
wp-admin/includes/bookmark.php
188 188 } 189 189 190 190 if ( $update ) { 191 if ( false === $wpdb->update( $wpdb->links, compact('link_url', 'link_name', 'link_image', 'link_target', 'link_description', 'link_visible', 'link_ rating', 'link_rel', 'link_notes', 'link_rss'), compact('link_id') ) ) {191 if ( false === $wpdb->update( $wpdb->links, compact('link_url', 'link_name', 'link_image', 'link_target', 'link_description', 'link_visible', 'link_owner', 'link_rating', 'link_rel', 'link_notes', 'link_rss'), compact('link_id') ) ) { 192 192 if ( $wp_error ) 193 193 return new WP_Error( 'db_update_error', __( 'Could not update link in the database' ), $wpdb->last_error ); 194 194 else -
wp-admin/includes/user.php
269 269 } 270 270 } else { 271 271 $reassign = (int) $reassign; 272 $wpdb->update( $wpdb->posts, array('post_author' => $reassign), array('post_author' => $id) ); 273 $wpdb->update( $wpdb->links, array('link_owner' => $reassign), array('link_owner' => $id) ); 272 $post_ids = $wpdb->get_col( $wpdb->prepare( "SELECT ID FROM $wpdb->posts WHERE post_author = %d", $id ) ); 273 if ( !empty( $post_ids ) ) { 274 foreach ( $post_ids as $post_id ) 275 wp_update_post( array( 276 'ID' => $post_id, 277 'post_author' => $reassign, 278 ) ); 279 } 280 $link_ids = $wpdb->get_col( $wpdb->prepare("SELECT link_id FROM $wpdb->links WHERE link_owner = %d", $id) ); 281 if ( !empty( $link_ids ) ) { 282 foreach ( $link_ids as $link_id ) 283 wp_update_link( array( 284 'link_id' => $link_id, 285 'link_owner' => $reassign 286 ) ); 287 } 274 288 } 275 289 276 290 // FINALLY, delete user
