Ticket #23219: FixDuplicateEnclosures.diff
File FixDuplicateEnclosures.diff, 1.0 KB (added by , 12 years ago) |
---|
-
wp-includes/functions.php
468 468 } 469 469 470 470 if ( in_array( substr( $type, 0, strpos( $type, "/" ) ), $allowed_types ) ) { 471 add_post_meta( $post_ID, 'enclosure', "$url\n$len\n$mime \n" );471 add_post_meta( $post_ID, 'enclosure', "$url\n$len\n$mime" ); 472 472 } 473 473 } 474 474 } -
wp-includes/class-wp-xmlrpc-server.php
4308 4308 foreach ( (array) get_post_custom($post_ID) as $key => $val) { 4309 4309 if ($key == 'enclosure') { 4310 4310 foreach ( (array) $val as $enc ) { 4311 if ($enc == $encstring) { 4311 // Trim the existing enclosure string in case it was saved with a trailing newline 4312 if (trim($enc) == $encstring) { 4312 4313 $found = true; 4313 4314 break 2; 4314 4315 }