diff --git a/library/Icinga/Application/Web.php b/library/Icinga/Application/Web.php index 2b45ad683..ecf863e9e 100644 --- a/library/Icinga/Application/Web.php +++ b/library/Icinga/Application/Web.php @@ -13,8 +13,6 @@ use Icinga\Logger\Logger; use Icinga\Web\Request; use Icinga\Web\Response; use Icinga\Web\View; -use Icinga\Web\Session\Session as BaseSession; -use Icinga\Web\Session; use Icinga\User; use Icinga\Util\Translator; use Icinga\Util\DateTimeFactory; @@ -59,13 +57,6 @@ class Web extends ApplicationBootstrap */ private $request; - /** - * Session object - * - * @var BaseSession - */ - private $session; - /** * User object * @@ -92,7 +83,6 @@ class Web extends ApplicationBootstrap ->setupErrorHandling() ->loadConfig() ->setupResourceFactory() - ->setupSession() ->setupUser() ->setupTimezone() ->setupLogger() @@ -172,7 +162,6 @@ class Web extends ApplicationBootstrap $this->setupFrontController(); $this->setupViewRenderer(); - return $this; } @@ -192,17 +181,6 @@ class Web extends ApplicationBootstrap return $this; } - /** - * Initialize a session provider - * - * @return self - */ - private function setupSession() - { - $this->session = Session::create(); - return $this; - } - /** * Inject dependencies into request * diff --git a/library/Icinga/Web/Session.php b/library/Icinga/Web/Session.php index 58bfc70bd..4723903e9 100644 --- a/library/Icinga/Web/Session.php +++ b/library/Icinga/Web/Session.php @@ -47,7 +47,7 @@ class Session public static function getSession() { if (self::$session === null) { - throw new ProgrammingError('No session created yet'); + self::create(); } return self::$session;