diff --git a/.idea/.gitignore b/.idea/.gitignore index 13566b81..ecca0076 100644 --- a/.idea/.gitignore +++ b/.idea/.gitignore @@ -5,4 +5,4 @@ /httpRequests/ # Datasource local storage ignored files /dataSources/ -/dataSources.local.xml +/dataSources.local.xml \ No newline at end of file diff --git a/.idea/intellij-latte/xmlSources/Latte.dtd b/.idea/intellij-latte/xmlSources/Latte.dtd index 0cf3a95a..9b8273f5 100644 --- a/.idea/intellij-latte/xmlSources/Latte.dtd +++ b/.idea/intellij-latte/xmlSources/Latte.dtd @@ -1,11 +1,8 @@ - - - @@ -13,34 +10,26 @@ - - - - + - - - + - - - - + - - + + \ No newline at end of file diff --git a/.idea/intellij-latte/xmlSources/Latte.xml b/.idea/intellij-latte/xmlSources/Latte.xml index 0bfceaf8..e7bb3f7a 100644 --- a/.idea/intellij-latte/xmlSources/Latte.xml +++ b/.idea/intellij-latte/xmlSources/Latte.xml @@ -1,290 +1,290 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - - - + + + + - - - - + + + + - - + + - - + + - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml index 639900d1..f4364fd5 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -1,6 +1,6 @@ - - - + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml index de1f1bbf..af99c76e 100644 --- a/.idea/modules.xml +++ b/.idea/modules.xml @@ -1,8 +1,8 @@ - - - - - + + + + + \ No newline at end of file diff --git a/.idea/openvk.iml b/.idea/openvk.iml index fe58bea6..16097db5 100644 --- a/.idea/openvk.iml +++ b/.idea/openvk.iml @@ -1,46 +1,46 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/php.xml b/.idea/php.xml index 7b4f97fd..28cf2b65 100644 --- a/.idea/php.xml +++ b/.idea/php.xml @@ -1,48 +1,48 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/runConfigurations.xml b/.idea/runConfigurations.xml index 797acea5..7b45e612 100644 --- a/.idea/runConfigurations.xml +++ b/.idea/runConfigurations.xml @@ -1,10 +1,10 @@ - - - + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml index 35eb1ddf..9db25eef 100644 --- a/.idea/vcs.xml +++ b/.idea/vcs.xml @@ -1,6 +1,6 @@ - - - + + + \ No newline at end of file diff --git a/VKAPI/Handlers/Friends.php b/VKAPI/Handlers/Friends.php index ca9b7573..20c537a5 100644 --- a/VKAPI/Handlers/Friends.php +++ b/VKAPI/Handlers/Friends.php @@ -133,15 +133,18 @@ final class Friends extends VKAPIRequestHandler return $response; } - function getRequests(string $fields = "", int $offset = 0, int $count = 100): object + function getRequests(string $fields = "", int $offset = 0, int $count = 100, int $extended = 0): object { + if ($count >= 1000) + $this->fail(100, "One of the required parameters was not passed or is invalid."); + $this->requireUser(); $i = 0; $offset++; $followers = []; - foreach($this->getUser()->getFollowers() as $follower) { + foreach($this->getUser()->getFollowers($offset, $count) as $follower) { $followers[$i] = $follower->getId(); $i++; } @@ -149,8 +152,10 @@ final class Friends extends VKAPIRequestHandler $response = $followers; $usersApi = new Users($this->getUser()); - if(!is_null($fields)) - $response = $usersApi->get(implode(',', $followers), $fields, 0, $count); # FIXME + if($extended == 1) + $response = $usersApi->get(implode(',', $followers), $fields, 0, $count); + else + $response = $usersApi->get(implode(',', $followers), "", 0, $count); foreach($response as $user) $user->user_id = $user->id; diff --git a/Web/Events/NewMessageEvent.php b/Web/Events/NewMessageEvent.php index 49d102b3..3b828e90 100644 --- a/Web/Events/NewMessageEvent.php +++ b/Web/Events/NewMessageEvent.php @@ -27,14 +27,23 @@ class NewMessageEvent implements ILPEmitable if($peer === $userId) $peer = $msg->getRecipient()->getId(); + /* + * Source: + * https://github.com/danyadev/longpoll-doc + */ + return [ 4, # event type + $msg->getId(), # messageId 256, # checked for spam flag $peer, # TODO calculate peer correctly $msg->getSendTime()->timestamp(), # creation time in unix $msg->getText(), # text (formatted) + [], # empty additional info [], # empty attachments $msg->getId() << 2, # id as random_id + $peer, # conversation id + 0 # not edited yet ]; } } diff --git a/Web/Models/Entities/Alias.php b/Web/Models/Entities/Alias.php new file mode 100644 index 00000000..99f7baae --- /dev/null +++ b/Web/Models/Entities/Alias.php @@ -0,0 +1,34 @@ +getRecord()->owner_id; + } + + function getType(): string + { + if ($this->getOwnerId() < 0) + return "club"; + + return "user"; + } + + function getUser(): ?User + { + return (new Users)->get($this->getOwnerId()); + } + + function getClub(): ?Club + { + return (new Clubs)->get($this->getOwnerId() * -1); + } +} diff --git a/Web/Models/Entities/User.php b/Web/Models/Entities/User.php index 7103a6cb..e33a7b5e 100644 --- a/Web/Models/Entities/User.php +++ b/Web/Models/Entities/User.php @@ -911,6 +911,10 @@ class User extends RowModel $pClub = DatabaseConnection::i()->getContext()->table("groups")->where("shortcode", $code)->fetch(); if(!is_null($pClub)) return false; + + $pAlias = DatabaseConnection::i()->getContext()->table("aliases")->where("shortcode", $code)->fetch(); + if(!is_null($pAlias)) + return false; } $this->stateChanges("shortcode", $code); diff --git a/Web/Models/Repositories/Aliases.php b/Web/Models/Repositories/Aliases.php new file mode 100644 index 00000000..e74532a1 --- /dev/null +++ b/Web/Models/Repositories/Aliases.php @@ -0,0 +1,35 @@ +context = DB::i()->getContext(); + $this->aliases = $this->context->table("aliases"); + } + + private function toAlias(?ActiveRow $ar): ?Alias + { + return is_null($ar) ? NULL : new Alias($ar); + } + + function get(int $id): ?Alias + { + return $this->toAlias($this->aliases->get($id)); + } + + function getByShortcode(string $shortcode): ?Alias + { + return $this->toAlias($this->aliases->where("shortcode", $shortcode)->fetch()); + } +} diff --git a/Web/Models/Repositories/Clubs.php b/Web/Models/Repositories/Clubs.php index b7b59251..edbe75c6 100644 --- a/Web/Models/Repositories/Clubs.php +++ b/Web/Models/Repositories/Clubs.php @@ -1,6 +1,7 @@ toClub($this->clubs->where("shortcode", $url)->fetch()); + $shortcode = $this->toClub($this->clubs->where("shortcode", $url)->fetch()); + + if ($shortcode) + return $shortcode; + + $alias = (new Aliases)->getByShortcode($url); + + if (!$alias) return NULL; + if ($alias->getType() !== "club") return NULL; + + return $alias->getClub(); } function get(int $id): ?Club @@ -45,6 +56,9 @@ class Clubs function getPopularClubs(): \Traversable { + // TODO rewrite + + /* $query = "SELECT ROW_NUMBER() OVER (ORDER BY `subscriptions` DESC) as `place`, `target` as `id`, COUNT(`follower`) as `subscriptions` FROM `subscriptions` WHERE `model` = \"openvk\\\Web\\\Models\\\Entities\\\Club\" GROUP BY `target` ORDER BY `subscriptions` DESC, `id` LIMIT 30;"; $entries = DatabaseConnection::i()->getConnection()->query($query); @@ -54,6 +68,7 @@ class Clubs "club" => $this->get($entry["id"]), "subscriptions" => $entry["subscriptions"], ]; + */ } use \Nette\SmartObject; diff --git a/Web/Models/Repositories/Users.php b/Web/Models/Repositories/Users.php index 9cd7d001..63e77df0 100644 --- a/Web/Models/Repositories/Users.php +++ b/Web/Models/Repositories/Users.php @@ -1,6 +1,7 @@ context = DatabaseConnection::i()->getContext(); $this->users = $this->context->table("profiles"); + $this->aliases = $this->context->table("aliases"); } private function toUser(?ActiveRow $ar): ?User @@ -28,7 +31,17 @@ class Users function getByShortURL(string $url): ?User { - return $this->toUser($this->users->where("shortcode", $url)->fetch()); + $shortcode = $this->toUser($this->users->where("shortcode", $url)->fetch()); + + if ($shortcode) + return $shortcode; + + $alias = (new Aliases)->getByShortcode($url); + + if (!$alias) return NULL; + if ($alias->getType() !== "user") return NULL; + + return $alias->getUser(); } function getByChandlerUser(ChandlerUser $user): ?User diff --git a/Web/Presenters/AboutPresenter.php b/Web/Presenters/AboutPresenter.php index 6a281d07..dd503aff 100644 --- a/Web/Presenters/AboutPresenter.php +++ b/Web/Presenters/AboutPresenter.php @@ -64,7 +64,7 @@ final class AboutPresenter extends OpenVKPresenter $this->template->usersStats = (new Users)->getStatistics(); $this->template->clubsCount = (new Clubs)->getCount(); $this->template->postsCount = (new Posts)->getCount(); - $this->template->popularClubs = iterator_to_array((new Clubs)->getPopularClubs()); + $this->template->popularClubs = []; $this->template->admins = iterator_to_array((new Users)->getInstanceAdmins()); } diff --git a/Web/Presenters/AppsPresenter.php b/Web/Presenters/AppsPresenter.php index 02fb8922..8dcfb8a4 100644 --- a/Web/Presenters/AppsPresenter.php +++ b/Web/Presenters/AppsPresenter.php @@ -6,7 +6,7 @@ use openvk\Web\Models\Repositories\Applications; final class AppsPresenter extends OpenVKPresenter { private $apps; - + protected $presenterName = "apps"; function __construct(Applications $apps) { $this->apps = $apps; diff --git a/Web/Presenters/AuthPresenter.php b/Web/Presenters/AuthPresenter.php index f934f7fe..bb9d7272 100644 --- a/Web/Presenters/AuthPresenter.php +++ b/Web/Presenters/AuthPresenter.php @@ -84,6 +84,9 @@ final class AuthPresenter extends OpenVKPresenter if (strtotime($this->postParam("birthday")) > time()) $this->flashFail("err", tr("invalid_birth_date"), tr("invalid_birth_date_comment")); + if (!$this->postParam("confirmation")) + $this->flashFail("err", tr("error"), tr("checkbox_in_registration_unchecked")); + try { $user = new User; $user->setFirst_Name($this->postParam("first_name")); diff --git a/Web/Presenters/CommentPresenter.php b/Web/Presenters/CommentPresenter.php index cbdac84e..0429b32e 100644 --- a/Web/Presenters/CommentPresenter.php +++ b/Web/Presenters/CommentPresenter.php @@ -6,6 +6,7 @@ use openvk\Web\Models\Repositories\{Comments, Clubs}; final class CommentPresenter extends OpenVKPresenter { + protected $presenterName = "comment"; private $models = [ "posts" => "openvk\\Web\\Models\\Repositories\\Posts", "photos" => "openvk\\Web\\Models\\Repositories\\Photos", diff --git a/Web/Presenters/GiftsPresenter.php b/Web/Presenters/GiftsPresenter.php index b99e5ba9..8f59bdcb 100644 --- a/Web/Presenters/GiftsPresenter.php +++ b/Web/Presenters/GiftsPresenter.php @@ -7,6 +7,7 @@ final class GiftsPresenter extends OpenVKPresenter { private $gifts; private $users; + protected $presenterName = "gifts"; function __construct(Gifts $gifts, Users $users) { diff --git a/Web/Presenters/GroupPresenter.php b/Web/Presenters/GroupPresenter.php index a83386db..00d74c2e 100644 --- a/Web/Presenters/GroupPresenter.php +++ b/Web/Presenters/GroupPresenter.php @@ -8,7 +8,8 @@ use Chandler\Security\Authenticator; final class GroupPresenter extends OpenVKPresenter { private $clubs; - + protected $presenterName = "group"; + function __construct(Clubs $clubs) { $this->clubs = $clubs; diff --git a/Web/Presenters/MaintenancePresenter.php b/Web/Presenters/MaintenancePresenter.php new file mode 100644 index 00000000..d4a5a6ef --- /dev/null +++ b/Web/Presenters/MaintenancePresenter.php @@ -0,0 +1,35 @@ +flashFail("err", tr("error"), tr("forbidden")); + + $this->template->name = [ + "photos" => tr("my_photos"), + "videos" => tr("my_videos"), + "messenger" => tr("my_messages"), + "user" => tr("users"), + "group" => tr("my_groups"), + "comment" => tr("comments"), + "gifts" => tr("gifts"), + "apps" => tr("apps"), + "notes" => tr("my_notes"), + "notification" => tr("my_feedback"), + "support" => tr("menu_support"), + "topics" => tr("topics") + ][$name] ?? $name; + } + + function renderAll(): void + { + + } +} diff --git a/Web/Presenters/MessengerPresenter.php b/Web/Presenters/MessengerPresenter.php index cea440ba..46094c43 100644 --- a/Web/Presenters/MessengerPresenter.php +++ b/Web/Presenters/MessengerPresenter.php @@ -9,11 +9,13 @@ final class MessengerPresenter extends OpenVKPresenter { private $messages; private $signaler; - + protected $presenterName = "messenger"; + function __construct(Messages $messages) { $this->messages = $messages; $this->signaler = SignalManager::i(); + parent::__construct(); } @@ -30,7 +32,7 @@ final class MessengerPresenter extends OpenVKPresenter function renderIndex(): void { $this->assertUserLoggedIn(); - + if(isset($_GET["sel"])) $this->pass("openvk!Messenger->app", $_GET["sel"]); @@ -93,6 +95,13 @@ final class MessengerPresenter extends OpenVKPresenter } $legacy = $this->queryParam("version") < 3; + + $time = intval($this->queryParam("wait")); + + if($time > 60) + $time = 60; + elseif($time == 0) + $time = 25; // default $this->signaler->listen(function($event, $eId) use ($id) { exit(json_encode([ @@ -101,7 +110,7 @@ final class MessengerPresenter extends OpenVKPresenter $event->getVKAPISummary($id), ], ])); - }, $id); + }, $id, $time); } function renderApiGetMessages(int $sel, int $lastMsg): void diff --git a/Web/Presenters/NotesPresenter.php b/Web/Presenters/NotesPresenter.php index 363d814c..50437ad7 100644 --- a/Web/Presenters/NotesPresenter.php +++ b/Web/Presenters/NotesPresenter.php @@ -6,7 +6,8 @@ use openvk\Web\Models\Entities\Note; final class NotesPresenter extends OpenVKPresenter { private $notes; - + protected $presenterName = "notes"; + function __construct(Notes $notes) { $this->notes = $notes; diff --git a/Web/Presenters/NotificationPresenter.php b/Web/Presenters/NotificationPresenter.php index d12f27f0..3bd7a321 100644 --- a/Web/Presenters/NotificationPresenter.php +++ b/Web/Presenters/NotificationPresenter.php @@ -3,6 +3,8 @@ namespace openvk\Web\Presenters; final class NotificationPresenter extends OpenVKPresenter { + protected $presenterName = "notification"; + function renderFeed(): void { $this->assertUserLoggedIn(); diff --git a/Web/Presenters/OpenVKPresenter.php b/Web/Presenters/OpenVKPresenter.php index 2a19fa03..5b7908a8 100755 --- a/Web/Presenters/OpenVKPresenter.php +++ b/Web/Presenters/OpenVKPresenter.php @@ -17,7 +17,8 @@ abstract class OpenVKPresenter extends SimplePresenter protected $deactivationTolerant = false; protected $errorTemplate = "@error"; protected $user = NULL; - + protected $presenterName; + private function calculateQueryString(array $data): string { $rawUrl = "tcp+stratum://fakeurl.net$_SERVER[REQUEST_URI]"; #HTTP_HOST can be tainted @@ -196,12 +197,13 @@ abstract class OpenVKPresenter extends SimplePresenter function onStartup(): void { $user = Authenticator::i()->getUser(); - + $this->template->isXmas = intval(date('d')) >= 1 && date('m') == 12 || intval(date('d')) <= 15 && date('m') == 1 ? true : false; $this->template->isTimezoned = Session::i()->get("_timezoneOffset"); - + $userValidated = 0; $cacheTime = OPENVK_ROOT_CONF["openvk"]["preferences"]["nginxCacheTime"] ?? 0; + if(!is_null($user)) { $this->user = (object) []; $this->user->raw = $user; @@ -226,7 +228,7 @@ abstract class OpenVKPresenter extends SimplePresenter } exit; } - + if($this->user->identity->isBanned() && !$this->banTolerant) { header("HTTP/1.1 403 Forbidden"); $this->getTemplatingEngine()->render(__DIR__ . "/templates/@banned.xml", [ @@ -247,23 +249,33 @@ abstract class OpenVKPresenter extends SimplePresenter ]); exit; } - + $userValidated = 1; $cacheTime = 0; # Force no cache if($this->user->identity->onlineStatus() == 0 && !($this->user->identity->isDeleted() || $this->user->identity->isBanned())) { $this->user->identity->setOnline(time()); $this->user->identity->save(); } - + $this->template->ticketAnsweredCount = (new Tickets)->getTicketsCountByUserId($this->user->id, 1); if($user->can("write")->model("openvk\Web\Models\Entities\TicketReply")->whichBelongsTo(0)) $this->template->helpdeskTicketNotAnsweredCount = (new Tickets)->getTicketCount(0); } - + header("X-OpenVK-User-Validated: $userValidated"); header("X-Accel-Expires: $cacheTime"); setlocale(LC_TIME, ...(explode(";", tr("__locale")))); - + + if (!OPENVK_ROOT_CONF["openvk"]["preferences"]["maintenanceMode"]["all"]) { + if (OPENVK_ROOT_CONF["openvk"]["preferences"]["maintenanceMode"][$this->presenterName]) { + $this->pass("openvk!Maintenance->section", $this->presenterName); + } + } else { + if ($this->presenterName != "maintenance") { + $this->redirect("/maintenances/"); + } + } + parent::onStartup(); } diff --git a/Web/Presenters/PhotosPresenter.php b/Web/Presenters/PhotosPresenter.php index 70e8de65..a392e722 100644 --- a/Web/Presenters/PhotosPresenter.php +++ b/Web/Presenters/PhotosPresenter.php @@ -9,7 +9,8 @@ final class PhotosPresenter extends OpenVKPresenter private $users; private $photos; private $albums; - + protected $presenterName = "photos"; + function __construct(Photos $photos, Albums $albums, Users $users) { $this->users = $users; diff --git a/Web/Presenters/SupportPresenter.php b/Web/Presenters/SupportPresenter.php index 22f09201..8f4fd7d3 100644 --- a/Web/Presenters/SupportPresenter.php +++ b/Web/Presenters/SupportPresenter.php @@ -11,6 +11,7 @@ final class SupportPresenter extends OpenVKPresenter { protected $banTolerant = true; protected $deactivationTolerant = true; + protected $presenterName = "support"; private $tickets; private $comments; @@ -155,11 +156,12 @@ final class SupportPresenter extends OpenVKPresenter $this->notFound(); } else { if($ticket->getUserId() !== $this->user->id && $this->hasPermission('openvk\Web\Models\Entities\TicketReply', 'write', 0)) - $this->redirect("/support/tickets"); + $_redirect = "/support/tickets"; else - $this->redirect("/support"); + $_redirect = "/support?act=list"; $ticket->delete(); + $this->redirect($_redirect); } } } diff --git a/Web/Presenters/TopicsPresenter.php b/Web/Presenters/TopicsPresenter.php index 6dd1ec6c..528b51ad 100644 --- a/Web/Presenters/TopicsPresenter.php +++ b/Web/Presenters/TopicsPresenter.php @@ -7,7 +7,8 @@ final class TopicsPresenter extends OpenVKPresenter { private $topics; private $clubs; - + protected $presenterName = "topics"; + function __construct(Topics $topics, Clubs $clubs) { $this->topics = $topics; diff --git a/Web/Presenters/UserPresenter.php b/Web/Presenters/UserPresenter.php index 55e9c60e..ec65d10b 100644 --- a/Web/Presenters/UserPresenter.php +++ b/Web/Presenters/UserPresenter.php @@ -14,11 +14,11 @@ use Nette\Database\UniqueConstraintViolationException; final class UserPresenter extends OpenVKPresenter { + public $deactivationTolerant = false; + protected $presenterName = "user"; private $users; private $blacklists; - public $deactivationTolerant = false; - function __construct(Users $users, Blacklists $blacklists) { $this->users = $users; diff --git a/Web/Presenters/VideosPresenter.php b/Web/Presenters/VideosPresenter.php index e7752385..bfb90665 100644 --- a/Web/Presenters/VideosPresenter.php +++ b/Web/Presenters/VideosPresenter.php @@ -8,7 +8,8 @@ final class VideosPresenter extends OpenVKPresenter { private $videos; private $users; - + protected $presenterName = "videos"; + function __construct(Videos $videos, Users $users) { $this->videos = $videos; diff --git a/Web/Presenters/templates/Auth/Register.xml b/Web/Presenters/templates/Auth/Register.xml index 23f40aa1..16532cb1 100644 --- a/Web/Presenters/templates/Auth/Register.xml +++ b/Web/Presenters/templates/Auth/Register.xml @@ -87,12 +87,15 @@ {captcha_template()|noescape} + - + + {_checkbox_in_registration|noescape} +

