One source driver viewer.
authorMichael M Slusarz <slusarz@curecanti.org>
Mon, 26 Jul 2010 06:02:52 +0000 (00:02 -0600)
committerMichael M Slusarz <slusarz@curecanti.org>
Mon, 26 Jul 2010 19:08:16 +0000 (13:08 -0600)
Remove Webcpp and Enscript drivers. Use a single driver
(GNU source-highlight) to render code data.

framework/Mime/lib/Horde/Mime/Viewer/Enscript.php [deleted file]
framework/Mime/lib/Horde/Mime/Viewer/Srchighlite.php
framework/Mime/lib/Horde/Mime/Viewer/Webcpp.php [deleted file]
framework/Mime/package.xml
horde/config/mime_drivers.php.dist
horde/docs/UPGRADING

diff --git a/framework/Mime/lib/Horde/Mime/Viewer/Enscript.php b/framework/Mime/lib/Horde/Mime/Viewer/Enscript.php
deleted file mode 100644 (file)
index 1443102..0000000
+++ /dev/null
@@ -1,161 +0,0 @@
-<?php
-/**
- * The Horde_Mime_Viewer_Enscript class renders out various content in HTML
- * format by using GNU Enscript.
- *
- * Copyright 1999-2010 The Horde Project (http://www.horde.org/)
- *
- * See the enclosed file COPYING for license information (LGPL). If you
- * did not receive this file, see http://www.fsf.org/copyleft/lgpl.html.
- *
- * @author   Anil Madhavapeddy <anil@recoil.org>
- * @category Horde
- * @license  http://www.fsf.org/copyleft/lgpl.html LGPL
- * @package  Mime
- */
-class Horde_Mime_Viewer_Enscript extends Horde_Mime_Viewer_Source
-{
-    /**
-     * This driver's display capabilities.
-     *
-     * @var array
-     */
-    protected $_capability = array(
-        'full' => true,
-        'info' => false,
-        'inline' => true,
-        'raw' => false
-    );
-
-    /**
-     * Return the full rendered version of the Horde_Mime_Part object.
-     *
-     * @return array  See Horde_Mime_Viewer_Driver::render().
-     */
-    protected function _render()
-    {
-        return array(
-            $this->_mimepart->getMimeId() => array(
-                'data' => $this->_toHTML(),
-                'status' => array(),
-                'type' => 'text/html; charset=' . $GLOBALS['registry']->getCharset()
-            )
-        );
-    }
-
-    /**
-     * Return the rendered inline version of the Horde_Mime_Part object.
-     *
-     * @return array  See Horde_Mime_Viewer_Driver::render().
-     */
-    protected function _renderInline()
-    {
-        return array(
-            $this->_mimepart->getMimeId() => array(
-                'data' => $this->_toHTML(),
-                'status' => array(),
-                'type' => 'text/html; charset=' . $GLOBALS['registry']->getCharset()
-            )
-        );
-    }
-
-    /**
-     * Converts the code to HTML.
-     *
-     * @return string  The HTML-ified version of the MIME part contents.
-     */
-    protected function _toHTML()
-    {
-        /* Check to make sure the viewer program exists. */
-        if (!isset($this->_conf['location']) ||
-            !file_exists($this->_conf['location'])) {
-            return array();
-        }
-
-        /* Create temporary files for input to Enscript. Note that we can't
-         * use a pipe, since enscript must have access to the whole file to
-         * determine its type for coloured syntax highlighting. */
-        $tmpin = Horde::getTempFile('enscriptin');
-
-        /* Write the contents of our buffer to the temporary input file. */
-        file_put_contents($tmpin, $this->_mimepart->getContents());
-
-        /* Execute the enscript command. */
-        $lang = escapeshellarg($this->_typeToLang($this->_mimepart->getType()));
-        $results = shell_exec($this->_conf['location'] . " -E$lang --language=html --color --output=- < $tmpin");
-
-        /* Strip out the extraneous HTML from enscript. */
-        $res_arr = preg_split('/\<\/?pre\>/i', $results);
-        if (count($res_arr) == 3) {
-            $results = trim($res_arr[1]);
-        }
-
-        return $this->_lineNumber($results);
-    }
-
-    /**
-     * Attempts to determine what language to use for the enscript program
-     * from a MIME type.
-     *
-     * @param string $type  The MIME type.
-     *
-     * @return string  The enscript 'language' parameter string.
-     */
-    protected function _typeToLang($type)
-    {
-        $ext = Horde_Mime_Magic::MIMEToExt($type);
-
-        switch ($ext) {
-        case 'cs':
-            return 'java';
-
-        case 'el':
-            return 'elisp';
-
-        case 'h':
-            return 'c';
-
-        case 'C':
-        case 'H':
-        case 'cc':
-        case 'hh':
-        case 'c++':
-        case 'cxx':
-        case 'cpp':
-            return 'cpp';
-
-        case 'htm':
-        case 'shtml':
-        case 'xml':
-            return 'html';
-
-        case 'js':
-            return 'javascript';
-
-        case 'pas':
-            return 'pascal';
-
-        case 'al':
-        case 'cgi':
-        case 'pl':
-        case 'pm':
-            return 'perl';
-
-        case 'ps':
-            return 'postscript';
-
-        case 'vb':
-            return 'vba';
-
-        case 'vhd':
-            return 'vhdl';
-
-        case 'patch':
-        case 'diff':
-            return 'diffu';
-
-        default:
-            return $ext;
-        }
-    }
-}
index b9e3812..35949a0 100644 (file)
@@ -1,9 +1,10 @@
 <?php
 /**
  * The Horde_Mime_Viewer_Srchighlite class renders out various content in HTML
- * format by using Source-highlight.
+ * format by using the GNU source-highlight package.
  *
  * Source-highlight: http://www.gnu.org/software/src-highlite/
+ * Tested with v3.1.3
  *
  * Copyright 2003-2010 The Horde Project (http://www.horde.org/)
  *
  * did not receive this file, see http://www.fsf.org/copyleft/lgpl.html.
  *
  * @author   Mike Cochrane <mike@graftonhall.co.nz>
+ * @author   Michael Slusarz <slusarz@horde.org>
  * @category Horde
  * @license  http://www.fsf.org/copyleft/lgpl.html LGPL
  * @package  Mime
  */
