diff --git a/b2-include/b2functions.php b/b2-include/b2functions.php index dacfabbedc..bea388e43f 100644 --- a/b2-include/b2functions.php +++ b/b2-include/b2functions.php @@ -1284,4 +1284,21 @@ function pingGeoURL($blog_ID) { getRemoteFile($host,$path); } + +// implementation of in_array that also should work on PHP3 +if (!function_exists('in_array')) { + + function in_array($needle, $haystack) { + $needle = strtolower($needle); + + for ($i = 0; $i < count($haystack); $i++) { + if (strtolower($haystack[$i]) == $needle) { + return true; + } + } + + return false; + } +} + ?> \ No newline at end of file diff --git a/wp-admin/b2upload.php b/wp-admin/b2upload.php index 09e70d1ef2..7543bb20a0 100644 --- a/wp-admin/b2upload.php +++ b/wp-admin/b2upload.php @@ -10,6 +10,8 @@ die ("Cheatin' uh ?"); if (!$use_fileupload) //Checks if file upload is enabled in the config die ("The admin disabled this function"); +$allowed_types = explode(" ", trim($fileupload_allowedtypes)); + ?>
File upload
You can upload files of type:
The maximum size of the file should be:
KB