diff --git a/Web/Presenters/OpenVKPresenter.php b/Web/Presenters/OpenVKPresenter.php index c706b825..af16930d 100644 --- a/Web/Presenters/OpenVKPresenter.php +++ b/Web/Presenters/OpenVKPresenter.php @@ -140,6 +140,8 @@ abstract class OpenVKPresenter extends SimplePresenter { $user = Authenticator::i()->getUser(); + $this->template->isXmas = intval(date('d')) >= 15 && date('m') == 12 || intval(date('d')) <= 15 && date('m') == 1 ? true : false; + if(!is_null($user)) { $this->user = (object) []; $this->user->raw = $user; @@ -147,7 +149,6 @@ abstract class OpenVKPresenter extends SimplePresenter $this->user->id = $this->user->identity->getId(); $this->template->thisUser = $this->user->identity; $this->template->userTainted = $user->isTainted(); - $this->template->isXmas = intval(date('d')) >= 15 && date('m') == 12 || intval(date('d')) <= 15 && date('m') == 1 ? true : false; if($this->user->identity->isBanned() && !$this->banTolerant) { header("HTTP/1.1 403 Forbidden");