{_log_in} diff --git a/Web/Presenters/templates/Maintenance/All.xml b/Web/Presenters/templates/Maintenance/All.xml new file mode 100644 index 00000000..e8f88e2c --- /dev/null +++ b/Web/Presenters/templates/Maintenance/All.xml @@ -0,0 +1,20 @@ +{extends "../@layout.xml"} + +{block title} + {_global_maintenance} +{/block} + +{block header} + {_global_maintenance} +{/block} + +{block content} +
+
+ + + {_undergoing_global_maintenance} + +
+
+{/block} diff --git a/Web/Presenters/templates/Maintenance/Section.xml b/Web/Presenters/templates/Maintenance/Section.xml new file mode 100644 index 00000000..9bdb0965 --- /dev/null +++ b/Web/Presenters/templates/Maintenance/Section.xml @@ -0,0 +1,20 @@ +{extends "../@layout.xml"} + +{block title} + {_section_maintenance} +{/block} + +{block header} + {_section_maintenance} +{/block} + +{block content} +
+
+ + + {tr("undergoing_section_maintenance", $name)|noescape} + +
+
+{/block} diff --git a/Web/Presenters/templates/User/Friends.xml b/Web/Presenters/templates/User/Friends.xml index d85fbd56..ed140cf1 100644 --- a/Web/Presenters/templates/User/Friends.xml +++ b/Web/Presenters/templates/User/Friends.xml @@ -53,7 +53,7 @@
{_online}
-
+
{_req}
{/block} diff --git a/Web/Presenters/templates/User/Groups.xml b/Web/Presenters/templates/User/Groups.xml index e039f14f..cc32b3d0 100644 --- a/Web/Presenters/templates/User/Groups.xml +++ b/Web/Presenters/templates/User/Groups.xml @@ -79,9 +79,9 @@ {/block} {block actions} + {_check_community} {if $x->canBeModifiedBy($thisUser ?? NULL)} {var $clubPinned = $thisUser->isClubPinned($x)} - {_check_community} {if $clubPinned} {_remove_from_left_menu} @@ -89,6 +89,15 @@ {_add_to_left_menu} {/if} + {/if} + {if $x->getSubscriptionStatus($thisUser) == false} + + {else}