* Fix PDF imagemagick thumbnail generation to be properly displayed
(http://board.s9y.org/viewtopic.php?f=3&t=15446)
This commit is contained in:
parent
217316db56
commit
06a501781e
@ -3,6 +3,11 @@
|
||||
Version 1.5 ()
|
||||
------------------------------------------------------------------------
|
||||
|
||||
* Fix PDF imagemagick thumbnail generation to be properly displayed
|
||||
(http://board.s9y.org/viewtopic.php?f=3&t=15446)
|
||||
|
||||
* Warn about non-writable "plugins" directory in installation
|
||||
|
||||
* Added new optional parameter for plugin config type "text": rows.
|
||||
(brockhaus)
|
||||
|
||||
|
@ -1681,6 +1681,7 @@ function serendipity_isImage(&$file, $strict = false, $allowed = 'image/') {
|
||||
$file['location'] = $serendipity['serendipityPath'] . preg_replace('@^(' . preg_quote($serendipity['serendipityHTTPPath']) . ')@i', '', $file['imgsrc']);
|
||||
|
||||
// File is PDF -> Thumb is PNG
|
||||
// Detect PDF thumbs
|
||||
if ($file['mime'] == 'application/pdf' && file_exists($file['location'] . '.png') && $strict == false) {
|
||||
$file['imgsrc'] .= '.png';
|
||||
$file['displaymime'] = 'image/png';
|
||||
@ -2709,6 +2710,14 @@ function serendipity_prepareMedia(&$file, $url = '') {
|
||||
}
|
||||
}
|
||||
|
||||
// Detect PDF thumbs
|
||||
if (file_exists($file['full_thumb'] . '.png')) {
|
||||
$file['full_thumb'] .= '.png';
|
||||
$file['full_thumbHTTP'] .= '.png';
|
||||
$file['show_thumb'] .= '.png';
|
||||
$sThumbSource .= '.png';
|
||||
}
|
||||
|
||||
if (empty($file['realname'])) {
|
||||
$file['realname'] = $file['name'] . '.' . $file['extension'];
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user