Wall: Now you can go to owner's wall (Fixes #123)

This commit is contained in:
veselcraft 2021-09-17 20:17:45 +03:00
parent 676c51dcda
commit 4b1282c51a
2 changed files with 11 additions and 1 deletions

View file

@ -250,6 +250,8 @@ final class WallPresenter extends OpenVKPresenter
$this->logPostView($post, $wall); $this->logPostView($post, $wall);
$this->template->post = $post; $this->template->post = $post;
if ($post->getTargetWall() > 0) $this->template->wallOwner = (new Users)->get($post->getTargetWall());
else $this->template->wallOwner = (new Clubs)->get($post->getTargetWall());
$this->template->cCount = $post->getCommentsCount(); $this->template->cCount = $post->getCommentsCount();
$this->template->cPage = (int) ($_GET["p"] ?? 1); $this->template->cPage = (int) ($_GET["p"] ?? 1);
$this->template->comments = iterator_to_array($post->getComments($this->template->cPage)); $this->template->comments = iterator_to_array($post->getComments($this->template->cPage));

View file

@ -2,6 +2,14 @@
{block title}{_"post"}{/block} {block title}{_"post"}{/block}
{block header} {block header}
<a href="{$wallOwner->getURL()}">
{$wallOwner->getCanonicalName()}
</a>
»
<a href="/wall{$wallOwner->getId()}">
{_wall}
</a>
»
{_"post"} {_"post"}
{/block} {/block}