diff options
Diffstat (limited to 'application')
-rw-r--r-- | application/models/mfile.php | 73 |
1 files changed, 41 insertions, 32 deletions
diff --git a/application/models/mfile.php b/application/models/mfile.php index 3d0bda374..3e564d1dc 100644 --- a/application/models/mfile.php +++ b/application/models/mfile.php @@ -260,48 +260,57 @@ class Mfile extends CI_Model { private function mime2lexer($type) { $typearray = array( - 'text/plain' => 'text', + 'application/javascript' => 'javascript', + 'application/mbox' => 'text', + 'application/smil' => 'ocaml', + 'application/x-applix-spreadsheet' => 'actionscript', + 'application/x-awk' => 'awk', + 'application/x-desktop' => 'text', + 'application/x-fluid' => 'text', + 'application/x-genesis-rom' => 'text', + 'application/x-java' => 'java', + 'application/x-m4' => 'text', + 'application/xml-dtd' => "xml", + 'application/xml' => 'xml', + 'application/x-perl' => 'perl', + 'application/x-php' => 'php', + 'application/x-ruby' => 'ruby', + 'application/x-shellscript' => 'bash', + 'application/xslt+xml' => "xml", + 'application/x-x509-ca-cert' => 'text', + 'message/rfc822' => 'text', + 'text/css' => 'css', + 'text/html' => 'xml', 'text/plain-ascii' => 'ascii', - 'text/x-python' => 'python', - 'text/x-csrc' => 'c', - 'text/x-chdr' => 'c', + 'text/plain' => 'text', + 'text/troff' => 'groff', + 'text/x-asm' => 'nasm', + 'text/x-awk' => 'awk', + 'text/x-c' => 'c', + 'text/x-c++' => 'cpp', 'text/x-c++hdr' => 'c', + 'text/x-chdr' => 'c', + 'text/x-csrc' => 'c', 'text/x-c++src' => 'cpp', - 'text/x-patch' => 'diff', 'text/x-diff' => 'diff', - 'text/x-lua' => 'lua', - 'text/x-java' => 'java', + 'text/x-gawk' => 'awk', 'text/x-haskell' => 'haskell', + 'text/x-java' => 'java', + 'text/x-lisp' => 'cl', 'text/x-literate-haskell' => 'haskell', - 'text/x-subviewer' => 'bash', - 'text/x-scheme' => 'scheme', + 'text/x-lua' => 'lua', 'text/x-makefile' => 'make', - #'text/x-log' => 'log', - 'text/html' => 'xml', - 'text/css' => 'css', 'text/x-ocaml' => 'ocaml', + 'text/x-patch' => 'diff', + 'text/x-perl' => 'perl', + 'text/x-php' => 'php', + 'text/x-python' => 'python', + 'text/x-ruby' => 'ruby', + 'text/x-scheme' => 'scheme', + 'text/x-shellscript' => 'bash', + 'text/x-subviewer' => 'bash', 'text/x-tcl' => 'tcl', 'text/x-tex' => 'tex', - 'message/rfc822' => 'text', - #'image/svg+xml' => 'xml', - 'application/x-perl' => 'perl', - 'application/xml' => 'xml', - 'application/xml-dtd' => "xml", - 'application/xslt+xml' => "xml", - 'application/javascript' => 'javascript', - 'application/smil' => 'ocaml', - 'application/x-desktop' => 'text', - 'application/x-m4' => 'text', - 'application/x-awk' => 'text', - 'application/x-fluid' => 'text', - 'application/x-java' => 'java', - 'application/x-php' => 'php', - 'application/x-ruby' => 'ruby', - 'application/x-shellscript' => 'bash', - 'application/x-x509-ca-cert' => 'text', - 'application/mbox' => 'text', - 'application/x-genesis-rom' => 'text', - 'application/x-applix-spreadsheet' => 'actionscript' ); if (array_key_exists($type, $typearray)) return $typearray[$type]; |