diff --git a/Web/Presenters/WallPresenter.php b/Web/Presenters/WallPresenter.php index 19a64edd..07258877 100644 --- a/Web/Presenters/WallPresenter.php +++ b/Web/Presenters/WallPresenter.php @@ -39,7 +39,7 @@ final class WallPresenter extends OpenVKPresenter $this->logPostView($post, $wall); } - function renderWall(int $user): void + function renderWall(int $user, bool $embedded = false): void { if(false) exit("Ошибка доступа: " . (string) random_int(0, 255)); @@ -57,6 +57,7 @@ final class WallPresenter extends OpenVKPresenter else $canPost = false; + if ($embedded == true) $this->template->_template = "components/wall.xml"; $this->template->oObj = $owner; $this->template->owner = $user; $this->template->canPost = $canPost; @@ -68,9 +69,15 @@ final class WallPresenter extends OpenVKPresenter "amount" => sizeof($this->template->posts), "perPage" => OPENVK_DEFAULT_PER_PAGE, ]; + $this->logPostsViewed($this->template->posts, $user); } + + function renderWallEmbedded(int $user): void + { + $this->renderWall($user, true); + } function renderFeed(): void { diff --git a/Web/Presenters/templates/User/View.xml b/Web/Presenters/templates/User/View.xml index 83fc8b46..4df13723 100644 --- a/Web/Presenters/templates/User/View.xml +++ b/Web/Presenters/templates/User/View.xml @@ -462,7 +462,7 @@
- {presenter "openvk!Wall->wall", $user->getId()} + {presenter "openvk!Wall->wallEmbedded", $user->getId()} + + + + {/if} + + + + + + +