Switch from EbookPlaceholder.Status to EbookPlaceholder.IsInProgress, and some type tweaks

This commit is contained in:
Alex Cabal 2024-12-14 13:39:28 -06:00
parent 1a742baa51
commit e56de4b19d
8 changed files with 56 additions and 39 deletions

View file

@ -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;