From 638cb4dc57a4c0d1bfcb1d4f25f8a7dead41e870 Mon Sep 17 00:00:00 2001 From: Paul Barrett Date: Thu, 5 Nov 2009 16:21:58 +0200 Subject: [PATCH] Removed dubious windows only thumbnail path code. Added comment about windows command probably needing quotes (quotes previously added.) --- plugins/thumbnails/thumbnails.php | 9 +-------- setup/wizard/steps/database.php | 8 ++++---- 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/plugins/thumbnails/thumbnails.php b/plugins/thumbnails/thumbnails.php index fb5c055..2065db6 100755 --- a/plugins/thumbnails/thumbnails.php +++ b/plugins/thumbnails/thumbnails.php @@ -171,10 +171,6 @@ class thumbnailGenerator extends BaseProcessor return false; } - if (WINDOWS_OS) { - $thumbnailfile = KT_DIR . $thumbnailfile; - } - // if a previous version of the thumbnail exists - delete it if (file_exists($thumbnailfile)) { @unlink($thumbnailfile); @@ -182,6 +178,7 @@ class thumbnailGenerator extends BaseProcessor // do generation // if (extension_loaded('imagick')) { $pathConvert = (!empty($default->convertPath)) ? $default->convertPath : 'convert'; + // windows path may contain spaces if (WINDOWS_OS) { $pathConvert = '"' . $pathConvert . '"'; } @@ -220,10 +217,6 @@ class ThumbnailViewlet extends KTDocumentViewlet { global $default; $varDir = $default->internalVarDirectory; $thumbnailfile = $varDir . '/thumbnails/'.$documentId.'.jpg'; - - if (WINDOWS_OS) { - $thumbnailfile = KT_DIR . $thumbnailfile; - } // if the thumbnail doesn't exist try to create it if (!file_exists($thumbnailfile)){ diff --git a/setup/wizard/steps/database.php b/setup/wizard/steps/database.php index c6072f3..a9ee15d 100644 --- a/setup/wizard/steps/database.php +++ b/setup/wizard/steps/database.php @@ -790,9 +790,8 @@ class database extends Step // if Windows, attempt to insert full paths to binaries if (WINDOWS_OS) { $winBinaries = array('php' => 'ZendServer\bin\php.exe', 'python' => 'openoffice\program\python.exe', - 'java' => 'jre\bin\java.exe', - // since we don't know where convert is yet, let's just assume somewhere for now (manually test) - 'convert' => 'bin\imagemagick\convert.exe', + 'java' => 'jre\bin\java.exe', 'convert' => 'bin\imagemagick\convert.exe', + 'df' => 'bin//df.exe', 'zip' => 'bin\zip\zip.exe', 'unzip' => 'bin\unzip\unzip.exe'); foreach ($winBinaries as $displayName => $bin) { @@ -822,7 +821,8 @@ class database extends Step } // if Linux? else { - // TODO python binary + // TODO python binary? + // TODO other binaries? } } -- libgit2 0.21.4