Helper comment and lowercase filenames before playing around with them, to avoid extension duplication.

git-svn-id: https://develop.svn.wordpress.org/trunk@7478 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Matt Mullenweg 2008-03-22 19:34:21 +00:00
parent 215d0c769c
commit 64760ccecf
2 changed files with 2 additions and 1 deletions

View File

@ -1120,7 +1120,7 @@ function wp_upload_dir( $time = NULL ) {
// return a filename that is sanitized and unique for the given directory
function wp_unique_filename( $dir, $filename, $unique_filename_callback = NULL ) {
$filename = strtolower( $filename );
// separate the filename into a name and extension
$info = pathinfo($filename);
$ext = $info['extension'];

View File

@ -366,6 +366,7 @@ function gallery_shortcode($attr) {
border: 2px solid #cfcfcf;
}
</style>
<!-- see gallery_shortcode() in wp-includes/media.php -->
<div class='gallery'>");
foreach ( $attachments as $id => $attachment ) {