* Fix escaping when using ImageMagick to create PDF-thumbnail images

(stm9x9)
This commit is contained in:
Garvin Hicking 2010-01-19 09:47:52 +00:00
parent adc738fc9e
commit 33aa069a33
2 changed files with 4 additions and 1 deletions

View File

@ -3,6 +3,9 @@
Version 1.6 ()
------------------------------------------------------------------------
* Fix escaping when using ImageMagick to create PDF-thumbnail images
(stm9x9)
* Use "Longtext" instead of "text" for new installations on blog entry
body and extended body inside database tables. (garvinhicking)

View File

@ -659,7 +659,7 @@ function serendipity_makeThumbnail($file, $directory = '', $size = false, $thumb
}
$newSize = $r['width'] . 'x' . $r['height'];
if ($fdim['mime'] == 'application/pdf') {
$cmd = escapeshellcmd($serendipity['convert']) . ' -antialias -flatten -scale '. serendipity_escapeshellarg($newSize) .' "'. serendipity_escapeshellarg($infile) .'[0]" '. serendipity_escapeshellarg($outfile . '.png');
$cmd = escapeshellcmd($serendipity['convert']) . ' -antialias -flatten -scale '. serendipity_escapeshellarg($newSize) .' '. serendipity_escapeshellarg($infile . '[0]') . ' ' . serendipity_escapeshellarg($outfile . '.png');
} else {
if (!$force_resize && serendipity_ini_bool(ini_get('safe_mode')) === false) {
$newSize .= '>'; // Tell imagemagick to not enlarge small images, only works if safe_mode is off (safe_mode turns > in to \>)