summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
Diffstat (limited to 'includes')
-rw-r--r--includes/engelsystem.php34
1 files changed, 9 insertions, 25 deletions
diff --git a/includes/engelsystem.php b/includes/engelsystem.php
index f9535847..97076895 100644
--- a/includes/engelsystem.php
+++ b/includes/engelsystem.php
@@ -3,10 +3,6 @@
use Engelsystem\Application;
use Engelsystem\Config\Config;
use Engelsystem\Exceptions\Handler as ExceptionHandler;
-use Engelsystem\Http\Request;
-use Symfony\Component\HttpFoundation\Session\Session;
-use Symfony\Component\HttpFoundation\Session\Storage\MockArraySessionStorage;
-use Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorage;
/**
* This file includes all needed functions, connects to the db etc.
@@ -15,6 +11,12 @@ require_once __DIR__ . '/autoload.php';
/**
+ * Include legacy code
+ */
+require __DIR__ . '/includes.php';
+
+
+/**
* Initialize and bootstrap the application
*/
$app = new Application(realpath(__DIR__ . DIRECTORY_SEPARATOR . '..'));
@@ -48,30 +50,12 @@ if ($app->get('config')->get('maintenance')) {
/**
- * Initialize Request
- *
- * @var Request $request
+ * Init translations
*/
-$request = Request::createFromGlobals();
-$app->instance('request', $request);
-
-
-/**
- * Include legacy code
- */
-require __DIR__ . '/includes.php';
+gettext_init();
/**
- * Init application
+ * Init authorization
*/
-$sessionStorage = (PHP_SAPI != 'cli' ? new NativeSessionStorage(['cookie_httponly' => true]) : new MockArraySessionStorage());
-$session = new Session($sessionStorage);
-$app->instance('session', $session);
-$session->start();
-$request->setSession($session);
-
-
-gettext_init();
-
load_auth();