From 7800a53eb3e136554129d4bc4455202ad89f534d Mon Sep 17 00:00:00 2001 From: Ilya Prokopenko Date: Mon, 23 May 2022 16:25:27 +0300 Subject: [PATCH 1/4] Rename CoC and CS files --- CODE-OF-CONFLICT.md => CODE_OF_CONFLICT.md | 0 CODE-STYLE.md => CODE_STYLE.md | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename CODE-OF-CONFLICT.md => CODE_OF_CONFLICT.md (100%) rename CODE-STYLE.md => CODE_STYLE.md (100%) diff --git a/CODE-OF-CONFLICT.md b/CODE_OF_CONFLICT.md similarity index 100% rename from CODE-OF-CONFLICT.md rename to CODE_OF_CONFLICT.md diff --git a/CODE-STYLE.md b/CODE_STYLE.md similarity index 100% rename from CODE-STYLE.md rename to CODE_STYLE.md From 453ce0e7d66dba972b9cb09cfb466819f8bbff7d Mon Sep 17 00:00:00 2001 From: Ilya Prokopenko Date: Mon, 23 May 2022 16:52:28 +0300 Subject: [PATCH 2/4] Its possible to close "Failed to share post" popup Resolves #436 i was bored --- Web/static/js/openvk.cls.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Web/static/js/openvk.cls.js b/Web/static/js/openvk.cls.js index 77677191..668e8ef9 100644 --- a/Web/static/js/openvk.cls.js +++ b/Web/static/js/openvk.cls.js @@ -171,7 +171,7 @@ function repostPost(id, hash) { xhr.setRequestHeader('Content-type', 'application/x-www-form-urlencoded'); xhr.onload = (function() { if(xhr.responseText.indexOf("wall_owner") === -1) - MessageBox(tr('error'), tr('error_repost_fail'), tr('ok'), [Function.noop]); + MessageBox(tr('error'), tr('error_repost_fail'), [tr('ok')], [Function.noop]); else { let jsonR = JSON.parse(xhr.responseText); NewNotification(tr('information_-1'), tr('shared_succ'), null, () => {window.location.href = "/wall" + jsonR.wall_owner}); From ce6c576ffbb9fede578d08d0d896780f1d905af8 Mon Sep 17 00:00:00 2001 From: Maxim Leshchenko Date: Mon, 23 May 2022 17:45:29 +0100 Subject: [PATCH 3/4] Wall: Fix avatars of post authors when a non-standard avatar style is used --- Web/static/css/avatar.1.css | 2 +- Web/static/css/avatar.2.css | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Web/static/css/avatar.1.css b/Web/static/css/avatar.1.css index 6103cefb..b7a6a7fa 100644 --- a/Web/static/css/avatar.1.css +++ b/Web/static/css/avatar.1.css @@ -6,7 +6,7 @@ table.User > tbody:nth-child(1) > tr:nth-child(1) > td:nth-child(1) > a:nth-chil object-fit: cover; } -.post > tbody:nth-child(1) > tr:nth-child(1) > td:nth-child(1) > img:nth-child(1) +.post > tbody:nth-child(1) > tr:nth-child(1) > td:nth-child(1) > a:nth-child(1) > img:nth-child(1) { width: 50px; height: 50px; diff --git a/Web/static/css/avatar.2.css b/Web/static/css/avatar.2.css index b4328ddf..11790bce 100644 --- a/Web/static/css/avatar.2.css +++ b/Web/static/css/avatar.2.css @@ -11,7 +11,7 @@ table.User > tbody:nth-child(1) > tr:nth-child(1) > td:nth-child(1) > a:nth-chil border-radius: 100px; } -.post > tbody:nth-child(1) > tr:nth-child(1) > td:nth-child(1) > img:nth-child(1) +.post > tbody:nth-child(1) > tr:nth-child(1) > td:nth-child(1) > a:nth-child(1) > img:nth-child(1) { width: 50px; height: 50px; From 203b16b87c8e0305d21de25ad1d89a9de96851d0 Mon Sep 17 00:00:00 2001 From: Maxim Leshchenko Date: Mon, 23 May 2022 20:24:32 +0100 Subject: [PATCH 4/4] Users: Fix list of user groups a little bit --- Web/Presenters/UserPresenter.php | 3 +++ Web/Presenters/templates/@listView.xml | 2 +- Web/Presenters/templates/User/Groups.xml | 6 +++--- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/Web/Presenters/UserPresenter.php b/Web/Presenters/UserPresenter.php index c6a41616..e2f26d59 100644 --- a/Web/Presenters/UserPresenter.php +++ b/Web/Presenters/UserPresenter.php @@ -90,6 +90,9 @@ final class UserPresenter extends OpenVKPresenter elseif (!$user->getPrivacyPermission('groups.read', $this->user->identity ?? NULL)) $this->flashFail("err", tr("forbidden"), tr("forbidden_comment")); else { + if($this->queryParam("act") === "managed" && $this->user->id !== $user->getId()) + $this->flashFail("err", tr("forbidden"), tr("forbidden_comment")); + $this->template->user = $user; $this->template->page = (int) ($this->queryParam("p") ?? 1); $this->template->admin = $this->queryParam("act") == "managed"; diff --git a/Web/Presenters/templates/@listView.xml b/Web/Presenters/templates/@listView.xml index 7d69bf00..811f8724 100644 --- a/Web/Presenters/templates/@listView.xml +++ b/Web/Presenters/templates/@listView.xml @@ -4,7 +4,7 @@
-
+
{include tabs}
diff --git a/Web/Presenters/templates/User/Groups.xml b/Web/Presenters/templates/User/Groups.xml index 395ffe19..ee014a19 100644 --- a/Web/Presenters/templates/User/Groups.xml +++ b/Web/Presenters/templates/User/Groups.xml @@ -32,7 +32,7 @@ {/block} {block size} -
+
{if !is_null($thisUser) && $user->getId() === $thisUser->getId()} {tr("groups_list", $thisUser->getClubCount())} @@ -90,7 +90,7 @@ {/if}
- +
@@ -101,7 +101,7 @@ {block bottom} {if !is_null($thisUser) && $user->getId() === $thisUser->getId()}
-
+

{_open_new_group}

{_open_group_desc}