summaryrefslogtreecommitdiff
path: root/plugins/data.attachment.php
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/data.attachment.php')
-rw-r--r--plugins/data.attachment.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/data.attachment.php b/plugins/data.attachment.php
index aba0dd5..a161f63 100644
--- a/plugins/data.attachment.php
+++ b/plugins/data.attachment.php
@@ -122,7 +122,7 @@ function data_attachment( $pData, $pParams, $pCommonObject, $pParseHash ) {
$att = array();
- if( empty( $pCommonObject ) || !is_a( $pCommonObject, 'LibertyMime' ) && !($att = $pCommonObject->getAttachment( $pParams['id'], $pParams )) ) {
+ if( !($att = LibertyMime::getAttachment( $pParams['id'], $pParams )) ) {
$ret = tra( "The attachment id given is not valid." );
return $ret;
}
@@ -193,7 +193,7 @@ function data_attachment( $pData, $pParams, $pCommonObject, $pParseHash ) {
$height = !empty( $pParams['height'] ) ? $pParams['height'] : '';
$gBitSmarty->assign( 'height', $height );
-eb( $att );
+
$mimehandler = (( !empty( $wrapper['output'] ) && $wrapper['output'] == 'thumbnail' ) ? LIBERTY_DEFAULT_MIME_HANDLER : $att['attachment_plugin_guid'] );
$ret = $gBitSmarty->fetch( $gLibertySystem->getMimeTemplate( 'attachment', $mimehandler ));
return $ret;