Browse Source

hopefully fixed the render issue with not being logged in

master
Cerys 4 weeks ago
parent
commit
02438a064e
  1. 5
      App/Wrappers/SessionWrapper.php
  2. 5
      Pages/tune/uuid.php

5
App/Wrappers/SessionWrapper.php

@ -12,6 +12,11 @@ class SessionWrapper
{ {
session_start(); session_start();
} }
if(!isset($_SESSION[SessionElement::IS_LOGGED_IN->value]))
{
self::Set(SessionElement::IS_LOGGED_IN, false);
}
} }
public static function Get(SessionElement $target): mixed public static function Get(SessionElement $target): mixed

5
Pages/tune/uuid.php

@ -74,7 +74,9 @@ for ($i = 0; $i < count($dances); $i++)
JSON_THROW_ON_ERROR JSON_THROW_ON_ERROR
); );
$myVote = 0;
if(SessionWrapper::Get(SessionElement::IS_LOGGED_IN))
{
$myVote = $db->RunSelect( $myVote = $db->RunSelect(
queryBuilder: SQLQueryBuilderWrapper::SELECT( queryBuilder: SQLQueryBuilderWrapper::SELECT(
table: 'TuneRatings', table: 'TuneRatings',
@ -93,6 +95,7 @@ else
{ {
$myVote = $myVote[0]['Rating']; $myVote = $myVote[0]['Rating'];
} }
}
TwigWrapper::RenderTwig( TwigWrapper::RenderTwig(

Loading…
Cancel
Save