Commit 638cb4dc57a4c0d1bfcb1d4f25f8a7dead41e870

Authored by Paul Barrett
1 parent e1088deb

Removed dubious windows only thumbnail path code. Added comment about windows c…

…ommand probably needing quotes (quotes previously added.)

Committed by: Paul Barrett

Reviewed by: Jarrett Jordaan
plugins/thumbnails/thumbnails.php
@@ -171,10 +171,6 @@ class thumbnailGenerator extends BaseProcessor @@ -171,10 +171,6 @@ class thumbnailGenerator extends BaseProcessor
171 return false; 171 return false;
172 } 172 }
173 173
174 - if (WINDOWS_OS) {  
175 - $thumbnailfile = KT_DIR . $thumbnailfile;  
176 - }  
177 -  
178 // if a previous version of the thumbnail exists - delete it 174 // if a previous version of the thumbnail exists - delete it
179 if (file_exists($thumbnailfile)) { 175 if (file_exists($thumbnailfile)) {
180 @unlink($thumbnailfile); 176 @unlink($thumbnailfile);
@@ -182,6 +178,7 @@ class thumbnailGenerator extends BaseProcessor @@ -182,6 +178,7 @@ class thumbnailGenerator extends BaseProcessor
182 // do generation 178 // do generation
183 // if (extension_loaded('imagick')) { 179 // if (extension_loaded('imagick')) {
184 $pathConvert = (!empty($default->convertPath)) ? $default->convertPath : 'convert'; 180 $pathConvert = (!empty($default->convertPath)) ? $default->convertPath : 'convert';
  181 + // windows path may contain spaces
185 if (WINDOWS_OS) { 182 if (WINDOWS_OS) {
186 $pathConvert = '"' . $pathConvert . '"'; 183 $pathConvert = '"' . $pathConvert . '"';
187 } 184 }
@@ -220,10 +217,6 @@ class ThumbnailViewlet extends KTDocumentViewlet { @@ -220,10 +217,6 @@ class ThumbnailViewlet extends KTDocumentViewlet {
220 global $default; 217 global $default;
221 $varDir = $default->internalVarDirectory; 218 $varDir = $default->internalVarDirectory;
222 $thumbnailfile = $varDir . '/thumbnails/'.$documentId.'.jpg'; 219 $thumbnailfile = $varDir . '/thumbnails/'.$documentId.'.jpg';
223 -  
224 - if (WINDOWS_OS) {  
225 - $thumbnailfile = KT_DIR . $thumbnailfile;  
226 - }  
227 220
228 // if the thumbnail doesn't exist try to create it 221 // if the thumbnail doesn't exist try to create it
229 if (!file_exists($thumbnailfile)){ 222 if (!file_exists($thumbnailfile)){
setup/wizard/steps/database.php
@@ -790,9 +790,8 @@ class database extends Step @@ -790,9 +790,8 @@ class database extends Step
790 // if Windows, attempt to insert full paths to binaries 790 // if Windows, attempt to insert full paths to binaries
791 if (WINDOWS_OS) { 791 if (WINDOWS_OS) {
792 $winBinaries = array('php' => 'ZendServer\bin\php.exe', 'python' => 'openoffice\program\python.exe', 792 $winBinaries = array('php' => 'ZendServer\bin\php.exe', 'python' => 'openoffice\program\python.exe',
793 - 'java' => 'jre\bin\java.exe',  
794 - // since we don't know where convert is yet, let's just assume somewhere for now (manually test)  
795 - 'convert' => 'bin\imagemagick\convert.exe', 793 + 'java' => 'jre\bin\java.exe', 'convert' => 'bin\imagemagick\convert.exe',
  794 + 'df' => 'bin//df.exe',
796 'zip' => 'bin\zip\zip.exe', 'unzip' => 'bin\unzip\unzip.exe'); 795 'zip' => 'bin\zip\zip.exe', 'unzip' => 'bin\unzip\unzip.exe');
797 foreach ($winBinaries as $displayName => $bin) 796 foreach ($winBinaries as $displayName => $bin)
798 { 797 {
@@ -822,7 +821,8 @@ class database extends Step @@ -822,7 +821,8 @@ class database extends Step
822 } 821 }
823 // if Linux? 822 // if Linux?
824 else { 823 else {
825 - // TODO python binary 824 + // TODO python binary?
  825 + // TODO other binaries?
826 } 826 }
827 } 827 }
828 828