diff --git a/libraries/cms/module/helper.php b/libraries/cms/module/helper.php index cf53a25c8c4fb..16c977aaa02f8 100644 --- a/libraries/cms/module/helper.php +++ b/libraries/cms/module/helper.php @@ -169,9 +169,6 @@ public static function renderModule($module, $attribs = array()) $params = new JRegistry; $params->loadString($module->params); - // Get the template - $template = $app->getTemplate(); - // Get module path $module->module = preg_replace('/[^A-Z0-9_\.-]/i', '', $module->module); $path = JPATH_BASE . '/modules/' . $module->module . '/' . $module->module . '.php'; @@ -199,7 +196,7 @@ public static function renderModule($module, $attribs = array()) } include_once JPATH_THEMES . '/system/html/modules.php'; - $chromePath = JPATH_THEMES . '/' . $template . '/html/modules.php'; + $chromePath = JPATH_THEMES . '/' . $app->getTemplate() . '/html/modules.php'; if (!isset($chrome[$chromePath])) { @@ -216,7 +213,7 @@ public static function renderModule($module, $attribs = array()) if ($paramsChromeStyle) { - $attribs['style'] = preg_replace('/^(system|' . $template . ')\-/i', '', $paramsChromeStyle); + $attribs['style'] = preg_replace('/^(system|' . $app->getTemplate() . ')\-/i', '', $paramsChromeStyle); } // Make sure a style is set