summaryrefslogtreecommitdiff
path: root/plugins/mime.pdf.php
diff options
context:
space:
mode:
authorlsces <lester@lsces.co.uk>2013-07-15 14:03:58 +0100
committerlsces <lester@lsces.co.uk>2013-07-15 14:03:58 +0100
commitfdf52c88112745f5332335d27b68c35559c79595 (patch)
tree3252be4ef200faf7ffcdc75aa56c53e9c6e8b1f0 /plugins/mime.pdf.php
parenta7dcfde5f9aefa15bd6258f4f4a54d24f2693d31 (diff)
downloadliberty-fdf52c88112745f5332335d27b68c35559c79595.tar.gz
liberty-fdf52c88112745f5332335d27b68c35559c79595.tar.bz2
liberty-fdf52c88112745f5332335d27b68c35559c79595.zip
liberty_jpeg_originals was messing up PDF thumbnails
need option to load original.jpg or the proper file
Diffstat (limited to 'plugins/mime.pdf.php')
-rw-r--r--plugins/mime.pdf.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/plugins/mime.pdf.php b/plugins/mime.pdf.php
index 80c1b6f..185918b 100644
--- a/plugins/mime.pdf.php
+++ b/plugins/mime.pdf.php
@@ -137,7 +137,12 @@ function mime_pdf_convert_pdf2swf( $pFileHash ) {
$swfcombine = trim( $gBitSystem->getConfig( 'swfcombine_path', shell_exec( 'which swfcombine' )));
if( is_executable( $pdf2swf ) && is_executable( $swfcombine )) {
- $source = STORAGE_PKG_PATH.$pFileHash['upload']['dest_branch'].$pFileHash['upload']['name'];
+ $source = STORAGE_PKG_PATH.$pFileHash['upload']['dest_branch'];
+ if ( $gBitSystem->isFeatureActive( 'liberty_jpeg_originals' ) ) {
+ $source .= 'original.jpg';
+ } else {
+ $source .= $pFileHash['upload']['name'];
+ }
$destPath = dirname( $source );
$tmp_file = "$destPath/tmp.swf";