diff --git a/www/artworks/get.php b/www/artworks/get.php index 0e8eafbf..876e562b 100644 --- a/www/artworks/get.php +++ b/www/artworks/get.php @@ -3,7 +3,7 @@ use function Safe\session_unset; session_start(); -$saved = HttpInput::Bool(SESSION, 'is-artwork-saved') ?? false; +$isSaved = HttpInput::Bool(SESSION, 'is-saved') ?? false; /** @var ?\Exception $exception */ $exception = $_SESSION['exception'] ?? null; @@ -22,7 +22,7 @@ try{ } // We got here because an artwork was successfully submitted - if($saved){ + if($isSaved){ session_unset(); } @@ -55,7 +55,7 @@ catch(Exceptions\InvalidPermissionsException){ = Template::Error(['exception' => $exception]) ?> - if($saved){ ?> + if($isSaved){ ?>
} ?> diff --git a/www/artworks/new.php b/www/artworks/new.php index fe73e34e..b36eac41 100644 --- a/www/artworks/new.php +++ b/www/artworks/new.php @@ -3,7 +3,7 @@ use function Safe\session_unset; session_start(); -$created = HttpInput::Bool(SESSION, 'is-artwork-created') ?? false; +$isCreated = HttpInput::Bool(SESSION, 'is-created') ?? false; /** @var ?\Exception $exception */ $exception = $_SESSION['exception'] ?? null; /** @var ?Artwork $artwork */ @@ -19,7 +19,7 @@ try{ } // We got here because an artwork was successfully submitted - if($created){ + if($isCreated){ http_response_code(201); $artwork = null; session_unset(); @@ -62,7 +62,7 @@ catch(Exceptions\InvalidPermissionsException){ = Template::Error(['exception' => $exception]) ?> - if($created){ ?> + if($isCreated){ ?> } ?> diff --git a/www/artworks/post.php b/www/artworks/post.php index a5224e0e..98897d5f 100644 --- a/www/artworks/post.php +++ b/www/artworks/post.php @@ -36,7 +36,7 @@ try{ $artwork->Create(HttpInput::File('artwork-image')); $_SESSION['artwork'] = $artwork; - $_SESSION['is-artwork-created'] = true; + $_SESSION['is-created'] = true; http_response_code(303); header('Location: /artworks/new'); @@ -71,7 +71,7 @@ try{ $artwork->Save(HttpInput::File('artwork-image')); $_SESSION['artwork'] = $artwork; - $_SESSION['is-artwork-saved'] = true; + $_SESSION['is-saved'] = true; http_response_code(303); header('Location: ' . $artwork->Url); @@ -109,7 +109,7 @@ try{ $artwork->Save(); $_SESSION['artwork'] = $artwork; - $_SESSION['is-artwork-saved'] = true; + $_SESSION['is-saved'] = true; http_response_code(303); header('Location: ' . $artwork->Url);