Browse files

Moved the array into the function.

  • Loading branch information...
1 parent 4eccdb5 commit a99e41938e463a0cd2a27eef48ee210142587d9e martin committed May 19, 2002
Showing with 1 addition and 3 deletions.
  1. +1 −3 files/mimetypes.php
View
4 files/mimetypes.php
@@ -1,5 +1,6 @@
<? // $Id$
+function mimeinfo($element, $filename) {
$mimeinfo = array (
"xxx" => array ("type"=>"document/unknown", "icon"=>"unknown.gif"),
"zip" => array ("type"=>"application/zip", "icon"=>"zip.gif"),
@@ -20,9 +21,6 @@
"xls" => array ("type"=>"application/vnd.ms-excel", "icon"=>"excel.gif")
);
-function mimeinfo($element, $filename) {
- global $mimeinfo;
-
if (eregi("\.([a-z0-9]+)$", $filename, $match)) {
$result = $mimeinfo[strtolower($match[1])][$element];
}

0 comments on commit a99e419

Please sign in to comment.