From 702ac985f87de78ae541816833197b4d70677497 Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Wed, 1 Jul 2009 00:30:14 -0600 Subject: [PATCH] Another place with improper use of Horde::img() --- imp/lib/Mime/Viewer/Pdf.php | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/imp/lib/Mime/Viewer/Pdf.php b/imp/lib/Mime/Viewer/Pdf.php index 36acd70af..9b2835b27 100644 --- a/imp/lib/Mime/Viewer/Pdf.php +++ b/imp/lib/Mime/Viewer/Pdf.php @@ -82,9 +82,9 @@ class IMP_Horde_Mime_Viewer_Pdf extends Horde_Mime_Viewer_Pdf ); if ($GLOBALS['browser']->hasFeature('javascript')) { - $status[] = $this->_params['contents']->linkViewJS($this->_mimepart, 'view_attach', Horde::img($this->_params['contents']->urlView($this->_mimepart, 'view_attach', array('params' => array('pdf_view_thumbnail' => 1)), false), _("View Attachment"), null, ''), null, null, null); + $status[] = $this->_params['contents']->linkViewJS($this->_mimepart, 'view_attach', $this->_outputImgTag(), null, null, null); } else { - $status[] = Horde::link($this->_params['contents']->urlView($this->_mimepart, 'view_attach')) . Horde::img($this->_params['contents']->urlView($this->_mimepart, 'view_attach', array('params' => array('pdf_view_thumbnail' => 1)), false), _("View Attachment"), null, '') . ''; + $status[] = Horde::link($this->_params['contents']->urlView($this->_mimepart, 'view_attach')) . $this->_outputImgTag() . ''; } return array( @@ -129,4 +129,15 @@ class IMP_Horde_Mime_Viewer_Pdf extends Horde_Mime_Viewer_Pdf return $img; } + + /** + * Output an image tag for the thumbnail. + * + * @return string An image tag. + */ + protected function _outputImgTag() + { + return '' . htmlspecialchars(_('; + } + } -- 2.11.0