Changeset 3768 for trunk/wp-includes/functions-post.php
- Timestamp:
- 05/09/2006 10:44:51 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/functions-post.php
r3740 r3768 385 385 if ( ! empty($meta['thumb']) ) { 386 386 // Don't delete the thumb if another attachment uses it 387 if (! $foo = $wpdb->get_row("SELECT meta_id FROM $wpdb->postmeta WHERE meta_key = '_wp_attachment_metadata' AND meta_value LIKE '%".$wpdb->escape($meta['thumb'])."%' AND post_id <> '$postid'")) 388 @ unlink(str_replace(basename($file), $meta['thumb'], $file)); 389 } 387 if (! $wpdb->get_row("SELECT meta_id FROM $wpdb->postmeta WHERE meta_key = '_wp_attachment_metadata' AND meta_value LIKE '%".$wpdb->escape($meta['thumb'])."%' AND post_id <> $postid")) { 388 $thumbfile = str_replace(basename($file), $meta['thumb'], $file); 389 $thumbfile = apply_filters('wp_delete_file', $thumbfile); 390 @ unlink($thumbfile); 391 } 392 } 393 394 $file = apply_filters('wp_delete_file', $file); 390 395 391 396 if ( ! empty($file) )
Note: See TracChangeset
for help on using the changeset viewer.