Add application/javascript MIME type to viewer config
authorMichael M Slusarz <slusarz@curecanti.org>
Wed, 1 Dec 2010 06:26:35 +0000 (23:26 -0700)
committerMichael M Slusarz <slusarz@curecanti.org>
Wed, 1 Dec 2010 06:26:35 +0000 (23:26 -0700)
Makes javascript viewing work in Chora again

framework/Mime_Viewer/lib/Horde/Mime/Viewer/Syntaxhighlighter.php
horde/config/mime_drivers.php.dist

index 9dc7776..b4c0eb2 100644 (file)
@@ -76,6 +76,7 @@ class Horde_Mime_Viewer_Syntaxhighlighter extends Horde_Mime_Viewer_Base
         $type = str_replace('x-unknown', 'x-extension', $type);
 
         switch ($type) {
+        case 'application/javascript':
         case 'application/x-javascript':
         case 'x-extension/javascript':
         case 'x-extension/js':
index 27ccc83..0656016 100644 (file)
@@ -121,6 +121,7 @@ $mime_drivers = array(
     'syntaxhighlighter' => array(
         'inline' => true,
         'handles' => array(
+            'application/javascript',
             'application/x-httpd-php',
             'application/x-httpd-php3',
             'application/x-httpd-phps',
@@ -170,6 +171,7 @@ $mime_drivers = array(
         ),
         'icons' => array(
             'default'                   => 'text.png',
+            'application/javascript'    => 'script-js.png',
             'application/x-httpd-php'   => 'php.png',
             'application/x-httpd-php3'  => 'php.png',
             'application/x-httpd-phps'  => 'php.png',