mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-16 23:00:21 +00:00
Use wpdb::insert() and update(). Props DD32. see #6836
git-svn-id: https://develop.svn.wordpress.org/trunk@10730 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
+1
-1
@@ -2273,7 +2273,7 @@ class wp_xmlrpc_server extends IXR_Server {
|
||||
if( is_array( $attachments ) ) {
|
||||
foreach( $attachments as $file ) {
|
||||
if( strpos( $post_content, $file->guid ) !== false ) {
|
||||
$wpdb->query( $wpdb->prepare("UPDATE {$wpdb->posts} SET post_parent = %d WHERE ID = %d", $post_ID, $file->ID) );
|
||||
$wpdb->update($wpdb->posts, array('post_parent' => $post_ID), array('ID' => $file->ID) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user