-class Horde_Mime_Viewer_Srchighlite extends Horde_Mime_Viewer_Source
+class Horde_Mime_Viewer_Srchighlite extends Horde_Mime_Viewer_Driver
 {
     /**
      * This driver's display capabilities.
@@ -38,13 +40,10 @@ class Horde_Mime_Viewer_Srchighlite extends Horde_Mime_Viewer_Source
     {
         $ret = $this->_renderInline();
 
-        // Need Horde headers for CSS tags.
         reset($ret);
-        Horde::startBuffer();
-        require $GLOBALS['registry']->get('templates', 'horde') . '/common-header.inc';
-        echo $ret[key($ret)]['data'];
-        require $GLOBALS['registry']->get('templates', 'horde') . '/common-footer.inc';
-        $ret[key($ret)]['data'] = Horde::endBuffer();
+        $ret[key($ret)]['data'] = '<html><body>' .
+            $ret[key($ret)]['data'] .
+            '</body></html>';
 
         return $ret;
     }
@@ -73,13 +72,13 @@ class Horde_Mime_Viewer_Srchighlite extends Horde_Mime_Viewer_Source
         $lang = $this->_typeToLang($this->_mimepart->getType());
 
         /* Execute Source-Highlite. */
-        exec($this->_conf['location'] . " --src-lang $lang --out-format xhtml --input $tmpin --output $tmpout");
+        exec($this->_conf['location'] . " --src-lang $lang --out-format html --input $tmpin --output $tmpout");
         $results = file_get_contents($tmpout);
         unlink($tmpout);
 
         return array(
             $this->_mimepart->getMimeId() => array(
-                'data' => $this->_lineNumber($results),
+                'data' => $results,
                 'status' => array(),
                 'type' => 'text/html; charset=' . $GLOBALS['registry']->getCharset()
             )
@@ -96,16 +95,9 @@ class Horde_Mime_Viewer_Srchighlite extends Horde_Mime_Viewer_Source
      */
     protected function _typeToLang($type)
     {
-        // TODO: 'prolog', 'flex', 'changelog', 'ruby'
-
         switch ($type) {
-        case 'text/x-java':
-            return 'java';
-
-        case 'text/x-csrc':
-        case 'text/x-c++src':
-        case 'text/cpp':
-            return 'cpp';
+        case 'application/x-javascript':
+            return 'js';
 
         case 'application/x-perl':
             return 'perl';
@@ -116,10 +108,78 @@ class Horde_Mime_Viewer_Srchighlite extends Horde_Mime_Viewer_Source
         case 'application/x-httpd-php':
         case 'application/x-httpd-php3':
         case 'application/x-httpd-phps':
-            return 'php3';
+            return 'php';
 
         case 'application/x-python':
             return 'python';
+
+        case 'application/x-ruby':
+            return 'ruby';
+
+        case 'application/x-sh':
+        case 'application/x-shellscript':
+            return 'sh';
+
+        case 'application/x-tcl':
+            return 'tcl';
+
+        case 'application/xml':
+        case 'text/xml':
+            return 'xml';
+
+        case 'text/cpp':
+        case 'text/x-c++src':
+        case 'text/x-c++hdr':
+            return 'cpp';
+
+        case 'text/css':
+        case 'x-extension/css':
+            return 'css';
+
+        case 'text/diff':
+        case 'text/x-diff':
+        case 'text/x-patch':
+            return 'diff';
+
+        case 'text/x-chdr':
+        case 'text/x-csrc':
+            return 'c';
+
+        case 'text/x-emacs-lisp':
+            return 'lisp';
+
+        case 'text/x-fortran':
+        case 'x-extension/f77':
+        case 'x-extension/f90':
+        case 'x-extension/for':
+        case 'x-extension/ftn':
+            return 'fortran';
+
+        case 'text/x-java':
+            return 'java';
+
+        case 'text/x-pascal':
+            return 'pascal';
+
+        case 'text/x-sql':
+            return 'sql';
+
+        case 'text/x-tex':
+            return 'tex';
+
+        case 'x-extension/asm':
+            return 'asm';
+
+        case 'x-extension/bat':
+            return 'batch';
+
+        case 'x-extension/cs':
+            return 'csharp';
+
+        case 'x-extension/vb':
+        case 'x-extension/vba':
+            return 'vbs';
         }
     }
+
 }
diff --git a/framework/Mime/lib/Horde/Mime/Viewer/Webcpp.php b/framework/Mime/lib/Horde/Mime/Viewer/Webcpp.php
deleted file mode 100644 (file)
index 70e3564..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-<?php
-/**
- * The Horde_Mime_Viewer_Webcpp class renders out various content in HTML
- * format by using Web C Plus Plus.
- *
- * Web C Plus plus: http://webcpp.sourceforge.net/
- *
- * Copyright 2002-2010 The Horde Project (http://www.horde.org/)
- *
- * See the enclosed file COPYING for license information (LGPL). If you
- * did not receive this file, see http://www.fsf.org/copyleft/lgpl.html.
- *
- * @author   Mike Cochrane <mike@graftonhall.co.nz>
- * @category Horde
- * @license  http://www.fsf.org/copyleft/lgpl.html LGPL
- * @package  Mime
- */
-class Horde_Mime_Viewer_Webcpp extends Horde_Mime_Viewer_Driver
-{
-    /**
-     * This driver's display capabilities.
-     *
-     * @var array
-     */
-    protected $_capability = array(
-        'full' => true,
-        'info' => false,
-        'inline' => true,
-        'raw' => false
-    );
-
-    /**
-     * Return the full rendered version of the Horde_Mime_Part object.
-     *
-     * @return array  See Horde_Mime_Viewer_Driver::render().
-     */
-    protected function _render()
-    {
-        $ret = $this->_toHTML();
-
-        /* The first 2 lines are the Content-Type line and a blank line so
-         * remove them before outputting. */
-        reset($ret);
-        $ret[key($ret)]['data'] = preg_replace("/.*\n.*\n/", '', $ret[key($ret)]['data'], 1);
-
-        return $ret;
-    }
-
-    /**
-     * Return the rendered inline version of the Horde_Mime_Part object.
-     *
-     * @return array  See Horde_Mime_Viewer_Driver::render().
-     */
-    protected function _renderInline()
-    {
-        $ret = $this->_toHTML();
-        reset($ret);
-        $data = $ret[key($ret)]['data'];
-
-        /* Extract the style sheet, removing any global body formatting
-         * if we're displaying inline. */
-        $res = preg_split(';(</style>)|(<style type="text/css">);', $data);
-        $style = $res[1];
-        $style = preg_replace('/\nbody\s+?{.*?}/s', '', $style);
-
-        /* Extract the content. */
-        $res = preg_split('/\<\/?pre\>/', $data);
-        $body = $res[1];
-
-        $ret[key($ret)]['data'] = '<style>' . $style . '</style><div class="webcpp" style="white-space:pre;font-family:Lucida Console,Courier,monospace;">' . $body . '</div>';
-
-        return $ret;
-    }
-
-    /**
-     * Converts the code to HTML.
-     *
-     * @return string  The HTML-ified version of the MIME part contents.
-     */
-    protected function _toHTML()
-    {
-        /* Check to make sure the viewer program exists. */
-        if (!isset($this->_conf['location']) ||
-            !file_exists($this->_conf['location'])) {
-            return array();
-        }
-
-        /* Create temporary files for Webcpp. */
-        $tmpin  = Horde::getTempFile('WebcppIn');
-        $tmpout = Horde::getTempFile('WebcppOut');
-
-        /* Write the contents of our buffer to the temporary input file. */
-        file_put_contents($tmpin, $this->_mimepart->getContents());
-
-        /* Get the extension for the mime type. */
-        $ext = Horde_Mime_Magic::MIMEToExt($this->_mimepart->getType());
-
-        /* Execute Web C Plus Plus. Specifying the in and out files didn't
-         * work for me but pipes did. */
-        exec($this->_conf['location'] . " --pipe --pipe -x=$ext -l -a -t < $tmpin > $tmpout");
-        $results = file_get_contents($tmpout);
-
-        return array(
-            $this->_mimepart->getMimeId() => array(
-                'data' => $results,
-                'status' => array(),
-                'type' => 'text/html; charset=' . $GLOBALS['registry']->getCharset()
-            )
-        );
-    }
-}
index a1ad7b1..706ecaa 100644 (file)
@@ -31,7 +31,9 @@ http://pear.php.net/dtd/package-2.0.xsd">
   <api>alpha</api>
  </stability>
  <license uri="http://www.gnu.org/copyleft/lesser.html">LGPL</license>
- <notes>* No need to generate Content-Transfer-Encoding header if part data is 7bit.
+ <notes>* Removed Webcpp and Enscript viewers. Source code highlighting is now
+ exclusively handled by the Srchighlight driver.
+ * No need to generate Content-Transfer-Encoding header if part data is 7bit.
  * Default disposition should be empty by default, not inline (RFC 2183 [2]).
  * Request #8556: Allow specifying a header charset for a part.
  * Add 'raw' render view to Horde_Mime_Viewer.
@@ -68,7 +70,6 @@ http://pear.php.net/dtd/package-2.0.xsd">
        <file name="Default.php" role="php" />
        <file name="Driver.php" role="php" />
        <file name="Enriched.php" role="php" />
-       <file name="Enscript.php" role="php" />
        <file name="Html.php" role="php" />
        <file name="Images.php" role="php" />
        <file name="Msexcel.php" role="php" />
@@ -92,7 +93,6 @@ http://pear.php.net/dtd/package-2.0.xsd">
        <file name="Tgz.php" role="php" />
        <file name="Tnef.php" role="php" />
        <file name="Vcard.php" role="php" />
-       <file name="Webcpp.php" role="php" />
        <file name="Wordperfect.php" role="php" />
        <file name="Zip.php" role="php" />
       </dir> <!-- /lib/Horde/Mime/Viewer -->
@@ -231,7 +231,6 @@ http://pear.php.net/dtd/package-2.0.xsd">
    <install name="lib/Horde/Mime/Viewer/Default.php" as="Horde/Mime/Viewer/Default.php" />
    <install name="lib/Horde/Mime/Viewer/Driver.php" as="Horde/Mime/Viewer/Driver.php" />
    <install name="lib/Horde/Mime/Viewer/Enriched.php" as="Horde/Mime/Viewer/Enriched.php" />
-   <install name="lib/Horde/Mime/Viewer/Enscript.php" as="Horde/Mime/Viewer/Enscript.php" />
    <install name="lib/Horde/Mime/Viewer/Html.php" as="Horde/Mime/Viewer/Html.php" />
    <install name="lib/Horde/Mime/Viewer/Images.php" as="Horde/Mime/Viewer/Images.php" />
    <install name="lib/Horde/Mime/Viewer/Msexcel.php" as="Horde/Mime/Viewer/Msexcel.php" />
@@ -255,7 +254,6 @@ http://pear.php.net/dtd/package-2.0.xsd">
    <install name="lib/Horde/Mime/Viewer/Tgz.php" as="Horde/Mime/Viewer/Tgz.php" />
    <install name="lib/Horde/Mime/Viewer/Tnef.php" as="Horde/Mime/Viewer/Tnef.php" />
    <install name="lib/Horde/Mime/Viewer/Vcard.php" as="Horde/Mime/Viewer/Vcard.php" />
-   <install name="lib/Horde/Mime/Viewer/Webcpp.php" as="Horde/Mime/Viewer/Webcpp.php" />
    <install name="lib/Horde/Mime/Viewer/Wordperfect.php" as="Horde/Mime/Viewer/Wordperfect.php" />
    <install name="lib/Horde/Mime/Viewer/Zip.php" as="Horde/Mime/Viewer/Zip.php" />
    <install name="lib/Horde/Mime/Address.php" as="Horde/Mime/Address.php" />
index d9d6410..8430ef1 100644 (file)
@@ -10,7 +10,6 @@
  * css            CSS Styles
  * deb            Debian packages
  * enriched       Enriched text format
- * enscript       GNU enscript
  * html           HTML data
  * images         Image files
  * msword         Microsoft Word files via AbiWord
@@ -34,7 +33,6 @@
  * tgz            Tarballs, including gzipped ones
  * tnef           MS-TNEF attachments
  * vcard          vCards
- * webcpp         Web C Plus Plus
  * wordperfect    WordPerfect documents via wpd2html
  * zip            Zip files
  *
@@ -48,14 +46,12 @@ $mime_drivers_map['horde']['registered'] = array(
     /* The following mime drivers require external applications to be
      * installed and are disabled by default. */
     // 'deb',
-    // 'enscript',
     // 'msword',
     // 'msexcel',
     // 'mspowerpoint',
     // 'rpm',
     // 'rtf',
     // 'srchighlite',
-    // 'webcpp',
     // 'wordperfect',
 );
 
@@ -166,8 +162,11 @@ $mime_drivers['horde']['smil'] = array(
 $mime_drivers['horde']['php'] = array(
     'inline' => true,
     'handles' => array(
-        'application/x-php', 'x-extension/phps', 'x-extension/php3s',
-        'application/x-httpd-php', 'application/x-httpd-php3',
+        'application/x-php',
+        'x-extension/phps',
+        'x-extension/php3s',
+        'application/x-httpd-php',
+        'application/x-httpd-php3',
         'application/x-httpd-phps'
     ),
     'icons' => array(
@@ -182,7 +181,8 @@ $mime_drivers['horde']['php'] = array(
 $mime_drivers['horde']['css'] = array(
     'inline' => true,
     'handles' => array(
-        'text/css', 'x-extension/css'
+        'text/css',
+        'x-extension/css'
     ),
     'icons' => array(
         'default' => 'html.png'
@@ -236,37 +236,6 @@ $mime_drivers['horde']['richtext'] = array(
 
 
 /**
- * Web C Plus Plus driver settings
- * http://webcpp.sourceforge.net/
- */
-$mime_drivers['horde']['webcpp'] = array(
-    'location' => '/usr/bin/webcpp',
-    'inline' => true,
-    'handles' => array(
-        'text/xml', 'text/sgml', 'application/xml', 'application/x-sh',
-        'application/x-javascript', 'application/x-tcl', 'x-extension/asm',
-        'application/x-asp', 'x-extension/bas', 'x-extension/cs',
-        'text/x-csrc', 'x-extension/rc', 'text/x-c++src', 'text/x-c++src',
-        'text/x-c++src', 'text/x-chdr', 'x-extension/bat', 'text/x-fortran',
-        'x-extension/f77', 'x-extension/f90', 'x-extension/for',
-        'x-extension/ftn', 'text/x-java', 'application/x-javascript',
-        'text/sgml', 'text/xml', 'text/x-pascal', 'application/x-cgi',
-        'application/x-perl', 'application/x-python', 'text/x-sql',
-        'text/x-tcl', 'application/x-shellscript', 'x-extension/vhd',
-        'x-extension/vhdl'
-    ),
-    'icons' => array(
-        'default'                  => 'text.png',
-        'text/xml'                 => 'xml.png',
-        'text/x-csrc'              => 'source-c.png',
-        'text/x-chdr'              => 'source-h.png',
-        'text/x-java'              => 'source-java.png',
-        'application/x-javascript' => 'script-js.png'
-    )
-);
-
-
-/**
  * Source-Highlight driver settings
  * http://www.gnu.org/software/src-highlite/
  */
@@ -274,41 +243,72 @@ $mime_drivers['horde']['srchighlite'] = array(
     'location' => '/usr/bin/source-highlight',
     'inline' => true,
     'handles' => array(
-        'text/x-csrc', 'text/x-c++src', 'text/x-java', 'application/x-perl',
-        'application/x-python', 'text/x-c++src', 'text/cpp'
-    ),
-    'icons' => array(
-        'default'       => 'text.png',
-        'text/x-csrc'   => 'source-c.png',
-        'text/x-c++src' => 'source-c.png',
-        'text/cpp'      => 'source-c.png',
-        'text/x-java'   => 'source-java.png'
-    )
-);
-
-
-/**
- * GNU Enscript driver settings
- */
-$mime_drivers['horde']['enscript'] = array(
-    'location' => '/usr/bin/enscript',
-    'inline' => true,
-    'handles' => array(
-        'application/x-cgi', 'application/x-shellscript',
-        'application/x-javascript', 'application/x-perl', 'application/xml',
-        'text/xml', 'text/diff', 'text/x-diff', 'text/x-patch', 'text/x-csrc',
-        'x-extension/cs', 'text/x-java', 'text/x-chdr', 'text/x-c++src',
-        'text/x-c++hdr', 'x-extension/vhd', 'x-extension/vhdl', 'text/x-sql',
-        'x-extension/vb', 'x-extension/vba', 'text/x-emacs-lisp', 'text/x-tex'
+        'application/x-httpd-php',
+        'application/x-httpd-php3',
+        'application/x-httpd-phps',
+        'application/x-javascript',
+        'application/x-perl',
+        'application/x-php',
+        'application/x-python',
+        'application/x-ruby',
+        'application/x-sh',
+        'application/x-shellscript',
+        'application/x-tcl',
+        'application/xml',
+        'text/cpp',
+        'text/css',
+        'text/diff',
+        'text/x-c++hdr',
+        'text/x-c++src',
+        'text/x-chdr',
+        'text/x-csrc',
+        'text/x-diff',
+        'text/x-emacs-lisp',
+        'text/x-fortran',
+        'text/x-java',
+        'text/x-pascal',
+        'text/x-patch',
+        'text/x-sql',
+        'text/x-tex',
+        'text/xml',
+        'x-extension/asm',
+        'x-extension/bat',
+        'x-extension/cs',
+        'x-extension/css'
+        'x-extension/f77',
+        'x-extension/f90',
+        'x-extension/for',
+        'x-extension/ftn',
+        'x-extension/php3s',
+        'x-extension/phps',
+        'x-extension/rc',
+        'x-extension/vb',
+        'x-extension/vba'
     ),
     'icons' => array(
-        'default'                  => 'text.png',
-        'text/xml'                 => 'xml.png',
-        'application/xml'          => 'xml.png',
-        'text/x-csrc'              => 'source-c.png',
-        'text/x-chdr'              => 'source-h.png',
-        'text/x-java'              => 'source-java.png',
-        'application/x-javascript' => 'script-js.png'
+        'default'                   => 'text.png',
+        'application/x-httpd-php'   => 'php.png',
+        'application/x-httpd-php3'  => 'php.png',
+        'application/x-httpd-phps'  => 'php.png',
+        'application/x-javascript'  => 'script-js.png',
+        'application/x-php'         => 'php.png',
+        'application/x-python'      => 'source-python.png',
+        'application/x-sh'          => 'shell.png',
+        'application/x-shellscript' => 'shell.png',
+        'application/xml'           => 'xml.png',
+        'text/cpp'                  => 'source-c.png',
+        'text/css'                  => 'html.png',
+        'text/x-c++hdr'             => 'source-c.png',
+        'text/x-c++src'             => 'source-c.png',
+        'text/x-chdr'               => 'source-h.png',
+        'text/x-csrc'               => 'source-c.png',
+        'text/x-java'               => 'source-java.png',
+        'text/x-sql'                => 'sql.png',
+        'text/xml'                  => 'xml.png',
+        'x-extension/css'           => 'html.png',
+        'x-extension/php3s'         => 'php.png',
+        'x-extension/phps'          => 'php.png',
+        'x-extension/rc'            => 'xml.png'
     )
 );
 
@@ -321,9 +321,13 @@ $mime_drivers['horde']['enscript'] = array(
 $mime_drivers['horde']['tgz'] = array(
     'inline' => true,
     'handles' => array(
-        'application/x-compressed-tar', 'application/x-tar',
-        'application/x-tgz', 'application/x-gzip', 'application/x-gtar',
-        'application/gzip', 'application/x-gzip-compressed'
+        'application/gzip',
+        'application/x-compressed-tar',
+        'application/x-gtar',
+        'application/x-gzip',
+        'application/x-gzip-compressed',
+        'application/x-tar',
+        'application/x-tgz'
     ),
     'icons' => array(
         'default' => 'compressed.png'
@@ -337,8 +341,9 @@ $mime_drivers['horde']['tgz'] = array(
 $mime_drivers['horde']['zip'] = array(
     'inline' => true,
     'handles' => array(
-        'application/zip', 'application/x-compressed',
-        'application/x-zip-compressed'
+        'application/x-compressed',
+        'application/x-zip-compressed',
+        'application/zip'
     ),
     'icons' => array(
         'default' => 'compressed.png'
@@ -352,7 +357,8 @@ $mime_drivers['horde']['zip'] = array(
 $mime_drivers['horde']['rar'] = array(
     'inline' => true,
     'handles' => array(
-        'application/x-rar', 'application/x-rar-compressed'
+        'application/x-rar',
+        'application/x-rar-compressed'
     ),
     'icons' => array(
         'default' => 'compressed.png'
@@ -369,7 +375,8 @@ $mime_drivers['horde']['msword'] = array(
     'location' => '/usr/bin/abiword',
     'inline' => false,
     'handles' => array(
-        'application/vnd.ms-word', 'application/msword'
+        'application/msword',
+        'application/vnd.ms-word'
     ),
     'icons' => array(
         'default' => 'msword.png'
@@ -386,8 +393,9 @@ $mime_drivers['horde']['msexcel'] = array(
     'location' => '/usr/bin/ssconvert',
     'inline' => false,
     'handles' => array(
-        'application/vnd.ms-excel', 'application/msexcel',
-        'application/x-msexcel'
+        'application/msexcel',
+        'application/x-msexcel',
+        'application/vnd.ms-excel'
     ),
     'icons' => array(
         'default' => 'msexcel.png'
@@ -404,7 +412,8 @@ $mime_drivers['horde']['mspowerpoint'] = array(
     'location' => '/usr/bin/ppthtml',
     'inline' => false,
     'handles' => array(
-        'application/vnd.ms-powerpoint', 'application/mspowerpoint'
+        'application/mspowerpoint',
+        'application/vnd.ms-powerpoint'
     ),
     'icons' => array(
         'default' => 'mspowerpoint.png'
@@ -417,7 +426,9 @@ $mime_drivers['horde']['mspowerpoint'] = array(
  */
 $mime_drivers['horde']['vcard'] = array(
     'handles' => array(
-        'text/vcard', 'text/x-vcard', 'text/directory'
+        'text/directory',
+        'text/vcard',
+        'text/x-vcard'
     ),
     'icons' => array(
         'default' => 'vcard.png'
@@ -447,7 +458,8 @@ $mime_drivers['horde']['deb'] = array(
     'location' => '/usr/bin/dpkg',
     'inline' => false,
     'handles' => array(
-        'application/x-deb', 'application/x-debian-package'
+        'application/x-deb',
+        'application/x-debian-package'
     ),
     'icons' => array(
         'default' => 'deb.png'
@@ -461,7 +473,8 @@ $mime_drivers['horde']['deb'] = array(
 $mime_drivers['horde']['security'] = array(
     'inline' => true,
     'handles' => array(
-        'multipart/encrypted', 'multipart/signed'
+        'multipart/encrypted',
+        'multipart/signed'
     ),
     'icons' => array(
         'default' => 'encryption.png'
@@ -503,7 +516,8 @@ $mime_drivers['horde']['tnef'] = array(
 $mime_drivers['horde']['rfc822'] = array(
     'inline' => false,
     'handles' => array(
-        'message/rfc822', 'x-extension/eml'
+        'message/rfc822',
+        'x-extension/eml'
     ),
     'icons' => array(
         'default' => 'mail.png'
@@ -575,7 +589,9 @@ $mime_drivers['horde']['pdf'] = array(
     /* This setting is irrelevant - PDF files can not be displayed inline. */
     'inline' => false,
     'handles' => array(
-        'application/pdf', 'application/x-pdf', 'image/pdf'
+        'application/pdf',
+        'application/x-pdf',
+        'image/pdf'
     ),
     'icons' => array(
         'default' => 'pdf.png'
@@ -592,7 +608,8 @@ $mime_drivers['horde']['rtf'] = array(
     'location' => '/usr/bin/unrtf',
     'inline' => false,
     'handles' => array(
-        'text/rtf', 'application/rtf'
+        'application/rtf',
+        'text/rtf'
     ),
     'icons' => array(
         'default' => 'text.png'
@@ -609,8 +626,11 @@ $mime_drivers['horde']['wordperfect'] = array(
     'location' => '/usr/bin/wpd2html',
     'inline' => false,
     'handles' => array(
-        'application/vnd.wordperfect', 'application/wordperf',
-        'application/wordperfect', 'application/wpd', 'application/x-wpwin'
+        'application/vnd.wordperfect',
+        'application/wordperf',
+        'application/wordperfect',
+        'application/wpd',
+        'application/x-wpwin'
     ),
     'icons' => array(
         'default' => 'wordperfect.png'
index 3fa3bf6..a2240a9 100644 (file)
@@ -47,6 +47,8 @@ Removed support for dBase, Frontbase, and mSQL database servers.
 
 Removed support for krb5 authentication driver.
 
+Removed Mime Viewer drivers: Enscript & Webcpp. Use 'Srchighlite' instead.
+
 
 Upgrading Horde from 3.3.x to 3.3.5
 ===================================