mirror of
https://github.com/standardebooks/web.git
synced 2025-07-05 06:10:36 -04:00
Set placeholder to in progress when creating a project for an existing placeholder
This commit is contained in:
parent
c4c65b9181
commit
de99d1869f
1 changed files with 6 additions and 4 deletions
|
@ -41,10 +41,6 @@ try{
|
|||
if($project->Ebook->EbookPlaceholder !== null && !$project->Ebook->EbookPlaceholder->IsInProgress){
|
||||
$project->EbookId = $project->Ebook->EbookId;
|
||||
$_SESSION['is-only-ebook-project-created'] = true;
|
||||
|
||||
// Set the placeholder to in progress.
|
||||
$project->Ebook->EbookPlaceholder->IsInProgress = true;
|
||||
$project->Ebook->EbookPlaceholder->Save();
|
||||
}
|
||||
else{
|
||||
// `Ebook` exists and it's not a placeholder, so really fail.
|
||||
|
@ -58,6 +54,12 @@ try{
|
|||
$project->Create();
|
||||
}
|
||||
|
||||
// Set the placeholder to in progress.
|
||||
if(isset($project->Ebook->EbookPlaceholder)){
|
||||
$project->Ebook->EbookPlaceholder->IsInProgress = true;
|
||||
$project->Ebook->EbookPlaceholder->Save();
|
||||
}
|
||||
|
||||
$_SESSION['project'] = $project;
|
||||
if(!isset($_SESSION['is-only-ebook-project-created'])){
|
||||
$_SESSION['is-project-created'] = true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue