fix for external cover images and thumbnail

This commit is contained in:
Diego Najar 2018-09-29 16:06:09 +02:00
parent b921662fd8
commit 3fa6450e0b
1 changed files with 7 additions and 1 deletions

View File

@ -286,7 +286,7 @@ class Page {
return false; return false;
} }
// Check if external cover image, is a valid URL // Check is external cover image
if (filter_var($fileName, FILTER_VALIDATE_URL)) { if (filter_var($fileName, FILTER_VALIDATE_URL)) {
return $fileName; return $fileName;
} }
@ -305,6 +305,12 @@ class Page {
if ($coverImageFilename==false) { if ($coverImageFilename==false) {
return false; return false;
} }
// Check is external cover image
if (filter_var($coverImageFilename, FILTER_VALIDATE_URL)) {
return $coverImageFilename;
}
return DOMAIN_UPLOADS_THUMBNAILS.$coverImageFilename; return DOMAIN_UPLOADS_THUMBNAILS.$coverImageFilename;
} }