mirror of
https://github.com/standardebooks/web.git
synced 2025-07-16 03:16:36 -04:00
Switch from EbookPlaceholder.Status to EbookPlaceholder.IsInProgress, and some type tweaks
This commit is contained in:
parent
1a742baa51
commit
e56de4b19d
8 changed files with 56 additions and 39 deletions
|
@ -612,11 +612,16 @@ class Ebook{
|
|||
|
||||
protected function GetEbookPlaceholder(): ?EbookPlaceholder{
|
||||
if(!isset($this->_EbookPlaceholder)){
|
||||
$this->_EbookPlaceholder = Db::Query('
|
||||
SELECT *
|
||||
from EbookPlaceholders
|
||||
where EbookId = ?
|
||||
', [$this->EbookId], EbookPlaceholder::class)[0] ?? null;
|
||||
if(!isset($this->EbookId)){
|
||||
$this->_EbookPlaceholder = null;
|
||||
}
|
||||
else{
|
||||
$this->_EbookPlaceholder = Db::Query('
|
||||
SELECT *
|
||||
from EbookPlaceholders
|
||||
where EbookId = ?
|
||||
', [$this->EbookId], EbookPlaceholder::class)[0] ?? null;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->_EbookPlaceholder;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue