mirror of
https://github.com/openvk/openvk
synced 2024-12-23 09:01:15 +03:00
Wall: Hotfix when group's wall link was without minus in url
This commit is contained in:
parent
4b1282c51a
commit
9578759f17
2 changed files with 9 additions and 3 deletions
|
@ -250,8 +250,14 @@ 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());
|
if ($post->getTargetWall() > 0)
|
||||||
else $this->template->wallOwner = (new Clubs)->get($post->getTargetWall());
|
{
|
||||||
|
$this->template->wallOwner = (new Users)->get($post->getTargetWall());
|
||||||
|
$this->template->isWallOfGroup = false;
|
||||||
|
} else {
|
||||||
|
$this->template->wallOwner = (new Clubs)->get(abs($post->getTargetWall()));
|
||||||
|
$this->template->isWallOfGroup = true;
|
||||||
|
}
|
||||||
$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));
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
{$wallOwner->getCanonicalName()}
|
{$wallOwner->getCanonicalName()}
|
||||||
</a>
|
</a>
|
||||||
»
|
»
|
||||||
<a href="/wall{$wallOwner->getId()}">
|
<a href="/wall{$wallOwner->getId() * ($isWallOfGroup ? -1 : 1)}">
|
||||||
{_wall}
|
{_wall}
|
||||||
</a>
|
</a>
|
||||||
»
|
»
|
||||||
|
|
Loading…
Reference in a new issue