mirror of
https://github.com/standardebooks/web.git
synced 2025-07-08 15:50:29 -04:00
Don't show works on the wanted list as not PD yet
This commit is contained in:
parent
1ab95df084
commit
b5f0f22fa7
1 changed files with 7 additions and 1 deletions
|
@ -20,8 +20,14 @@ class EbookPlaceholder{
|
|||
|
||||
protected function GetIsPublicDomain(): bool{
|
||||
if(!isset($this->_IsPublicDomain)){
|
||||
if($this->IsWanted){
|
||||
// If this book is on our wanted list, we can assume it's already PD. Otherwise works like pulp sci fi, etc., that did not renew would be shown as "not PD yet".
|
||||
$this->_IsPublicDomain = true;
|
||||
}
|
||||
else{
|
||||
$this->_IsPublicDomain = $this->YearPublished === null ? true : $this->YearPublished <= PD_YEAR;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->_IsPublicDomain;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue