Hotfix: notice in router

This commit is contained in:
Némunaire 2013-10-22 08:19:51 +02:00
parent bed471d75a
commit 39d5e64ee2

View File

@ -10,13 +10,13 @@ if ($_SERVER["SERVER_NAME"] == "localhost" || $_SERVER["SERVER_NAME"] == "fic" |
define("DEBUG", true);
//Chargement de tout le nécessaire pour le site
//require_once("common.php");
require_once("common.php");
$n = preg_match_all("#[^/]+#", strtolower(gpc("p")), $out);
$p = $out[0];
// Admin part
if ($p[0] == SALT_ADMIN)
if ($n && $p[0] == SALT_ADMIN)
{
if ($n <= 1)
$page = require("admin/home.php");
@ -43,7 +43,7 @@ if ($p[0] == SALT_ADMIN)
}
// Known users
else if ($p[0] == SALT_USER)
else if ($n && $p[0] == SALT_USER)
{
$connected = true;