diff --git a/Web/Presenters/GroupPresenter.php b/Web/Presenters/GroupPresenter.php index c239ff22..101e71b3 100644 --- a/Web/Presenters/GroupPresenter.php +++ b/Web/Presenters/GroupPresenter.php @@ -22,15 +22,12 @@ final class GroupPresenter extends OpenVKPresenter if(!$club) { $this->notFound(); } else { - if($club->getShortCode()) - if(parse_url($_SERVER["REQUEST_URI"], PHP_URL_PATH) !== "/" . $club->getShortCode()) - $this->redirect("/" . $club->getShortCode(), static::REDIRECT_TEMPORARY_PRESISTENT); - - $this->template->club = $club; $this->template->albums = (new Albums)->getClubAlbums($club, 1, 3); $this->template->albumsCount = (new Albums)->getClubAlbumsCount($club); $this->template->topics = (new Topics)->getLastTopics($club, 3); $this->template->topicsCount = (new Topics)->getClubTopicsCount($club); + + $this->template->club = $club; } } diff --git a/Web/Presenters/UserPresenter.php b/Web/Presenters/UserPresenter.php index cc39a0b5..48ffc417 100644 --- a/Web/Presenters/UserPresenter.php +++ b/Web/Presenters/UserPresenter.php @@ -33,13 +33,9 @@ final class UserPresenter extends OpenVKPresenter function renderView(int $id): void { $user = $this->users->get($id); - if(!$user || $user->isDeleted()) + if(!$user || $user->isDeleted()) { $this->template->_template = "User/deleted.xml"; - else { - if($user->getShortCode()) - if(parse_url($_SERVER["REQUEST_URI"], PHP_URL_PATH) !== "/" . $user->getShortCode()) - $this->redirect("/" . $user->getShortCode(), static::REDIRECT_TEMPORARY_PRESISTENT); - + } else { $this->template->albums = (new Albums)->getUserAlbums($user); $this->template->albumsCount = (new Albums)->getUserAlbumsCount($user); $this->template->videos = (new Videos)->getByUser($user, 1, 2);