mirror of
https://github.com/openvk/openvk
synced 2024-11-11 01:19:53 +03:00
Fix theme inclusion regression for themes that do not override templates
This commit is contained in:
parent
7bb0535e87
commit
d8b37366cb
1 changed files with 7 additions and 3 deletions
|
@ -221,13 +221,17 @@ abstract class OpenVKPresenter extends SimplePresenter
|
||||||
{
|
{
|
||||||
parent::onBeforeRender();
|
parent::onBeforeRender();
|
||||||
|
|
||||||
if(Session::i()->get("_tempTheme"))
|
$theme = NULL;
|
||||||
|
if(Session::i()->get("_tempTheme")) {
|
||||||
$theme = Themepacks::i()[Session::i()->get("_tempTheme", "ovk")];
|
$theme = Themepacks::i()[Session::i()->get("_tempTheme", "ovk")];
|
||||||
else if($this->requestParam("themePreview"))
|
Session::i()->set("_tempTheme", NULL);
|
||||||
|
} else if($this->requestParam("themePreview")) {
|
||||||
$theme = Themepacks::i()[$this->requestParam("themePreview")];
|
$theme = Themepacks::i()[$this->requestParam("themePreview")];
|
||||||
else if($this->user->identity !== null && $this->user->identity->getTheme())
|
} else if($this->user->identity !== null && $this->user->identity->getTheme()) {
|
||||||
$theme = $this->user->identity->getTheme();
|
$theme = $this->user->identity->getTheme();
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->template->theme = $theme;
|
||||||
if(!is_null($theme) && $theme->overridesTemplates())
|
if(!is_null($theme) && $theme->overridesTemplates())
|
||||||
$this->template->_templatePath = $theme->getBaseDir() . "/tpl";
|
$this->template->_templatePath = $theme->getBaseDir() . "/tpl";
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue