Changeset 21605
- Timestamp:
- 08/24/2012 03:32:23 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/upload.php
r21597 r21605 70 70 71 71 $attach[] = $att_id; 72 clean_attachment_cache( $att_id );73 72 } 74 73 75 74 if ( ! empty( $attach ) ) { 76 $attach = implode( ',', $attach ); 77 $attached = $wpdb->query( $wpdb->prepare( "UPDATE $wpdb->posts SET post_parent = %d WHERE post_type = 'attachment' AND ID IN ( $attach )", $parent_id ) ); 75 $attach_string = implode( ',', $attach ); 76 $attached = $wpdb->query( $wpdb->prepare( "UPDATE $wpdb->posts SET post_parent = %d WHERE post_type = 'attachment' AND ID IN ( $attach_string )", $parent_id ) ); 77 foreach ( $attach as $att_id ) { 78 clean_attachment_cache( $att_id ); 79 } 78 80 } 79 81
Note: See TracChangeset
for help on using the changeset viewer.