From c9ea14362da34d8b6427fdc0aa82c8790f44bd45 Mon Sep 17 00:00:00 2001 From: Olivier PEREZ Date: Sat, 3 Jan 2015 17:29:57 +0100 Subject: [PATCH] Fix promblem with Session loading --- admin/index.php | 1 - app/inc/init.php | 6 +++--- infos_sondage.php | 1 + 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/admin/index.php b/admin/index.php index bb3078b..584aaa7 100644 --- a/admin/index.php +++ b/admin/index.php @@ -17,7 +17,6 @@ * Auteurs de Framadate/OpenSondage : Framasoft (https://github.com/framasoft) */ namespace Framadate; -session_start(); include_once __DIR__ . '/../app/inc/init.php'; include_once __DIR__ . '/../bandeaux.php'; diff --git a/app/inc/init.php b/app/inc/init.php index 741d16f..bab1c1e 100644 --- a/app/inc/init.php +++ b/app/inc/init.php @@ -19,6 +19,9 @@ use Framadate\FramaDB; use Framadate\Utils; +// Autoloading of dependencies with Composer +require_once __DIR__ . '/../../vendor/autoload.php'; + if (session_id() == '') { session_start(); } @@ -28,9 +31,6 @@ if (ini_get('date.timezone') == '') { } include_once __DIR__ . '/constants.php'; - -// Autoloading of dependencies with Composer -require_once __DIR__ . '/../../vendor/autoload.php'; include_once __DIR__ . '/i18n.php'; // Smarty diff --git a/infos_sondage.php b/infos_sondage.php index 6d9d24f..da95104 100644 --- a/infos_sondage.php +++ b/infos_sondage.php @@ -19,6 +19,7 @@ namespace Framadate; include_once __DIR__ . '/app/inc/init.php'; + if (!isset($_SESSION['form'])) { $_SESSION['form'] = new Form(); }