Don't show compressed contents info in full mode.
authorMichael M Slusarz <slusarz@curecanti.org>
Tue, 10 Aug 2010 20:29:55 +0000 (14:29 -0600)
committerMichael M Slusarz <slusarz@curecanti.org>
Tue, 10 Aug 2010 20:38:20 +0000 (14:38 -0600)
This is informational data only.  Full mode is meant for a viewable
representation of the data itself, not information about the data.

framework/Mime_Viewer/lib/Horde/Mime/Viewer/Deb.php
framework/Mime_Viewer/lib/Horde/Mime/Viewer/Rar.php
framework/Mime_Viewer/lib/Horde/Mime/Viewer/Rpm.php
framework/Mime_Viewer/lib/Horde/Mime/Viewer/Tgz.php
framework/Mime_Viewer/lib/Horde/Mime/Viewer/Zip.php
imp/lib/Mime/Viewer/Zip.php

index 154d086..c9eb7ce 100644 (file)
@@ -21,7 +21,7 @@ class Horde_Mime_Viewer_Deb extends Horde_Mime_Viewer_Base
      * @var array
      */
     protected $_capability = array(
-        'full' => true,
+        'full' => false,
         'info' => true,
         'inline' => false,
         'raw' => false
@@ -62,16 +62,6 @@ class Horde_Mime_Viewer_Deb extends Horde_Mime_Viewer_Base
     }
 
     /**
-     * Return the full rendered version of the Horde_Mime_Part object.
-     *
-     * @return array  See parent::render().
-     */
-    protected function _render()
-    {
-        return $this->_renderFullReturn($this->_renderInfo());
-    }
-
-    /**
      * Return the rendered information about the Horde_Mime_Part object.
      *
      * @return array  See parent::render().
index 2e84aff..474bf6f 100644 (file)
@@ -22,7 +22,7 @@ class Horde_Mime_Viewer_Rar extends Horde_Mime_Viewer_Base
      * @var array
      */
     protected $_capability = array(
-        'full' => true,
+        'full' => false,
         'info' => true,
         'inline' => false,
         'raw' => false
@@ -57,16 +57,6 @@ class Horde_Mime_Viewer_Rar extends Horde_Mime_Viewer_Base
     }
 
     /**
-     * Return the full rendered version of the Horde_Mime_Part object.
-     *
-     * @return array  See parent::render().
-     */
-    protected function _render()
-    {
-        return $this->_renderFullReturn($this->_renderInfo());
-    }
-
-    /**
      * Return the rendered information about the Horde_Mime_Part object.
      *
      * @return array  See parent::render().
index 3427ada..296d32a 100644 (file)
@@ -21,7 +21,7 @@ class Horde_Mime_Viewer_Rpm extends Horde_Mime_Viewer_Base
      * @var array
      */
     protected $_capability = array(
-        'full' => true,
+        'full' => false,
         'info' => true,
         'inline' => false,
         'raw' => false
@@ -62,16 +62,6 @@ class Horde_Mime_Viewer_Rpm extends Horde_Mime_Viewer_Base
     }
 
     /**
-     * Return the full rendered version of the Horde_Mime_Part object.
-     *
-     * @return array  See parent::render().
-     */
-    protected function _render()
-    {
-        return $this->_renderFullReturn($this->_renderInfo());
-    }
-
-    /**
      * Return the rendered information about the Horde_Mime_Part object.
      *
      * @return array  See parent::render().
index e7a4a56..ed91cc0 100644 (file)
@@ -22,7 +22,7 @@ class Horde_Mime_Viewer_Tgz extends Horde_Mime_Viewer_Base
      * @var array
      */
     protected $_capability = array(
-        'full' => true,
+        'full' => false,
         'info' => true,
         'inline' => false,
         'raw' => false
@@ -59,17 +59,6 @@ class Horde_Mime_Viewer_Tgz extends Horde_Mime_Viewer_Base
     }
 
     /**
-     * Return the full rendered version of the Horde_Mime_Part object.
-     *
-     * @return array  See parent::render().
-     * @throws Horde_Exception
-     */
-    protected function _render()
-    {
-        return $this->_renderFullReturn($this->_renderInfo());
-    }
-
-    /**
      * Return the rendered information about the Horde_Mime_Part object.
      *
      * @return array  See parent::render().
index b7c9a87..9d1ba0e 100644 (file)
@@ -22,7 +22,7 @@ class Horde_Mime_Viewer_Zip extends Horde_Mime_Viewer_Base
      * @var array
      */
     protected $_capability = array(
-        'full' => true,
+        'full' => false,
         'info' => true,
         'inline' => false,
         'raw' => false
@@ -66,17 +66,6 @@ class Horde_Mime_Viewer_Zip extends Horde_Mime_Viewer_Base
     }
 
     /**
-     * Return the full rendered version of the Horde_Mime_Part object.
-     *
-     * @return array  See parent::render().
-     * @throws Horde_Exception
-     */
-    protected function _render()
-    {
-        return $this->_renderFullReturn($this->_toHTML());
-    }
-
-    /**
      * Return the rendered information about the Horde_Mime_Part object.
      *
      * @return array  See parent::render().
@@ -84,17 +73,6 @@ class Horde_Mime_Viewer_Zip extends Horde_Mime_Viewer_Base
      */
     protected function _renderInfo()
     {
-        return $this->_toHTML();
-    }
-
-    /**
-     * Converts the ZIP file to an HTML display.
-     *
-     * @return array  See parent::render().
-     * @throws Horde_Exception
-     */
-    protected function _toHTML()
-    {
         $charset = $this->getConfigParam('charset');
         $contents = $this->_mimepart->getContents();
 
index 1e5e105..c71d63e 100644 (file)
@@ -30,8 +30,7 @@ class IMP_Mime_Viewer_Zip extends Horde_Mime_Viewer_Zip
     protected function _render()
     {
         if (!($zip_atc = Horde_Util::getFormData('zip_attachment'))) {
-            $this->_callback = array($this, '_IMPcallback');
-            return parent::_render();
+            return array();
         }
 
         /* Send the requested file. Its position in the zip archive is located
@@ -82,7 +81,7 @@ class IMP_Mime_Viewer_Zip extends Horde_Mime_Viewer_Zip
     }
 
     /**
-     * The function to use as a callback to _toHTML().
+     * The function to use as a callback to _renderInfo().
      *
      * @param integer $key  The position of the file in the zip archive.
      * @param array $val    The information array for the archived file.