diff --git a/Web/Models/Entities/Photo.php b/Web/Models/Entities/Photo.php
index 4fd49c57..3c4db886 100644
--- a/Web/Models/Entities/Photo.php
+++ b/Web/Models/Entities/Photo.php
@@ -283,6 +283,14 @@ class Photo extends Media
return [$x, $y];
}
+ function getPageURL(): string
+ {
+ if($this->isAnonymous())
+ return "/photos/" . base_convert((string) $this->getId(), 10, 32);
+
+ return "/photo" . $this->getPrettyId();
+ }
+
function getAlbum(): ?Album
{
return (new Albums)->getAlbumByPhotoId($this);
diff --git a/Web/Presenters/templates/components/attachment.xml b/Web/Presenters/templates/components/attachment.xml
index 3f3161f3..3b5f9915 100644
--- a/Web/Presenters/templates/components/attachment.xml
+++ b/Web/Presenters/templates/components/attachment.xml
@@ -1,7 +1,6 @@
{if $attachment instanceof \openvk\Web\Models\Entities\Photo}
{if !$attachment->isDeleted()}
- {var $link = "/photo" . ($attachment->isAnonymous() ? ("s/" . base_convert((string) $attachment->getId(), 10, 32)) : $attachment->getPrettyId())}
-
+
{else}
diff --git a/Web/Presenters/templates/components/notifications/4/_18_13_.xml b/Web/Presenters/templates/components/notifications/4/_18_13_.xml
index 69c2c422..0ae73bde 100644
--- a/Web/Presenters/templates/components/notifications/4/_18_13_.xml
+++ b/Web/Presenters/templates/components/notifications/4/_18_13_.xml
@@ -1,4 +1,4 @@
{var $user = $notification->getModel(0)}
{var $post = $notification->getModel(1)}
-{_nt_you_were_mentioned_u} {$user->getCanonicalName()} {$notification->getDateTime()} {_nt_mention_in_photo}: "{$notification->getData()}"
+{_nt_you_were_mentioned_u} {$user->getCanonicalName()} {$notification->getDateTime()} {_nt_mention_in_photo}: "{$notification->getData()}"