Commit 173bc363950dc32f2fb25b03cfe6219c6e475f10

Authored by Paul Barrett
1 parent 974292b9

Fixed another incorrect path (Windows only again) caused by fileSystemRoot not b…

…eing added to internalVarDirectory value

Committed by: Paul Barrett

Reviewed by: Prince Mbekwa
plugins/thumbnails/thumbnails.php
... ... @@ -279,6 +279,15 @@ class ThumbnailViewlet extends KTDocumentViewlet {
279 279 public function get_width($documentId){
280 280 global $default;
281 281 $varDir = $default->internalVarDirectory;
  282 + if (stristr(PHP_OS,'WIN'))
  283 + {
  284 + $varDir = str_replace('/', '\\', $varDir);
  285 +
  286 + if (!preg_match('/' . str_replace('/', '\/', str_replace('\\', '\\\\', KT_DIR)) . '/', $thumbnaildir))
  287 + {
  288 + $varDir = KT_DIR . '\\' . trim($varDir, '\\');
  289 + }
  290 + }
282 291 $thumbnailfile = $varDir . '/thumbnails/'.$documentId.'.jpg';
283 292 $size = getimagesize($thumbnailfile);
284 293 return $size[0];
... ...