This commit is contained in:
Samuel Georges 2015-04-15 19:43:05 +10:00
parent 8e69039c0d
commit 7ca6602c08

View File

@ -308,12 +308,11 @@ class Theme
public function getPreviewImageUrl()
{
$previewPath = '/assets/images/theme-preview.png';
$path = $this->getPath().$previewPath;
if (!File::exists($path)) {
return URL::asset('modules/cms/assets/images/default-theme-preview.png');
if (File::exists($this->getPath().$previewPath)) {
return URL::asset('themes/'.$this->getDirName().$previewPath);
}
return URL::asset('themes/'.$this->getDirName().$previewPath);
return URL::asset('modules/cms/assets/images/default-theme-preview.png');
}
/**