Make WordPress Core

Changeset 6393


Ignore:
Timestamp:
12/16/2007 09:44:48 PM (17 years ago)
Author:
matt
Message:

Allow numbers in content type to allow for types like 3gp. Fixes #5449. Hat tip: meledin, DD32.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-app.php

    r6364 r6393  
    404404        elseif ( empty( $slug ) ) // just make a random name
    405405            $slug = substr( md5( uniqid( microtime() ) ), 0, 7);
    406         $ext = preg_replace( '|.*/([a-z]+)|', '$1', $_SERVER['CONTENT_TYPE'] );
     406        $ext = preg_replace( '|.*/([a-z0-9]+)|', '$1', $_SERVER['CONTENT_TYPE'] );
    407407        $slug = "$slug.$ext";
    408408        $file = wp_upload_bits( $slug, NULL, $bits);
Note: See TracChangeset for help on using the changeset viewer.