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() public function getPreviewImageUrl()
{ {
$previewPath = '/assets/images/theme-preview.png'; $previewPath = '/assets/images/theme-preview.png';
$path = $this->getPath().$previewPath; if (File::exists($this->getPath().$previewPath)) {
if (!File::exists($path)) { return URL::asset('themes/'.$this->getDirName().$previewPath);
return URL::asset('modules/cms/assets/images/default-theme-preview.png');
} }
return URL::asset('themes/'.$this->getDirName().$previewPath); return URL::asset('modules/cms/assets/images/default-theme-preview.png');
} }
/** /**