From 6d389537e3f6ec134e9239067e0d0c5e3b7e6fb4 Mon Sep 17 00:00:00 2001 From: veselcraft Date: Tue, 29 Dec 2020 12:24:17 -0500 Subject: [PATCH] [FIX] Xmas header does not shows up for guests --- Web/Presenters/OpenVKPresenter.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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");