diff --git a/__cms__/code/modules/admin/connexion.php b/__cms__/code/modules/admin/connexion.php index d2085b2..5c6a452 100644 --- a/__cms__/code/modules/admin/connexion.php +++ b/__cms__/code/modules/admin/connexion.php @@ -8,7 +8,7 @@ class AdminConnexion { } else { return self::vue($chemin, "connexion échouée"); } - } else if ($action == "déconnexion") { + } else if ($action == "deconnexion") { Authentification::déconnexion(); return self::vue($chemin, "déconnexion"); } else { diff --git a/__cms__/code/modules/modules.php b/__cms__/code/modules/modules.php index eb5d13b..2e63a92 100644 --- a/__cms__/code/modules/modules.php +++ b/__cms__/code/modules/modules.php @@ -10,12 +10,12 @@ class Modules { "post" => qw($post), "file" => qw($file) ); - self::$liste_modules[$type]["get_post"][] = "action"; // Toujours présent. + self::$liste_modules[$type]["get_post"][] = "action"; // Toujours présent. } public static function get_module($chemin) { $type = Stockage::get_prop($chemin, "type"); - if ($type === false || !isset(self::$liste_modules[$type])) { + if (Erreur::is_erreur($type) || !isset(self::$liste_modules[$type])) { Erreur::fatale("Type inconnu (" . var_export($type, true) . ") pour la page " . $chemin->get() . "."); // return false; } diff --git a/__cms__/code/securite/authentification.php b/__cms__/code/securite/authentification.php index 5f5f3dd..924a581 100644 --- a/__cms__/code/securite/authentification.php +++ b/__cms__/code/securite/authentification.php @@ -20,7 +20,7 @@ class Authentification { } public static function est_connecté() { - return get_utilisateur() == "Anonyme"; + return self::get_utilisateur() != "Anonyme"; } public static function déconnexion() { diff --git a/__cms__/code/securite/erreur.php b/__cms__/code/securite/erreur.php index aa88833..a5f0644 100644 --- a/__cms__/code/securite/erreur.php +++ b/__cms__/code/securite/erreur.php @@ -28,7 +28,7 @@ class Erreur { } public static function lecture($message) { - $t = new self("lecture", $message); + return new self("lecture", $message); } public function __construct($type, $message, $string = "[debug:erreur]") { diff --git a/__cms__/code/site/squelette.php b/__cms__/code/site/squelette.php index ee73c54..de10d4b 100644 --- a/__cms__/code/site/squelette.php +++ b/__cms__/code/site/squelette.php @@ -12,29 +12,36 @@ class Squelette { // TODO : chemin css relatif. $racine = new Chemin('/'); $chemin_css = $racine->get_url('?vue=css'); - return -' - -
-