Fix wish view
This commit is contained in:
parent
4b8ee4f1f8
commit
6baffd4f7c
1 changed files with 4 additions and 4 deletions
|
@ -8,6 +8,10 @@
|
|||
|
||||
use wishthis\{Page, Wish};
|
||||
|
||||
$userIsAuthenticated = false;
|
||||
$wish = new Wish($_GET['id'], false);
|
||||
$wishlists = $user->getWishlists($wish->wishlist);
|
||||
|
||||
$page = new page(__FILE__, $wish->title);
|
||||
|
||||
if ('POST' === $_SERVER['REQUEST_METHOD'] && count($_POST) >= 0) {
|
||||
|
@ -21,10 +25,6 @@ if ('POST' === $_SERVER['REQUEST_METHOD'] && count($_POST) >= 0) {
|
|||
$page->messages[] = Page::success('Wish successfully updated.', 'Success');
|
||||
}
|
||||
|
||||
$userIsAuthenticated = false;
|
||||
$wish = new Wish($_GET['id'], false);
|
||||
$wishlists = $user->getWishlists($wish->wishlist);
|
||||
|
||||
foreach ($wishlists as $wishlist) {
|
||||
if ($wish->wishlist === intval($wishlist['id'])) {
|
||||
$userIsAuthenticated = true;
|
||||
|
|
Loading…
Reference in a new issue