Fixed thumbnail generating

Migrating to PHP5.6 revealed that thumbnail generating used relative
paths instead of absolute paths.
This commit is contained in:
Marcin Kurczewski 2014-10-08 13:43:21 +02:00
parent 9c26087b46
commit 330f5c344c

View file

@ -372,12 +372,12 @@ final class PostEntity extends AbstractEntity implements IValidatable, ISerializ
public function getCustomThumbnailSourcePath() public function getCustomThumbnailSourcePath()
{ {
return Core::getConfig()->main->thumbnailsPath . DS . $this->name . '.thumb_source'; return TextHelper::absolutePath(Core::getConfig()->main->thumbnailsPath . DS . $this->name . '.thumb_source');
} }
public function getThumbnailPath() public function getThumbnailPath()
{ {
return Core::getConfig()->main->thumbnailsPath . DS . $this->name . '.thumb'; return TextHelper::absolutePath(Core::getConfig()->main->thumbnailsPath . DS . $this->name . '.thumb');
} }
public function hasCustomThumbnail() public function hasCustomThumbnail()
@ -424,6 +424,7 @@ final class PostEntity extends AbstractEntity implements IValidatable, ISerializ
} }
else else
{ {
#var_dump( $this->getContentPath());die;
return $thumbnailGenerator->generateFromFile( return $thumbnailGenerator->generateFromFile(
$this->getContentPath(), $this->getContentPath(),
$dstPath, $dstPath,