diff options
author | vincent-peugnet <v.peugnet@free.fr> | 2020-01-30 02:46:19 +0100 |
---|---|---|
committer | vincent-peugnet <v.peugnet@free.fr> | 2020-01-30 02:46:19 +0100 |
commit | eab190e895124ef643c2b0574c84f3424857eeac (patch) | |
tree | 5dfa29c84a1e378825ddf1c46e16cb6bd85df9dd /app/class/Page.php | |
parent | 40ef00fee7286a186673ff3fb26b6802421b2bc4 (diff) | |
download | wcms-eab190e895124ef643c2b0574c84f3424857eeac.tar.gz wcms-eab190e895124ef643c2b0574c84f3424857eeac.zip |
default thumbnail fix #49
Diffstat (limited to 'app/class/Page.php')
-rw-r--r-- | app/class/Page.php | 30 |
1 files changed, 14 insertions, 16 deletions
diff --git a/app/class/Page.php b/app/class/Page.php index fff98dc..8adf418 100644 --- a/app/class/Page.php +++ b/app/class/Page.php @@ -35,6 +35,7 @@ class Page extends Dbitem protected $templatejavascript; protected $templateoptions; protected $favicon; + protected $thumbnail; protected $authors; protected $invites; protected $readers; @@ -93,6 +94,7 @@ class Page extends Dbitem $this->settemplatejavascript(''); $this->settemplateoptions(['externalcss', 'externaljavascript', 'favicon', 'thumbnail', 'reccursivecss']); $this->setfavicon(''); + $this->setthumbnail(''); $this->setauthors([]); $this->setinvites([]); $this->setreaders([]); @@ -112,22 +114,6 @@ class Page extends Dbitem return ['pagevarlist' => $classvarlist]; } - /** - * Check if page have a thumbnail - * @return bool true if the page have a thumbnail otherwise return false. - */ - public function thumbnailexist() : bool - { - $thumbnaillink = Model::THUMBNAIL_DIR . $this->id . '.jpg'; - - $test = file_exists($thumbnaillink); - - $exist = file_exists(Model::THUMBNAIL_DIR . $this->id . '.jpg'); - - return $exist; - } - - // _____________________________________________________ G E T ____________________________________________________ public function id($type = 'string') @@ -382,6 +368,11 @@ class Page extends Dbitem return $this->favicon; } + public function thumbnail($type = 'string') + { + return $this->thumbnail; + } + public function authors($type = 'array') { if($type == 'string') { @@ -681,6 +672,13 @@ class Page extends Dbitem } } + public function setthumbnail($thumbnail) + { + if (is_string($thumbnail)) { + $this->thumbnail = $thumbnail; + } + } + public function setauthors($authors) { if(is_array($authors)) { |