mirror of
https://github.com/ad-aures/castopod.git
synced 2026-04-15 12:37:46 +02:00
feat(episodes): replace soft delete with permanent delete
+ add constraint to prevent deleting an episode when published
This commit is contained in:
parent
0345728739
commit
eb9ff522c2
20 changed files with 242 additions and 107 deletions
|
|
@ -63,12 +63,16 @@ class Transcript extends BaseMedia
|
|||
return $this;
|
||||
}
|
||||
|
||||
public function deleteFile(): void
|
||||
public function deleteFile(): bool
|
||||
{
|
||||
parent::deleteFile();
|
||||
if (! parent::deleteFile()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if ($this->json_path) {
|
||||
unlink($this->json_path);
|
||||
return unlink($this->json_path);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue