*/
protected $_capability = array(
'full' => true,
- 'info' => false,
- 'inline' => true,
+ 'info' => true,
+ 'inline' => false,
'raw' => false
);
protected $_metadata = array(
'compressed' => true,
'embedded' => false,
- 'forceinline' => true
+ 'forceinline' => false
);
/**
*/
protected function _render()
{
- $ret = $this->_renderInline();
+ $ret = $this->_renderInfo();
if (!empty($ret)) {
reset($ret);
$ret[key($ret)]['data'] = '<html><body>' . $ret[key($ret)]['data'] . '</body></html>';
}
/**
- * Return the rendered inline version of the Horde_Mime_Part object.
+ * Return the rendered information about the Horde_Mime_Part object.
*
* @return array See Horde_Mime_Viewer_Driver::render().
*/
- protected function _renderInline()
+ protected function _renderInfo()
{
/* Check to make sure the viewer program exists. */
if (!isset($this->_conf['location']) ||
*/
protected $_capability = array(
'full' => true,
- 'info' => false,
- 'inline' => true,
+ 'info' => true,
+ 'inline' => false,
'raw' => false
);
protected $_metadata = array(
'compressed' => true,
'embedded' => false,
- 'forceinline' => true
+ 'forceinline' => false
);
/**
*/
protected function _render()
{
- $ret = $this->_renderInline();
+ $ret = $this->_renderInfo();
if (!empty($ret)) {
reset($ret);
$ret[key($ret)]['data'] = '<html><body>' . $ret[key($ret)]['data'] . '</body></html>';
}
/**
- * Return the rendered inline version of the Horde_Mime_Part object.
+ * Return the rendered information about the Horde_Mime_Part object.
*
* @return array See Horde_Mime_Viewer_Driver::render().
* @throws Horde_Exception
*/
- protected function _renderInline()
+ protected function _renderInfo()
{
$contents = $this->_mimepart->getContents();
}
$text = '<strong>' . htmlspecialchars(sprintf(_("Contents of \"%s\""), $name)) . ":</strong>\n" .
- '<table><tr><td align="left"><span class="fixed">' .
+ '<table><tr><td align="left"><pre>' .
Horde_Text_Filter::filter(_("Archive Name") . ': ' . $name, 'space2html', array('charset' => $charset, 'encode' => true, 'encode_all' => true)) . "\n" .
Horde_Text_Filter::filter(_("Archive File Size") . ': ' . strlen($contents) . ' bytes', 'space2html', array('charset' => $charset, 'encode' => true, 'encode_all' => true)) . "\n" .
Horde_Text_Filter::filter(sprintf(ngettext("File Count: %d file", "File Count: %d files", $fileCount), $fileCount), 'space2html', array('charset' => $charset, 'encode' => true, 'encode_all' => true)) .
return array(
$this->_mimepart->getMimeId() => array(
- 'data' => nl2br($text . str_repeat('-', 106) . "\n</span></td></tr></table>"),
+ 'data' => nl2br($text . str_repeat('-', 106) . "\n</pre></td></tr></table>"),
'status' => array(),
'type' => 'text/html; charset=' . $charset
)
);
}
+
}
*/
protected $_capability = array(
'full' => true,
- 'info' => false,
+ 'info' => true,
'inline' => false,
'raw' => false
);
protected $_metadata = array(
'compressed' => true,
'embedded' => false,
- 'forceinline' => true
+ 'forceinline' => false
);
/**
*/
protected function _render()
{
+ $ret = $this->_renderInfo();
+ if (!empty($ret)) {
+ reset($ret);
+ $ret[key($ret)]['data'] = '<html><body>' . $ret[key($ret)]['data'] . '</body></html>';
+ }
+ return $ret;
+ }
+
+ /**
+ * Return the rendered information about the Horde_Mime_Part object.
+ *
+ * @return array See Horde_Mime_Viewer_Driver::render().
+ */
+ protected function _renderInfo()
+ {
/* Check to make sure the viewer program exists. */
if (!isset($this->_conf['location']) ||
!file_exists($this->_conf['location'])) {
return array(
$this->_mimepart->getMimeId() => array(
- 'data' => '<html><body><pre>' . htmlentities($data) . '</pre></body></html>',
+ 'data' => '<pre>' . htmlentities($data) . '</pre>',
'status' => array(),
'type' => 'text/html; charset=' . Horde_Nls::getCharset()
)
);
}
+
}
* @var array
*/
protected $_capability = array(
- 'full' => false,
+ 'full' => true,
'info' => true,
- 'inline' => true,
+ 'inline' => false,
'raw' => false
);
/**
- * Metadata for the current viewer/data.
- *
- * @var array
- */
- protected $_metadata = array(
- // Compression detection handled in constructor.
- 'compressed' => false,
- 'embedded' => false,
- 'forceinline' => true
- );
-
- /**
* The list of compressed subtypes.
*
* @var array
}
/**
- * Return the rendered inline version of the Horde_Mime_Part object.
+ * Return the full rendered version of the Horde_Mime_Part object.
+ *
+ * @return array See Horde_Mime_Viewer_Driver::render().
+ * @throws Horde_Exception
+ */
+ protected function _render()
+ {
+ $ret = $this->_renderInfo();
+ if (!empty($ret)) {
+ reset($ret);
+ $ret[key($ret)]['data'] = '<html><body>' . $ret[key($ret)]['data'] .
+ '</body></html>';
+ }
+ return $ret;
+ }
+
+ /**
+ * Return the rendered information about the Horde_Mime_Part object.
*
* @return array See Horde_Mime_Viewer_Driver::render().
* @throws Horde_Exception
*/
- protected function _renderInline()
+ protected function _renderInfo()
{
/* Currently, can't do anything without tar file. */
$subtype = $this->_mimepart->getSubType();
}
$text = '<strong>' . htmlspecialchars(sprintf(_("Contents of \"%s\""), $name)) . ":</strong>\n" .
- '<table><tr><td align="left"><span class="fixed">' .
+ '<table><tr><td align="left"><pre>' .
Horde_Text_Filter::filter(_("Archive Name") . ': ' . $name, 'space2html', array('charset' => $charset, 'encode' => true, 'encode_all' => true)) . "\n" .
Horde_Text_Filter::filter(_("Archive File Size") . ': ' . strlen($contents) . ' bytes', 'space2html', array('charset' => $charset, 'encode' => true, 'encode_all' => true)) . "\n" .
Horde_Text_Filter::filter(sprintf(ngettext("File Count: %d file", "File Count: %d files", $fileCount), $fileCount), 'space2html', array('charset' => $charset, 'encode' => true, 'encode_all' => true)) .
return array(
$this->_mimepart->getMimeId() => array(
- 'data' => nl2br($text . str_repeat('-', 106) . "\n</span></td></tr></table>"),
+ 'data' => nl2br($text . str_repeat('-', 106) . "\n</pre></td></tr></table>"),
'status' => array(),
'type' => 'text/html; charset=' . $charset
)
);
}
- /**
- * Return the rendered information about the Horde_Mime_Part object.
- *
- * @return array See Horde_Mime_Viewer_Driver::render().
- */
- protected function _renderInfo()
- {
- return $this->_renderInline();
- }
-
}
*/
protected $_capability = array(
'full' => true,
- 'info' => false,
- 'inline' => true,
+ 'info' => true,
+ 'inline' => false,
'raw' => false
);
protected $_metadata = array(
'compressed' => true,
'embedded' => false,
- 'forceinline' => true
+ 'forceinline' => false
);
/**
* Return the full rendered version of the Horde_Mime_Part object.
*
* @return array See Horde_Mime_Viewer_Driver::render().
+ * @throws Horde_Exception
*/
protected function _render()
{
- $ret = $this->_renderInline();
+ $ret = $this->_renderInfo();
if (!empty($ret)) {
reset($ret);
$ret[key($ret)]['data'] = '<html><body>' . $ret[key($ret)]['data'] . '</body></html>';
}
/**
- * Return the rendered inline version of the Horde_Mime_Part object.
+ * Return the rendered information about the Horde_Mime_Part object.
*
* @return array See Horde_Mime_Viewer_Driver::render().
+ * @throws Horde_Exception
*/
- protected function _renderInline()
+ protected function _renderInfo()
{
$tnef = Horde_Compress::factory('tnef');
$info = $tnef->decompress($this->_mimepart->getContents());
)
);
}
+
}
*/
protected $_capability = array(
'full' => true,
- 'info' => false,
- 'inline' => true,
+ 'info' => true,
+ 'inline' => false,
'raw' => false
);
protected $_metadata = array(
'compressed' => true,
'embedded' => false,
- 'forceinline' => true
+ 'forceinline' => false
);
/**
}
/**
- * Return the rendered inline version of the Horde_Mime_Part object.
+ * Return the rendered information about the Horde_Mime_Part object.
*
* @return array See Horde_Mime_Viewer_Driver::render().
* @throws Horde_Exception
*/
- protected function _renderInline()
+ protected function _renderInfo()
{
return $this->_toHTML();
}
protected $_metadata = array(
'compressed' => true,
'embedded' => false,
- 'forceinline' => true
+ 'forceinline' => false
);
/**
}
/**
- * Return the rendered inline version of the Horde_Mime_Part object.
+ * Return the rendered information about the Horde_Mime_Part object.
*
* @return array See Horde_Mime_Viewer_Driver::render().
*/
- protected function _renderInline()
+ protected function _renderInfo()
{
$this->_callback = array(&$this, '_IMPcallback');
- return parent::_renderInline();
+ return parent::_renderInfo();
}
/**
return $val;
}
+
}