From 8efb1409cf881a1101f80b3fc136b27531f9fa3b Mon Sep 17 00:00:00 2001 From: mrilyew <99399973+mrilyew@users.noreply.github.com> Date: Fri, 13 Dec 2024 17:43:40 +0300 Subject: [PATCH] ad ability to blacklist when you ar blacklisted --- Web/Presenters/UserPresenter.php | 11 ++++++----- Web/Presenters/templates/User/blacklisted.xml | 2 ++ 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/Web/Presenters/UserPresenter.php b/Web/Presenters/UserPresenter.php index 42fc8c47..21f837b6 100644 --- a/Web/Presenters/UserPresenter.php +++ b/Web/Presenters/UserPresenter.php @@ -34,15 +34,16 @@ final class UserPresenter extends OpenVKPresenter if(!is_null($user) && $user->isDeactivated()) { $this->template->_template = "User/deactivated.xml"; + $this->template->user = $user; + } else if($this->user->identity->isBlacklistedBy($user)) { + $this->template->_template = "User/blacklisted.xml"; + + $this->template->blacklist_status = $user->isBlacklistedBy($this->user->identity); + $this->template->ignore_status = $user->isIgnoredBy($this->user->identity); $this->template->user = $user; } else if($user->isBlacklistedBy($this->user->identity)) { $this->template->_template = "User/blacklisted_pov.xml"; - $this->template->ignore_status = $user->isIgnoredBy($this->user->identity); - $this->template->user = $user; - } else if($this->user->identity->isBlacklistedBy($user)) { - $this->template->_template = "User/blacklisted.xml"; - $this->template->ignore_status = $user->isIgnoredBy($this->user->identity); $this->template->user = $user; } else if(!is_null($user) && !$user->canBeViewedBy($this->user->identity)) { diff --git a/Web/Presenters/templates/User/blacklisted.xml b/Web/Presenters/templates/User/blacklisted.xml index bb00bcbb..e062b6f3 100644 --- a/Web/Presenters/templates/User/blacklisted.xml +++ b/Web/Presenters/templates/User/blacklisted.xml @@ -18,6 +18,8 @@