diff options
| author | spiderr <spiderr@bitweaver.org> | 2021-03-08 11:13:02 -0500 |
|---|---|---|
| committer | spiderr <spiderr@bitweaver.org> | 2021-03-08 11:13:02 -0500 |
| commit | 119bf3c5a36db207fc75d92b09b5acd16622e850 (patch) | |
| tree | 8ee6bd6f63b00fd766daa5a8b444321346ad17c9 | |
| parent | 0784f537db64aa68c2b4b71fe282c7dde0a4afa8 (diff) | |
| download | liberty-119bf3c5a36db207fc75d92b09b5acd16622e850.tar.gz liberty-119bf3c5a36db207fc75d92b09b5acd16622e850.tar.bz2 liberty-119bf3c5a36db207fc75d92b09b5acd16622e850.zip | |
remove debugl; fix data.attachment 'id' load
| -rw-r--r-- | plugins/data.attachment.php | 4 |
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; |
