Bug fixes, the method thumbCoverImage not was returning the filename

This commit is contained in:
Diego Najar 2018-11-01 20:27:21 -03:00
parent c668d4ace1
commit 3b33d20cf6
1 changed files with 5 additions and 5 deletions

View File

@ -304,20 +304,20 @@ class Page {
// Returns the endpoint of the thumbnail cover image, FALSE if the page doesn't have a cover image // Returns the endpoint of the thumbnail cover image, FALSE if the page doesn't have a cover image
public function thumbCoverImage() public function thumbCoverImage()
{ {
$coverImageFilename = $this->coverImage(false); $filename = $this->coverImage(false);
if ($coverImageFilename==false) { if ($filename==false) {
return false; return false;
} }
// Check is external cover image // Check is external cover image
if (filter_var($coverImageFilename, FILTER_VALIDATE_URL)) { if (filter_var($filename, FILTER_VALIDATE_URL)) {
return $coverImageFilename; return $filename;
} }
if (IMAGE_RESTRICT) { if (IMAGE_RESTRICT) {
return DOMAIN_UPLOADS_PAGES.$this->uuid().'/thumbnails/'.$filename; return DOMAIN_UPLOADS_PAGES.$this->uuid().'/thumbnails/'.$filename;
} }
return DOMAIN_UPLOADS_THUMBNAILS.$coverImageFilename; return DOMAIN_UPLOADS_THUMBNAILS.$filename;
} }
// Returns TRUE if the content has the text splited // Returns TRUE if the content has the text splited