From: Chuck Hagenbuch Date: Sat, 2 Oct 2010 21:04:22 +0000 (-0400) Subject: Fix the return interface of the Html viewer X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=3684dc93c5063ea3c6753081426c41d5c607b172;p=horde.git Fix the return interface of the Html viewer --- diff --git a/chora/app/views/file/pretty.html.php b/chora/app/views/file/pretty.html.php index cedb2eef4..0f215f426 100644 --- a/chora/app/views/file/pretty.html.php +++ b/chora/app/views/file/pretty.html.php @@ -10,6 +10,7 @@ if (strpos($this->mimeType, 'text/plain') !== false) { echo Horde::img(Horde_Util::addParameter(Horde::selfUrl(true), 'p', 1), '', '', ''); } elseif ($this->pretty->canRender('inline')) { $data = $this->pretty->render('inline'); + $data = reset($data); echo $data['data']; } else { echo Horde::link(Horde_Util::addParameter(Horde::selfUrl(true), 'p', 1)) . Horde::img('download.png') . ' ' . sprintf(_("Download revision %s"), $r) . ''; diff --git a/framework/Mime_Viewer/lib/Horde/Mime/Viewer/Html.php b/framework/Mime_Viewer/lib/Horde/Mime/Viewer/Html.php index b0094d20b..b8d468f96 100644 --- a/framework/Mime_Viewer/lib/Horde/Mime/Viewer/Html.php +++ b/framework/Mime_Viewer/lib/Horde/Mime/Viewer/Html.php @@ -95,10 +95,9 @@ class Horde_Mime_Viewer_Html extends Horde_Mime_Viewer_Base { $html = $this->_cleanHTML($this->_mimepart->getContents(), array('inline' => true)); - return array( - 'data' => Horde_String::convertCharset($html, $this->_mimepart->getCharset(), $this->getConfigParam('charset')), - 'status' => array(), - 'type' => 'text/html; charset=' . $this->getConfigParam('charset'), + return $this->_renderReturn( + Horde_String::convertCharset($html, $this->_mimepart->getCharset(), $this->getConfigParam('charset')), + 'type' => 'text/html; charset=' . $this->getConfigParam('charset') ); }