Skip to content
Snippets Groups Projects
Commit 6540bec4 authored by Ere Maijala's avatar Ere Maijala Committed by Demian Katz
Browse files

Make sure to init theme just once. (#1202)

parent 6f3e7624
No related merge requests found
......@@ -86,6 +86,13 @@ class Initializer
*/
protected $cookieManager;
/**
* A static flag used to determine if the theme has been initialized
*
* @var bool
*/
protected static $themeInitialized = false;
/**
* Constructor
*
......@@ -180,6 +187,12 @@ class Initializer
*/
public function init()
{
// Make sure to initialize the theme just once
if (self::$themeInitialized) {
return;
}
self::$themeInitialized = true;
// Determine the current theme:
$currentTheme = $this->pickTheme($this->event->getRequest());
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment