Skip to content

Commit

Permalink
Simplified logic, added explicit exit after header redirect
Browse files Browse the repository at this point in the history
  • Loading branch information
thekabal committed Jun 18, 2020
1 parent d1053a9 commit a10ed6c
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,7 @@

$link = null;

if (!Tki\Db::isActive($pdo_db))
{
// If DB is not active, redirect to create universe to run install
header('Location: create_universe.php');
}
else
if (Tki\Db::isActive($pdo_db))
{
// Database driven language entries
$langvars = Tki\Translate::load(
Expand Down Expand Up @@ -70,3 +65,9 @@
$footer = new Tki\Footer();
$footer->display($pdo_db, $lang, $tkireg, $template);
}
else
{
// If DB is not active, redirect to create universe to run install
header('Location: create_universe.php');
exit;
}

0 comments on commit a10ed6c

Please sign in to comment.