From 0b48ec540053448fc99342d4c4a03ea584cd8060 Mon Sep 17 00:00:00 2001 From: "Misty (Bot)" Date: Wed, 16 Feb 2022 19:20:40 +0000 Subject: [PATCH 01/79] chore: update changelog for v1.19.3 --- CHANGELOG.md | 68 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 622b15cbf0..6ade8c1a6e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,71 @@ +#### v1.19.3 (2022-02-16) + +##### Chores + +* **i18n:** + * fallback strings for new resources: nodebb.admin-settings-uploads (4043f179) + * fallback strings for new resources: nodebb.user (775d9077) +* **deps:** + * update dependency lint-staged to v12.3.4 (9577ef8d) + * update commitlint monorepo to v16.2.1 (2290cee5) + * update dependency eslint to v8.9.0 (763cd193) +* remove punycode dep (e9cb1452) +* incrementing version number - v1.19.2 (e49b31f0) +* update changelog for v1.19.2 (f012984d) + +##### New Features + +* delete diffs on post purge, closes #10291 (e9e48a75) +* closes #10296 (58b5781c) +* deleting a user upload dissociates from posts, and vice versa (d5ed8736) +* #10276, dont change/revert theme if its current (398d25c2) + +##### Bug Fixes + +* #10302, fix regression (503e27f7) +* one last try (9205169f) +* doggy.gif (2f64d633) +* one more fix (cfdfbf32) +* dupe key errors (770fcd9e) +* #10292, delete missing fields (dbf7a458) +* local deleteUploads() method in `src/user/delete.js` to call `User.deleteUpload()` (b9edee14) +* #10144, automatically delete uploads from disk on post purge, ACP option to keep uploads on disk if desired (84dfda59) +* four-space indents in package.json (9aa3e442) +* #10289, remove lodash dependency in src/cli/package-install.js (81fa2e22) +* non-functional upgrade script (1c7fb8fe) +* language keys (350052ec) +* #10273, properly calculate item count for best/controversial (d70ce3a9) +* **deps:** + * update dependency nodebb-plugin-emoji to v3.5.16 (#10297) (b47ca86d) + * update dependency nodebb-plugin-markdown to v9.0.7 (#10293) (5b0d4a8e) + * update dependency nodebb-plugin-emoji to v3.5.14 (#10295) (7af057fa) + * update dependency nodebb-plugin-mentions to v3.0.5 (#10294) (55a98183) + * update dependency winston to v3.6.0 (#10285) (22da7a10) + * update dependency nodebb-plugin-markdown to v9.0.6 (3225a1af) + * update dependency nodebb-plugin-spam-be-gone to v0.7.13 (#10280) (3dc108d3) + * update dependency nodebb-plugin-emoji to v3.5.12 (#10279) (2c0b6322) + * update dependency nodebb-plugin-emoji to v3.5.11 (#10274) (766ef4e5) + +##### Refactors + +* lazy load slugify (946d351f) +* .deleteUpload() to accept array of paths (7ef9c7d2) +* fix user uploads paths, and associate uid with user uploads (ea36016d) +* change the post uploads' hash seeds to have the `files/` prefix (6489e9fd) +* abstract some common code out to local utility methods (aad0c5fd) +* move post upload tests to its own file (d92da828) +* remove extra zset remove, closes #10277 (489c0d30) + +##### Code Style Changes + +* linting errors (5d7e1ebc) + +##### Tests + +* fix topic thumb tests and topic thumbs to work properly with post upload assoc. (fb78570c) +* user uploads.js tests (8c2752ba) +* testing user upload methods, already fixed one bug (11275d68) + #### v1.19.2 (2022-02-09) ##### Chores From 09cb11c82a7c557b4a6be6126a912542d1e734d1 Mon Sep 17 00:00:00 2001 From: "Misty (Bot)" Date: Wed, 16 Feb 2022 19:20:39 +0000 Subject: [PATCH 02/79] chore: incrementing version number - v1.19.3 (cherry picked from commit 7388f111b78af34bf4918086285261db4a147cd1) Signed-off-by: Misty (Bot) --- install/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/package.json b/install/package.json index 61f576200b..f93309f745 100644 --- a/install/package.json +++ b/install/package.json @@ -2,7 +2,7 @@ "name": "nodebb", "license": "GPL-3.0", "description": "NodeBB Forum", - "version": "1.19.2", + "version": "1.19.3", "homepage": "http://www.nodebb.org", "repository": { "type": "git", From 636f1baf0cb7e7ed3153814e79113313f53f2b75 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 16 Feb 2022 18:51:10 -0500 Subject: [PATCH 03/79] fix(deps): update dependency nodebb-widget-essentials to v5.0.8 (#10306) Co-authored-by: Renovate Bot --- install/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/package.json b/install/package.json index f93309f745..12ee73116a 100644 --- a/install/package.json +++ b/install/package.json @@ -98,7 +98,7 @@ "nodebb-theme-persona": "11.3.38", "nodebb-theme-slick": "1.4.23", "nodebb-theme-vanilla": "12.1.17", - "nodebb-widget-essentials": "5.0.7", + "nodebb-widget-essentials": "5.0.8", "nodemailer": "6.7.2", "nprogress": "0.2.0", "passport": "0.5.2", From 5666c103cfe6903b82275d9d058f4a3eaba40785 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 16 Feb 2022 20:50:00 -0500 Subject: [PATCH 04/79] fix(deps): update dependency nodebb-widget-essentials to v5.0.9 (#10307) Co-authored-by: Renovate Bot --- install/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/package.json b/install/package.json index 12ee73116a..fd579151a7 100644 --- a/install/package.json +++ b/install/package.json @@ -98,7 +98,7 @@ "nodebb-theme-persona": "11.3.38", "nodebb-theme-slick": "1.4.23", "nodebb-theme-vanilla": "12.1.17", - "nodebb-widget-essentials": "5.0.8", + "nodebb-widget-essentials": "5.0.9", "nodemailer": "6.7.2", "nprogress": "0.2.0", "passport": "0.5.2", From b517b376acf33d0f8685aeb7c22cbf3ca1e9168d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Wed, 16 Feb 2022 22:07:52 -0500 Subject: [PATCH 05/79] feat: ability to go through your posts in a topic because I am :older_man: useful for large topics --- install/package.json | 2 +- public/language/en-GB/global.json | 2 +- public/language/en-GB/topic.json | 2 ++ public/src/modules/navigator.js | 43 +++++++++++++++++++++++-- src/socket.io/topics.js | 53 +++++++++++++++++++++++++++++++ 5 files changed, 98 insertions(+), 4 deletions(-) diff --git a/install/package.json b/install/package.json index fd579151a7..1b054eaba0 100644 --- a/install/package.json +++ b/install/package.json @@ -95,7 +95,7 @@ "nodebb-plugin-spam-be-gone": "0.7.13", "nodebb-rewards-essentials": "0.2.1", "nodebb-theme-lavender": "5.3.2", - "nodebb-theme-persona": "11.3.38", + "nodebb-theme-persona": "11.3.39", "nodebb-theme-slick": "1.4.23", "nodebb-theme-vanilla": "12.1.17", "nodebb-widget-essentials": "5.0.9", diff --git a/public/language/en-GB/global.json b/public/language/en-GB/global.json index 3f974d70dc..f1ee75200e 100644 --- a/public/language/en-GB/global.json +++ b/public/language/en-GB/global.json @@ -28,7 +28,7 @@ "pagination": "Pagination", "pagination.out_of": "%1 out of %2", - "pagination.enter_index": "Enter index", + "pagination.enter_index": "Go to post index", "header.admin": "Admin", "header.categories": "Categories", diff --git a/public/language/en-GB/topic.json b/public/language/en-GB/topic.json index fc7984f6de..060e916c19 100644 --- a/public/language/en-GB/topic.json +++ b/public/language/en-GB/topic.json @@ -207,5 +207,7 @@ "timeago_earlier": "%1 earlier", "first-post": "First post", "last-post": "Last post", + "go-to-my-next-post": "Go to my next post", + "no-more-next-post": "You don't have any other posts in this topic", "post-quick-reply": "Post quick reply" } diff --git a/public/src/modules/navigator.js b/public/src/modules/navigator.js index a2b2956e4e..88e76e9b7a 100644 --- a/public/src/modules/navigator.js +++ b/public/src/modules/navigator.js @@ -54,15 +54,20 @@ define('navigator', ['forum/pagination', 'components', 'hooks', 'alerts'], funct e.stopPropagation(); }); - paginationBlockEl.off('shown.bs.dropdown', '.dropdown').on('shown.bs.dropdown', '.dropdown', function () { - setTimeout(function () { + paginationBlockEl.off('shown.bs.dropdown', '.wrapper').on('shown.bs.dropdown', '.wrapper', function () { + setTimeout(async function () { $('.pagination-block input').focus(); + const postCountInTopic = await socket.emit('topics.getPostCountInTopic', ajaxify.data.tid); + if (postCountInTopic > 0) { + paginationBlockEl.find('#myNextPostBtn').removeAttr('disabled'); + } }, 100); }); paginationBlockEl.find('.pageup').off('click').on('click', navigator.scrollUp); paginationBlockEl.find('.pagedown').off('click').on('click', navigator.scrollDown); paginationBlockEl.find('.pagetop').off('click').on('click', navigator.toTop); paginationBlockEl.find('.pagebottom').off('click').on('click', navigator.toBottom); + paginationBlockEl.find('#myNextPostBtn').off('click').on('click', gotoMyNextPost); paginationBlockEl.find('input').on('keydown', function (e) { if (e.which === 13) { @@ -90,6 +95,40 @@ define('navigator', ['forum/pagination', 'components', 'hooks', 'alerts'], funct navigator.update(0); }; + let lastNextIndex = 0; + async function gotoMyNextPost() { + async function getNext(startIndex) { + return await socket.emit('topics.getMyNextPostIndex', { + tid: ajaxify.data.tid, + index: Math.max(1, startIndex), + sort: config.topicPostSort, + }); + } + if (ajaxify.data.template.topic) { + let nextIndex = await getNext(index); + if (lastNextIndex === nextIndex) { // handles last post in pagination + console.log('fail', nextIndex, lastNextIndex); + nextIndex = await getNext(nextIndex); + } + if (nextIndex) { + lastNextIndex = nextIndex; + $(window).one('action:ajaxify.end', function () { + if (paginationBlockEl.find('.dropdown-menu').is(':hidden')) { + paginationBlockEl.find('.dropdown-toggle').dropdown('toggle'); + } + }); + navigator.scrollToIndex(nextIndex, true, 0); + } else { + alerts.alert({ + message: '[[topic:no-more-next-post]]', + type: 'info', + }); + + lastNextIndex = 1; + } + } + } + function clampTop(newTop) { const parent = thumb.parent(); const parentOffset = parent.offset(); diff --git a/src/socket.io/topics.js b/src/socket.io/topics.js index 71798a3311..c69bb63f3f 100644 --- a/src/socket.io/topics.js +++ b/src/socket.io/topics.js @@ -1,9 +1,14 @@ 'use strict'; +const _ = require('lodash'); + +const db = require('../database'); +const posts = require('../posts'); const topics = require('../topics'); const user = require('../user'); const meta = require('../meta'); const privileges = require('../privileges'); +const cache = require('../cache'); const SocketTopics = module.exports; @@ -54,4 +59,52 @@ SocketTopics.isModerator = async function (socket, tid) { return await user.isModerator(socket.uid, cid); }; +SocketTopics.getMyNextPostIndex = async function (socket, data) { + if (!data || !data.tid || !data.index || !data.sort) { + throw new Error('[[error:invalid-data]]'); + } + + async function getTopicPids(index) { + const topicSet = data.sort === 'most_votes' ? `tid:${data.tid}:posts:votes` : `tid:${data.tid}:posts`; + const reverse = data.sort === 'newest_to_oldest' || data.sort === 'most_votes'; + const cacheKey = `np:s:${topicSet}:r:${String(reverse)}:tid:${data.tid}:pids`; + const topicPids = cache.get(cacheKey); + if (topicPids) { + return topicPids.slice(index - 1); + } + const pids = await db[reverse ? 'getSortedSetRevRange' : 'getSortedSetRange'](topicSet, 0, -1); + cache.set(cacheKey, pids, 30000); + return pids.slice(index - 1); + } + + async function getUserPids() { + const cid = await topics.getTopicField(data.tid, 'cid'); + const cacheKey = `np:cid:${cid}:uid:${socket.uid}:pids`; + const userPids = cache.get(cacheKey); + if (userPids) { + return userPids; + } + const pids = await db.getSortedSetRange(`cid:${cid}:uid:${socket.uid}:pids`, 0, -1); + cache.set(cacheKey, pids, 30000); + return pids; + } + + const [topicPids, userPidsInCategory] = await Promise.all([ + getTopicPids(data.index), + getUserPids(), + ]); + const userPidsInTopic = _.intersection(topicPids, userPidsInCategory); + if (!userPidsInTopic.length) { + return 0; + } + return await posts.getPidIndex(userPidsInTopic[0], data.tid, data.sort); +}; + +SocketTopics.getPostCountInTopic = async function (socket, tid) { + if (!socket.uid || !tid) { + return 0; + } + return await db.sortedSetScore(`tid:${tid}:posters`, socket.uid); +}; + require('../promisify')(SocketTopics); From 949611960a183b1c7c51a586998aaaaa66f94bb2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Wed, 16 Feb 2022 22:08:54 -0500 Subject: [PATCH 06/79] refactor: change lang string --- public/language/en-GB/topic.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/language/en-GB/topic.json b/public/language/en-GB/topic.json index 060e916c19..90b56bdeff 100644 --- a/public/language/en-GB/topic.json +++ b/public/language/en-GB/topic.json @@ -208,6 +208,6 @@ "first-post": "First post", "last-post": "Last post", "go-to-my-next-post": "Go to my next post", - "no-more-next-post": "You don't have any other posts in this topic", + "no-more-next-post": "You don't have more posts in this topic", "post-quick-reply": "Post quick reply" } From dc0f9a73c05da74e64a84fb9f3e44fbd245f3e07 Mon Sep 17 00:00:00 2001 From: "Misty (Bot)" Date: Wed, 16 Feb 2022 22:09:35 -0500 Subject: [PATCH 07/79] chore(i18n): fallback strings for new resources: nodebb.topic --- public/language/ar/topic.json | 2 ++ public/language/bg/topic.json | 2 ++ public/language/bn/topic.json | 2 ++ public/language/cs/topic.json | 2 ++ public/language/da/topic.json | 2 ++ public/language/de/topic.json | 2 ++ public/language/el/topic.json | 2 ++ public/language/en-US/topic.json | 2 ++ public/language/en-x-pirate/topic.json | 2 ++ public/language/es/topic.json | 2 ++ public/language/et/topic.json | 2 ++ public/language/fa-IR/topic.json | 2 ++ public/language/fi/topic.json | 2 ++ public/language/fr/topic.json | 2 ++ public/language/gl/topic.json | 2 ++ public/language/he/topic.json | 2 ++ public/language/hr/topic.json | 2 ++ public/language/hu/topic.json | 2 ++ public/language/id/topic.json | 2 ++ public/language/it/topic.json | 2 ++ public/language/ja/topic.json | 2 ++ public/language/ko/topic.json | 2 ++ public/language/lt/topic.json | 2 ++ public/language/lv/topic.json | 2 ++ public/language/ms/topic.json | 2 ++ public/language/nb/topic.json | 2 ++ public/language/nl/topic.json | 2 ++ public/language/pl/topic.json | 2 ++ public/language/pt-BR/topic.json | 2 ++ public/language/pt-PT/topic.json | 2 ++ public/language/ro/topic.json | 2 ++ public/language/ru/topic.json | 2 ++ public/language/rw/topic.json | 2 ++ public/language/sc/topic.json | 2 ++ public/language/sk/topic.json | 2 ++ public/language/sl/topic.json | 2 ++ public/language/sr/topic.json | 2 ++ public/language/sv/topic.json | 2 ++ public/language/th/topic.json | 2 ++ public/language/tr/topic.json | 2 ++ public/language/uk/topic.json | 2 ++ public/language/vi/topic.json | 2 ++ public/language/zh-CN/topic.json | 2 ++ public/language/zh-TW/topic.json | 2 ++ 44 files changed, 88 insertions(+) diff --git a/public/language/ar/topic.json b/public/language/ar/topic.json index 82bf38c9ef..6b0d4b691a 100644 --- a/public/language/ar/topic.json +++ b/public/language/ar/topic.json @@ -181,5 +181,7 @@ "timeago_earlier": "%1 earlier", "first-post": "First post", "last-post": "Last post", + "go-to-my-next-post": "Go to my next post", + "no-more-next-post": "You don't have more posts in this topic", "post-quick-reply": "Post quick reply" } \ No newline at end of file diff --git a/public/language/bg/topic.json b/public/language/bg/topic.json index 40474033ac..25b84d4100 100644 --- a/public/language/bg/topic.json +++ b/public/language/bg/topic.json @@ -181,5 +181,7 @@ "timeago_earlier": "%1 по-рано", "first-post": "Първа публикация", "last-post": "Последна публикация", + "go-to-my-next-post": "Go to my next post", + "no-more-next-post": "You don't have more posts in this topic", "post-quick-reply": "Пускане на бърза публикация" } \ No newline at end of file diff --git a/public/language/bn/topic.json b/public/language/bn/topic.json index 53a06c3c00..f116da0f41 100644 --- a/public/language/bn/topic.json +++ b/public/language/bn/topic.json @@ -181,5 +181,7 @@ "timeago_earlier": "%1 earlier", "first-post": "First post", "last-post": "Last post", + "go-to-my-next-post": "Go to my next post", + "no-more-next-post": "You don't have more posts in this topic", "post-quick-reply": "Post quick reply" } \ No newline at end of file diff --git a/public/language/cs/topic.json b/public/language/cs/topic.json index 42a0402639..859db6ba3b 100644 --- a/public/language/cs/topic.json +++ b/public/language/cs/topic.json @@ -181,5 +181,7 @@ "timeago_earlier": "%1 dříve", "first-post": "First post", "last-post": "Last post", + "go-to-my-next-post": "Go to my next post", + "no-more-next-post": "You don't have more posts in this topic", "post-quick-reply": "Post quick reply" } \ No newline at end of file diff --git a/public/language/da/topic.json b/public/language/da/topic.json index 6cdfd5b4ac..1f1b073993 100644 --- a/public/language/da/topic.json +++ b/public/language/da/topic.json @@ -181,5 +181,7 @@ "timeago_earlier": "%1 earlier", "first-post": "First post", "last-post": "Last post", + "go-to-my-next-post": "Go to my next post", + "no-more-next-post": "You don't have more posts in this topic", "post-quick-reply": "Post quick reply" } \ No newline at end of file diff --git a/public/language/de/topic.json b/public/language/de/topic.json index 95ab642b0c..2807109154 100644 --- a/public/language/de/topic.json +++ b/public/language/de/topic.json @@ -181,5 +181,7 @@ "timeago_earlier": "%1 früher", "first-post": "Erster Beitrag", "last-post": "Letzter Beitrag", + "go-to-my-next-post": "Go to my next post", + "no-more-next-post": "You don't have more posts in this topic", "post-quick-reply": "Beitrag schnell Beantworten" } \ No newline at end of file diff --git a/public/language/el/topic.json b/public/language/el/topic.json index f7665b1fdd..b59f4e51d7 100644 --- a/public/language/el/topic.json +++ b/public/language/el/topic.json @@ -181,5 +181,7 @@ "timeago_earlier": "%1 earlier", "first-post": "First post", "last-post": "Last post", + "go-to-my-next-post": "Go to my next post", + "no-more-next-post": "You don't have more posts in this topic", "post-quick-reply": "Post quick reply" } \ No newline at end of file diff --git a/public/language/en-US/topic.json b/public/language/en-US/topic.json index db9455fec8..9836b78a3d 100644 --- a/public/language/en-US/topic.json +++ b/public/language/en-US/topic.json @@ -181,5 +181,7 @@ "timeago_earlier": "%1 earlier", "first-post": "First post", "last-post": "Last post", + "go-to-my-next-post": "Go to my next post", + "no-more-next-post": "You don't have more posts in this topic", "post-quick-reply": "Post quick reply" } \ No newline at end of file diff --git a/public/language/en-x-pirate/topic.json b/public/language/en-x-pirate/topic.json index db9455fec8..9836b78a3d 100644 --- a/public/language/en-x-pirate/topic.json +++ b/public/language/en-x-pirate/topic.json @@ -181,5 +181,7 @@ "timeago_earlier": "%1 earlier", "first-post": "First post", "last-post": "Last post", + "go-to-my-next-post": "Go to my next post", + "no-more-next-post": "You don't have more posts in this topic", "post-quick-reply": "Post quick reply" } \ No newline at end of file diff --git a/public/language/es/topic.json b/public/language/es/topic.json index 23e9196b54..391f0535dd 100644 --- a/public/language/es/topic.json +++ b/public/language/es/topic.json @@ -181,5 +181,7 @@ "timeago_earlier": "%1 antes", "first-post": "First post", "last-post": "Last post", + "go-to-my-next-post": "Go to my next post", + "no-more-next-post": "You don't have more posts in this topic", "post-quick-reply": "Post quick reply" } \ No newline at end of file diff --git a/public/language/et/topic.json b/public/language/et/topic.json index 41cf277184..61092bcd51 100644 --- a/public/language/et/topic.json +++ b/public/language/et/topic.json @@ -181,5 +181,7 @@ "timeago_earlier": "%1 earlier", "first-post": "First post", "last-post": "Last post", + "go-to-my-next-post": "Go to my next post", + "no-more-next-post": "You don't have more posts in this topic", "post-quick-reply": "Post quick reply" } \ No newline at end of file diff --git a/public/language/fa-IR/topic.json b/public/language/fa-IR/topic.json index 03a9110d42..41a0af6fa8 100644 --- a/public/language/fa-IR/topic.json +++ b/public/language/fa-IR/topic.json @@ -181,5 +181,7 @@ "timeago_earlier": "%1 قبل", "first-post": "اولین پست", "last-post": "آخرین پست", + "go-to-my-next-post": "Go to my next post", + "no-more-next-post": "You don't have more posts in this topic", "post-quick-reply": "Post quick reply" } \ No newline at end of file diff --git a/public/language/fi/topic.json b/public/language/fi/topic.json index fd73ad6070..a60caf7089 100644 --- a/public/language/fi/topic.json +++ b/public/language/fi/topic.json @@ -181,5 +181,7 @@ "timeago_earlier": "%1 aiempi", "first-post": "First post", "last-post": "Last post", + "go-to-my-next-post": "Go to my next post", + "no-more-next-post": "You don't have more posts in this topic", "post-quick-reply": "Post quick reply" } \ No newline at end of file diff --git a/public/language/fr/topic.json b/public/language/fr/topic.json index b01d31bd2b..fbfac50f85 100644 --- a/public/language/fr/topic.json +++ b/public/language/fr/topic.json @@ -181,5 +181,7 @@ "timeago_earlier": "il y a %1", "first-post": "Premier message", "last-post": "Dernier message", + "go-to-my-next-post": "Go to my next post", + "no-more-next-post": "You don't have more posts in this topic", "post-quick-reply": "Réponse rapide" } \ No newline at end of file diff --git a/public/language/gl/topic.json b/public/language/gl/topic.json index c712b54d83..7b64d25a78 100644 --- a/public/language/gl/topic.json +++ b/public/language/gl/topic.json @@ -181,5 +181,7 @@ "timeago_earlier": "%1 earlier", "first-post": "First post", "last-post": "Last post", + "go-to-my-next-post": "Go to my next post", + "no-more-next-post": "You don't have more posts in this topic", "post-quick-reply": "Post quick reply" } \ No newline at end of file diff --git a/public/language/he/topic.json b/public/language/he/topic.json index ab0fd64ff6..00d5bb627c 100644 --- a/public/language/he/topic.json +++ b/public/language/he/topic.json @@ -181,5 +181,7 @@ "timeago_earlier": "לפני %1 ", "first-post": "פוסט ראשון", "last-post": "פוסט אחרון", + "go-to-my-next-post": "Go to my next post", + "no-more-next-post": "You don't have more posts in this topic", "post-quick-reply": "רשום תשובה מהירה" } \ No newline at end of file diff --git a/public/language/hr/topic.json b/public/language/hr/topic.json index 3ec9d668ce..2deebc9d42 100644 --- a/public/language/hr/topic.json +++ b/public/language/hr/topic.json @@ -181,5 +181,7 @@ "timeago_earlier": "%1 earlier", "first-post": "First post", "last-post": "Last post", + "go-to-my-next-post": "Go to my next post", + "no-more-next-post": "You don't have more posts in this topic", "post-quick-reply": "Post quick reply" } \ No newline at end of file diff --git a/public/language/hu/topic.json b/public/language/hu/topic.json index a4dd13f9e9..7c3d7639c1 100644 --- a/public/language/hu/topic.json +++ b/public/language/hu/topic.json @@ -181,5 +181,7 @@ "timeago_earlier": "%1 korábban", "first-post": "Első bejegyzés", "last-post": "Utolsó bejegyzés", + "go-to-my-next-post": "Go to my next post", + "no-more-next-post": "You don't have more posts in this topic", "post-quick-reply": "Post quick reply" } \ No newline at end of file diff --git a/public/language/id/topic.json b/public/language/id/topic.json index ab52065f66..8f0069cf35 100644 --- a/public/language/id/topic.json +++ b/public/language/id/topic.json @@ -181,5 +181,7 @@ "timeago_earlier": "%1 earlier", "first-post": "First post", "last-post": "Last post", + "go-to-my-next-post": "Go to my next post", + "no-more-next-post": "You don't have more posts in this topic", "post-quick-reply": "Post quick reply" } \ No newline at end of file diff --git a/public/language/it/topic.json b/public/language/it/topic.json index 48a3fa285e..861fcdd58f 100644 --- a/public/language/it/topic.json +++ b/public/language/it/topic.json @@ -181,5 +181,7 @@ "timeago_earlier": "%1 precedente", "first-post": "Primo post", "last-post": "Ultimo post", + "go-to-my-next-post": "Go to my next post", + "no-more-next-post": "You don't have more posts in this topic", "post-quick-reply": "Invia una risposta rapida" } \ No newline at end of file diff --git a/public/language/ja/topic.json b/public/language/ja/topic.json index 0b86bb1f2a..3714d41002 100644 --- a/public/language/ja/topic.json +++ b/public/language/ja/topic.json @@ -181,5 +181,7 @@ "timeago_earlier": "%1 earlier", "first-post": "First post", "last-post": "Last post", + "go-to-my-next-post": "Go to my next post", + "no-more-next-post": "You don't have more posts in this topic", "post-quick-reply": "Post quick reply" } \ No newline at end of file diff --git a/public/language/ko/topic.json b/public/language/ko/topic.json index 528c6b9ea8..935d9af1fa 100644 --- a/public/language/ko/topic.json +++ b/public/language/ko/topic.json @@ -181,5 +181,7 @@ "timeago_earlier": "%1 이전", "first-post": "첫 포스트", "last-post": "마지막 포스트", + "go-to-my-next-post": "Go to my next post", + "no-more-next-post": "You don't have more posts in this topic", "post-quick-reply": "빠른 답글" } \ No newline at end of file diff --git a/public/language/lt/topic.json b/public/language/lt/topic.json index bdc184f0ee..7ed7fcbf2d 100644 --- a/public/language/lt/topic.json +++ b/public/language/lt/topic.json @@ -181,5 +181,7 @@ "timeago_earlier": "%1 earlier", "first-post": "First post", "last-post": "Last post", + "go-to-my-next-post": "Go to my next post", + "no-more-next-post": "You don't have more posts in this topic", "post-quick-reply": "Post quick reply" } \ No newline at end of file diff --git a/public/language/lv/topic.json b/public/language/lv/topic.json index 8131549d18..a8be194f4e 100644 --- a/public/language/lv/topic.json +++ b/public/language/lv/topic.json @@ -181,5 +181,7 @@ "timeago_earlier": "%1 earlier", "first-post": "First post", "last-post": "Last post", + "go-to-my-next-post": "Go to my next post", + "no-more-next-post": "You don't have more posts in this topic", "post-quick-reply": "Post quick reply" } \ No newline at end of file diff --git a/public/language/ms/topic.json b/public/language/ms/topic.json index edf0561b24..293118fe3c 100644 --- a/public/language/ms/topic.json +++ b/public/language/ms/topic.json @@ -181,5 +181,7 @@ "timeago_earlier": "%1 earlier", "first-post": "First post", "last-post": "Last post", + "go-to-my-next-post": "Go to my next post", + "no-more-next-post": "You don't have more posts in this topic", "post-quick-reply": "Post quick reply" } \ No newline at end of file diff --git a/public/language/nb/topic.json b/public/language/nb/topic.json index 29f9bb7451..80d1fdb89e 100644 --- a/public/language/nb/topic.json +++ b/public/language/nb/topic.json @@ -181,5 +181,7 @@ "timeago_earlier": "%1 tidligere", "first-post": "Første innlegg", "last-post": "Seneste innlegg", + "go-to-my-next-post": "Go to my next post", + "no-more-next-post": "You don't have more posts in this topic", "post-quick-reply": "Post quick reply" } \ No newline at end of file diff --git a/public/language/nl/topic.json b/public/language/nl/topic.json index 70eabc5866..105660390d 100644 --- a/public/language/nl/topic.json +++ b/public/language/nl/topic.json @@ -181,5 +181,7 @@ "timeago_earlier": "%1 eerder", "first-post": "First post", "last-post": "Last post", + "go-to-my-next-post": "Go to my next post", + "no-more-next-post": "You don't have more posts in this topic", "post-quick-reply": "Post quick reply" } \ No newline at end of file diff --git a/public/language/pl/topic.json b/public/language/pl/topic.json index cf20f58725..1eaedfba9e 100644 --- a/public/language/pl/topic.json +++ b/public/language/pl/topic.json @@ -181,5 +181,7 @@ "timeago_earlier": "%1 wcześniej", "first-post": "Pierwszy post", "last-post": "Ostatni post", + "go-to-my-next-post": "Go to my next post", + "no-more-next-post": "You don't have more posts in this topic", "post-quick-reply": "Wyślij szybką odpowiedź" } \ No newline at end of file diff --git a/public/language/pt-BR/topic.json b/public/language/pt-BR/topic.json index 486474c98e..25f9f9c7e9 100644 --- a/public/language/pt-BR/topic.json +++ b/public/language/pt-BR/topic.json @@ -181,5 +181,7 @@ "timeago_earlier": "%1 mais cedo", "first-post": "Primeiro post", "last-post": "Último post", + "go-to-my-next-post": "Go to my next post", + "no-more-next-post": "You don't have more posts in this topic", "post-quick-reply": "Post quick reply" } \ No newline at end of file diff --git a/public/language/pt-PT/topic.json b/public/language/pt-PT/topic.json index 4431773b6f..8ef50f4130 100644 --- a/public/language/pt-PT/topic.json +++ b/public/language/pt-PT/topic.json @@ -181,5 +181,7 @@ "timeago_earlier": "%1 antes", "first-post": "First post", "last-post": "Last post", + "go-to-my-next-post": "Go to my next post", + "no-more-next-post": "You don't have more posts in this topic", "post-quick-reply": "Post quick reply" } \ No newline at end of file diff --git a/public/language/ro/topic.json b/public/language/ro/topic.json index 7cc9fad6de..a662b40186 100644 --- a/public/language/ro/topic.json +++ b/public/language/ro/topic.json @@ -181,5 +181,7 @@ "timeago_earlier": "%1 earlier", "first-post": "First post", "last-post": "Last post", + "go-to-my-next-post": "Go to my next post", + "no-more-next-post": "You don't have more posts in this topic", "post-quick-reply": "Post quick reply" } \ No newline at end of file diff --git a/public/language/ru/topic.json b/public/language/ru/topic.json index c000f9b989..9f1f2b1df2 100644 --- a/public/language/ru/topic.json +++ b/public/language/ru/topic.json @@ -181,5 +181,7 @@ "timeago_earlier": "на %1 раньше", "first-post": "Первое сообщение", "last-post": "Последнее сообщение", + "go-to-my-next-post": "Go to my next post", + "no-more-next-post": "You don't have more posts in this topic", "post-quick-reply": "Post quick reply" } \ No newline at end of file diff --git a/public/language/rw/topic.json b/public/language/rw/topic.json index eb1f7844d7..31e8bc72ae 100644 --- a/public/language/rw/topic.json +++ b/public/language/rw/topic.json @@ -181,5 +181,7 @@ "timeago_earlier": "%1 earlier", "first-post": "First post", "last-post": "Last post", + "go-to-my-next-post": "Go to my next post", + "no-more-next-post": "You don't have more posts in this topic", "post-quick-reply": "Post quick reply" } \ No newline at end of file diff --git a/public/language/sc/topic.json b/public/language/sc/topic.json index e39101a711..e72421f966 100644 --- a/public/language/sc/topic.json +++ b/public/language/sc/topic.json @@ -181,5 +181,7 @@ "timeago_earlier": "%1 earlier", "first-post": "First post", "last-post": "Last post", + "go-to-my-next-post": "Go to my next post", + "no-more-next-post": "You don't have more posts in this topic", "post-quick-reply": "Post quick reply" } \ No newline at end of file diff --git a/public/language/sk/topic.json b/public/language/sk/topic.json index 6ca052381d..991af9c827 100644 --- a/public/language/sk/topic.json +++ b/public/language/sk/topic.json @@ -181,5 +181,7 @@ "timeago_earlier": "%1 earlier", "first-post": "First post", "last-post": "Last post", + "go-to-my-next-post": "Go to my next post", + "no-more-next-post": "You don't have more posts in this topic", "post-quick-reply": "Post quick reply" } \ No newline at end of file diff --git a/public/language/sl/topic.json b/public/language/sl/topic.json index 416dba9af3..403fef6f9e 100644 --- a/public/language/sl/topic.json +++ b/public/language/sl/topic.json @@ -181,5 +181,7 @@ "timeago_earlier": "%1 earlier", "first-post": "Prva objava", "last-post": "Zadnja obava", + "go-to-my-next-post": "Go to my next post", + "no-more-next-post": "You don't have more posts in this topic", "post-quick-reply": "Objavi hitri odgovor" } \ No newline at end of file diff --git a/public/language/sr/topic.json b/public/language/sr/topic.json index 6de9356949..e01610788f 100644 --- a/public/language/sr/topic.json +++ b/public/language/sr/topic.json @@ -181,5 +181,7 @@ "timeago_earlier": "%1 раније", "first-post": "Прва порука", "last-post": "Последња порука", + "go-to-my-next-post": "Go to my next post", + "no-more-next-post": "You don't have more posts in this topic", "post-quick-reply": "Објави брзи одговор" } \ No newline at end of file diff --git a/public/language/sv/topic.json b/public/language/sv/topic.json index a363d87bde..b04019a686 100644 --- a/public/language/sv/topic.json +++ b/public/language/sv/topic.json @@ -181,5 +181,7 @@ "timeago_earlier": "%1 tidigare", "first-post": "Första inlägget", "last-post": "Sista inlägget", + "go-to-my-next-post": "Go to my next post", + "no-more-next-post": "You don't have more posts in this topic", "post-quick-reply": "Gör ett snabbsvar" } \ No newline at end of file diff --git a/public/language/th/topic.json b/public/language/th/topic.json index f2650c2f71..d73a99bc3b 100644 --- a/public/language/th/topic.json +++ b/public/language/th/topic.json @@ -181,5 +181,7 @@ "timeago_earlier": "%1 earlier", "first-post": "First post", "last-post": "Last post", + "go-to-my-next-post": "Go to my next post", + "no-more-next-post": "You don't have more posts in this topic", "post-quick-reply": "Post quick reply" } \ No newline at end of file diff --git a/public/language/tr/topic.json b/public/language/tr/topic.json index df15194719..50ee344b4b 100644 --- a/public/language/tr/topic.json +++ b/public/language/tr/topic.json @@ -181,5 +181,7 @@ "timeago_earlier": "%1 önce", "first-post": "İlk ileti", "last-post": "Son ileti", + "go-to-my-next-post": "Go to my next post", + "no-more-next-post": "You don't have more posts in this topic", "post-quick-reply": "Hızlı yanıt gönder" } \ No newline at end of file diff --git a/public/language/uk/topic.json b/public/language/uk/topic.json index bfa9de865b..149f97f45b 100644 --- a/public/language/uk/topic.json +++ b/public/language/uk/topic.json @@ -181,5 +181,7 @@ "timeago_earlier": "%1 раніше", "first-post": "First post", "last-post": "Last post", + "go-to-my-next-post": "Go to my next post", + "no-more-next-post": "You don't have more posts in this topic", "post-quick-reply": "Post quick reply" } \ No newline at end of file diff --git a/public/language/vi/topic.json b/public/language/vi/topic.json index 51babdd1b6..7a0a20dd17 100644 --- a/public/language/vi/topic.json +++ b/public/language/vi/topic.json @@ -181,5 +181,7 @@ "timeago_earlier": "%1 trước đó", "first-post": "Bài viết đầu tiên", "last-post": "Bài viết cuối cùng", + "go-to-my-next-post": "Go to my next post", + "no-more-next-post": "You don't have more posts in this topic", "post-quick-reply": "Đăng trả lời nhanh" } \ No newline at end of file diff --git a/public/language/zh-CN/topic.json b/public/language/zh-CN/topic.json index 979923debc..f16405fdd3 100644 --- a/public/language/zh-CN/topic.json +++ b/public/language/zh-CN/topic.json @@ -181,5 +181,7 @@ "timeago_earlier": "%1 前", "first-post": "First post", "last-post": "Last post", + "go-to-my-next-post": "Go to my next post", + "no-more-next-post": "You don't have more posts in this topic", "post-quick-reply": "Post quick reply" } \ No newline at end of file diff --git a/public/language/zh-TW/topic.json b/public/language/zh-TW/topic.json index cda13ebbb1..513a23dfe5 100644 --- a/public/language/zh-TW/topic.json +++ b/public/language/zh-TW/topic.json @@ -181,5 +181,7 @@ "timeago_earlier": "%1 前", "first-post": "First post", "last-post": "Last post", + "go-to-my-next-post": "Go to my next post", + "no-more-next-post": "You don't have more posts in this topic", "post-quick-reply": "Post quick reply" } \ No newline at end of file From c23b208984ce8d3712c4c809ccfa77a4a208f91f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Wed, 16 Feb 2022 22:11:53 -0500 Subject: [PATCH 08/79] chore: up persona --- install/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/package.json b/install/package.json index 1b054eaba0..c0249a1b42 100644 --- a/install/package.json +++ b/install/package.json @@ -95,7 +95,7 @@ "nodebb-plugin-spam-be-gone": "0.7.13", "nodebb-rewards-essentials": "0.2.1", "nodebb-theme-lavender": "5.3.2", - "nodebb-theme-persona": "11.3.39", + "nodebb-theme-persona": "11.3.40", "nodebb-theme-slick": "1.4.23", "nodebb-theme-vanilla": "12.1.17", "nodebb-widget-essentials": "5.0.9", From d12c66c8bec80221a56ae1ae4031a8175436e93f Mon Sep 17 00:00:00 2001 From: "Misty (Bot)" Date: Thu, 17 Feb 2022 04:06:08 -0500 Subject: [PATCH 09/79] Latest translations and fallbacks --- public/language/ar/global.json | 2 +- public/language/bg/global.json | 2 +- public/language/bg/topic.json | 4 ++-- public/language/bn/global.json | 2 +- public/language/cs/global.json | 2 +- public/language/da/global.json | 2 +- public/language/de/global.json | 2 +- public/language/el/global.json | 2 +- public/language/en-US/global.json | 2 +- public/language/en-x-pirate/global.json | 2 +- public/language/es/global.json | 2 +- public/language/et/global.json | 2 +- public/language/fa-IR/global.json | 2 +- public/language/fi/global.json | 2 +- public/language/fr/global.json | 2 +- public/language/gl/global.json | 2 +- public/language/he/admin/admin.json | 8 ++++---- public/language/he/admin/settings/advanced.json | 2 +- public/language/he/global.json | 2 +- public/language/he/modules.json | 6 +++--- public/language/he/post-queue.json | 4 ++-- public/language/he/user.json | 4 ++-- public/language/he/users.json | 2 +- public/language/hr/global.json | 2 +- public/language/hu/global.json | 2 +- public/language/id/global.json | 2 +- public/language/it/global.json | 2 +- public/language/ja/global.json | 2 +- public/language/ko/global.json | 2 +- public/language/lt/global.json | 2 +- public/language/lv/global.json | 2 +- public/language/ms/global.json | 2 +- public/language/nb/global.json | 2 +- public/language/nl/global.json | 2 +- public/language/pl/global.json | 2 +- public/language/pt-BR/global.json | 2 +- public/language/pt-PT/global.json | 2 +- public/language/ro/global.json | 2 +- public/language/ru/global.json | 2 +- public/language/rw/global.json | 2 +- public/language/sc/global.json | 2 +- public/language/sk/global.json | 2 +- public/language/sl/global.json | 2 +- public/language/sr/global.json | 2 +- public/language/sv/global.json | 2 +- public/language/th/global.json | 2 +- public/language/tr/global.json | 2 +- public/language/uk/global.json | 2 +- public/language/vi/admin/settings/uploads.json | 2 +- public/language/vi/global.json | 2 +- public/language/vi/topic.json | 4 ++-- public/language/zh-CN/global.json | 2 +- public/language/zh-TW/global.json | 2 +- 53 files changed, 62 insertions(+), 62 deletions(-) diff --git a/public/language/ar/global.json b/public/language/ar/global.json index a9205b9dfd..7f93ee0e24 100644 --- a/public/language/ar/global.json +++ b/public/language/ar/global.json @@ -23,7 +23,7 @@ "close": "أغلق", "pagination": "الصفحات", "pagination.out_of": "%1 من %2", - "pagination.enter_index": "أدخل الرقم التسلسلي", + "pagination.enter_index": "Go to post index", "header.admin": "مدير النظام", "header.categories": "الأقسام", "header.recent": "حديث", diff --git a/public/language/bg/global.json b/public/language/bg/global.json index 87aa5c7190..545e1eaa9b 100644 --- a/public/language/bg/global.json +++ b/public/language/bg/global.json @@ -23,7 +23,7 @@ "close": "Затваряне", "pagination": "Странициране", "pagination.out_of": "%1 от %2", - "pagination.enter_index": "Въведете номер", + "pagination.enter_index": "Към публикация номер", "header.admin": "Администратор", "header.categories": "Категории", "header.recent": "Скорошни", diff --git a/public/language/bg/topic.json b/public/language/bg/topic.json index 25b84d4100..f11bd6eec8 100644 --- a/public/language/bg/topic.json +++ b/public/language/bg/topic.json @@ -181,7 +181,7 @@ "timeago_earlier": "%1 по-рано", "first-post": "Първа публикация", "last-post": "Последна публикация", - "go-to-my-next-post": "Go to my next post", - "no-more-next-post": "You don't have more posts in this topic", + "go-to-my-next-post": "Към следващата ми публикация", + "no-more-next-post": "Нямате повече публикации в тази тема", "post-quick-reply": "Пускане на бърза публикация" } \ No newline at end of file diff --git a/public/language/bn/global.json b/public/language/bn/global.json index b4035b3f5f..a38ab65901 100644 --- a/public/language/bn/global.json +++ b/public/language/bn/global.json @@ -23,7 +23,7 @@ "close": "বন্ধ", "pagination": "পাতা নং", "pagination.out_of": "%2 এর মাঝে %1", - "pagination.enter_index": "সূচক লিখুন", + "pagination.enter_index": "Go to post index", "header.admin": "অ্যাডমিন", "header.categories": "বিভাগ", "header.recent": "সাম্প্রতিক", diff --git a/public/language/cs/global.json b/public/language/cs/global.json index 2c4ff54a80..73dfef6204 100644 --- a/public/language/cs/global.json +++ b/public/language/cs/global.json @@ -23,7 +23,7 @@ "close": "Zrušit", "pagination": "Stránkování", "pagination.out_of": "%1 z %2", - "pagination.enter_index": "Zadejte index", + "pagination.enter_index": "Go to post index", "header.admin": "Administrace", "header.categories": "Kategorie", "header.recent": "Nejnovější", diff --git a/public/language/da/global.json b/public/language/da/global.json index 4f05e26e39..b3815b94f2 100644 --- a/public/language/da/global.json +++ b/public/language/da/global.json @@ -23,7 +23,7 @@ "close": "Luk", "pagination": "Sidetal", "pagination.out_of": "%1 ud af %2", - "pagination.enter_index": "Indtast indeks", + "pagination.enter_index": "Go to post index", "header.admin": "Administrator", "header.categories": "Kategorier", "header.recent": "Seneste", diff --git a/public/language/de/global.json b/public/language/de/global.json index 7b54201cd5..f33f212f05 100644 --- a/public/language/de/global.json +++ b/public/language/de/global.json @@ -23,7 +23,7 @@ "close": "Schließen", "pagination": "Seitennummerierung", "pagination.out_of": "%1 von %2", - "pagination.enter_index": "Seitenzahl eingeben", + "pagination.enter_index": "Go to post index", "header.admin": "Admin", "header.categories": "Kategorien", "header.recent": "Aktuell", diff --git a/public/language/el/global.json b/public/language/el/global.json index 9e07313feb..5d5797c1bf 100644 --- a/public/language/el/global.json +++ b/public/language/el/global.json @@ -23,7 +23,7 @@ "close": "Κλείσιμο", "pagination": "Σελιδοποίηση", "pagination.out_of": "%1 από %2", - "pagination.enter_index": "Εισαγωγή Σελίδας", + "pagination.enter_index": "Go to post index", "header.admin": "Διαχειριστής", "header.categories": "Κατηγορίες", "header.recent": "Πρόσφατα", diff --git a/public/language/en-US/global.json b/public/language/en-US/global.json index 029ca874bf..9cb37d6e1a 100644 --- a/public/language/en-US/global.json +++ b/public/language/en-US/global.json @@ -23,7 +23,7 @@ "close": "Close", "pagination": "Pagination", "pagination.out_of": "%1 out of %2", - "pagination.enter_index": "Enter index", + "pagination.enter_index": "Go to post index", "header.admin": "Admin", "header.categories": "Categories", "header.recent": "Recent", diff --git a/public/language/en-x-pirate/global.json b/public/language/en-x-pirate/global.json index 188018fdd1..eaec53c49a 100644 --- a/public/language/en-x-pirate/global.json +++ b/public/language/en-x-pirate/global.json @@ -23,7 +23,7 @@ "close": "Shoot down", "pagination": "Pagination", "pagination.out_of": "%1 out of %2", - "pagination.enter_index": "Enter index", + "pagination.enter_index": "Go to post index", "header.admin": "Captains only", "header.categories": "Categories", "header.recent": "Recent", diff --git a/public/language/es/global.json b/public/language/es/global.json index 70e2d4a9dd..7cf340dc3f 100644 --- a/public/language/es/global.json +++ b/public/language/es/global.json @@ -23,7 +23,7 @@ "close": "Cerrar", "pagination": "Paginación", "pagination.out_of": "%1 de %2", - "pagination.enter_index": "Introduzca el número", + "pagination.enter_index": "Go to post index", "header.admin": "Administración", "header.categories": "Categorías", "header.recent": "Recientes", diff --git a/public/language/et/global.json b/public/language/et/global.json index cf7d910806..3673db366b 100644 --- a/public/language/et/global.json +++ b/public/language/et/global.json @@ -23,7 +23,7 @@ "close": "Sulge", "pagination": "Lehekülgede numeratsioon", "pagination.out_of": "%1 kõigist %2-st", - "pagination.enter_index": "Sisetage indeks", + "pagination.enter_index": "Go to post index", "header.admin": "Admin", "header.categories": "Kategooriad", "header.recent": "Hiljutised", diff --git a/public/language/fa-IR/global.json b/public/language/fa-IR/global.json index 5350a2ee54..5ccbedb8d5 100644 --- a/public/language/fa-IR/global.json +++ b/public/language/fa-IR/global.json @@ -23,7 +23,7 @@ "close": "بستن", "pagination": "صفحه‌بندی", "pagination.out_of": "%1 از %2", - "pagination.enter_index": "شماره را وارد کنید", + "pagination.enter_index": "Go to post index", "header.admin": "مدیر", "header.categories": "دسته‌بندی‌ها", "header.recent": "تازه‌ها", diff --git a/public/language/fi/global.json b/public/language/fi/global.json index ad0a856b76..f4a9973905 100644 --- a/public/language/fi/global.json +++ b/public/language/fi/global.json @@ -23,7 +23,7 @@ "close": "Sulje", "pagination": "Sivutus", "pagination.out_of": "%1/%2", - "pagination.enter_index": "Syötä indeksi", + "pagination.enter_index": "Go to post index", "header.admin": "Ylläpitäjä", "header.categories": "Kategoriat", "header.recent": "Viimeisimmät", diff --git a/public/language/fr/global.json b/public/language/fr/global.json index 533b1b73d1..18c9a152b2 100644 --- a/public/language/fr/global.json +++ b/public/language/fr/global.json @@ -23,7 +23,7 @@ "close": "Fermer", "pagination": "Pagination", "pagination.out_of": "%1 sur %2", - "pagination.enter_index": "Entrer un numéro de page", + "pagination.enter_index": "Go to post index", "header.admin": "Admin", "header.categories": "Catégories", "header.recent": "Récent", diff --git a/public/language/gl/global.json b/public/language/gl/global.json index 12ff5d51f3..29a24d7cca 100644 --- a/public/language/gl/global.json +++ b/public/language/gl/global.json @@ -23,7 +23,7 @@ "close": "Pechar ", "pagination": "Paxinación", "pagination.out_of": "%1 de %2", - "pagination.enter_index": "Introduce unha referencia", + "pagination.enter_index": "Go to post index", "header.admin": "Admin", "header.categories": "Categorías", "header.recent": "Recentes", diff --git a/public/language/he/admin/admin.json b/public/language/he/admin/admin.json index 4e37a15c95..a8b9f1af40 100644 --- a/public/language/he/admin/admin.json +++ b/public/language/he/admin/admin.json @@ -4,8 +4,8 @@ "acp-title": "%1 | לוח בקרה למנהל NodeBB", "settings-header-contents": "תוכן", - "changes-saved": "Changes Saved", - "changes-saved-message": "Your changes to the NodeBB configuration have been saved.", - "changes-not-saved": "Changes Not Saved", - "changes-not-saved-message": "NodeBB encountered a problem saving your changes. (%1)" + "changes-saved": "שינויים שנשמרו", + "changes-saved-message": "השינויים שלך בתצורת NodeBB נשמרו.", + "changes-not-saved": "השינויים לא נשמרו", + "changes-not-saved-message": "NodeBB נתקל בעיה בשמירת השינויים שלך. (%1)" } \ No newline at end of file diff --git a/public/language/he/admin/settings/advanced.json b/public/language/he/admin/settings/advanced.json index 86f3267f11..67ac61d90e 100644 --- a/public/language/he/admin/settings/advanced.json +++ b/public/language/he/admin/settings/advanced.json @@ -13,7 +13,7 @@ "headers.acao-help": "כדי למנוע גישה לכל האתרים, השאר ריק", "headers.acao-regex-help": "הכנס תבנית טקסט (Regex) כאן כדי לאפשר קריאה דינאמית מאתרים חיצוניים. אם ברצונך לחסום כל גישה חיצונית, השאר ריק.", "headers.acac": "אתרים אשר אל בקשות אליהם, יתווספו גם נתוני כניסה כגוןCookie וכו'. ( Access-Control-Allow-Credentials)", - "headers.acam": "Access-Control-Allow-Methods", + "headers.acam": "שיטות אפשריות בבקרת גישה", "headers.acah": "Access-Control-Allow-Headers", "headers.coep": "Cross-Origin-Embedder-Policy", "headers.coep-help": "When enabled (default), will set the header to require-corp", diff --git a/public/language/he/global.json b/public/language/he/global.json index 5ca8d625b3..5695c66530 100644 --- a/public/language/he/global.json +++ b/public/language/he/global.json @@ -23,7 +23,7 @@ "close": "סגור", "pagination": "הגדרות עמוד", "pagination.out_of": "%1 מתוך %2", - "pagination.enter_index": "הכניסו אינדקס", + "pagination.enter_index": "Go to post index", "header.admin": "ניהול", "header.categories": "קטגוריות", "header.recent": "פוסטים אחרונים", diff --git a/public/language/he/modules.json b/public/language/he/modules.json index 7f88bbba95..66c91ba452 100644 --- a/public/language/he/modules.json +++ b/public/language/he/modules.json @@ -1,6 +1,6 @@ { "chat.chatting_with": "שוחח עם", - "chat.placeholder": "Type chat message here, drag & drop images, press enter to send", + "chat.placeholder": "הקלד את הודעת הצ'אט כאן, ניתן לגרור ולשחרר תמונות, בסיום הקש אנטר כדי לשלוח.", "chat.scroll-up-alert": "אתה מסתכל על הודעות ישנות. לחץ כאן למעבר להודעה האחרונה.", "chat.send": "שלח", "chat.no_active": "אין לך צ'אטים פעילים", @@ -68,8 +68,8 @@ "bootbox.ok": "אישור", "bootbox.cancel": "בטל", "bootbox.confirm": "אשר", - "bootbox.submit": "Submit", - "bootbox.send": "Send", + "bootbox.submit": "שליחה", + "bootbox.send": "שלח", "cover.dragging_title": "מיקום תמונת נושא", "cover.dragging_message": "גרור תמונת נושא למיקום הרצוי ולחץ על \"שמור\"", "cover.saved": "תמונת הנושא והמיקום נשמר", diff --git a/public/language/he/post-queue.json b/public/language/he/post-queue.json index d19745d77d..21d9b2921d 100644 --- a/public/language/he/post-queue.json +++ b/public/language/he/post-queue.json @@ -15,7 +15,7 @@ "topic": "נושא", "accept": "אשר", "reject": "דחה", - "remove": "Remove", + "remove": "הסרה", "notify": "Notify", - "notify-user": "Notify User" + "notify-user": "שלח התראה למשתמש" } \ No newline at end of file diff --git a/public/language/he/user.json b/public/language/he/user.json index bff782998a..1c065dd3d8 100644 --- a/public/language/he/user.json +++ b/public/language/he/user.json @@ -184,7 +184,7 @@ "consent.export_posts": "יצוא פוסטים (CVS.)", "consent.export-posts-success": "ייצוא הפוסטים מתבצע כעת. תקבל התראה כאשר הייצוא יסתיים.", "emailUpdate.intro": "אנא הכנס את כתובת הדוא\"ל שלך. הפורום משתמש בדוא\"ל שלך לשליחת תקציר מתוזמן והתראות, כמו כן לשחזור חשבון במקרה ששוכחים את הסיסמה.", - "emailUpdate.optional": "This field is optional. You are not obligated to provide your email address, but without a validated email you will not be able to recover your account or login with your email.", - "emailUpdate.required": "This field is required.", + "emailUpdate.optional": "שדה זה הוא אופציונלי. אינך מחויב לספק את כתובת הדוא\"ל שלך, אך ללא דוא\"ל מאומת לא תוכל לשחזר את חשבונך או להתחבר באמצעות הדוא\"ל שלך.", + "emailUpdate.required": "זהו שדה חובה", "emailUpdate.change-instructions": "מייל אימות יישלח לכתובת דוא\"ל שהכנסת עם קישור ייחודי. לחיצה על הקישור יאמת את בעלותך על הדוא\"ל ותקבל גישה לחשבונך. בכל זמן, תוכל לעדכן את כתובת הדוא\"ל שלך בדף החשבון שלך." } \ No newline at end of file diff --git a/public/language/he/users.json b/public/language/he/users.json index 4200448b7c..459dfa1d61 100644 --- a/public/language/he/users.json +++ b/public/language/he/users.json @@ -5,7 +5,7 @@ "most_flags": "הכי הרבה דיווחי משתמשים", "search": "חיפוש", "enter_username": "הכנס שם משתמש לחיפוש", - "search-user-for-chat": "Search a user to start chat", + "search-user-for-chat": "חפש משתמש כדי להתחיל איתו צאט", "load_more": "טען עוד", "users-found-search-took": "%1 משתמשים נמצאו! החיפוש ערך %2 שניות.", "filter-by": "פלטר על-פי", diff --git a/public/language/hr/global.json b/public/language/hr/global.json index 2409238471..f673e499f4 100644 --- a/public/language/hr/global.json +++ b/public/language/hr/global.json @@ -23,7 +23,7 @@ "close": "Zatvori", "pagination": "Stranice", "pagination.out_of": "%1 od %2", - "pagination.enter_index": "Unesi index", + "pagination.enter_index": "Go to post index", "header.admin": "Admin", "header.categories": "Kategorije", "header.recent": "Posljednje", diff --git a/public/language/hu/global.json b/public/language/hu/global.json index 74150e826a..fd340e9ed6 100644 --- a/public/language/hu/global.json +++ b/public/language/hu/global.json @@ -23,7 +23,7 @@ "close": "Bezárás", "pagination": "Lapozás", "pagination.out_of": "%1 / %2", - "pagination.enter_index": "Írj be egy számot", + "pagination.enter_index": "Go to post index", "header.admin": "Admin", "header.categories": "Kategóriák", "header.recent": "Legutóbbi", diff --git a/public/language/id/global.json b/public/language/id/global.json index d195d1b458..17706017db 100644 --- a/public/language/id/global.json +++ b/public/language/id/global.json @@ -23,7 +23,7 @@ "close": "Tutup", "pagination": "Halaman", "pagination.out_of": "%1 dari %2", - "pagination.enter_index": "Masukkan index", + "pagination.enter_index": "Go to post index", "header.admin": "Admin", "header.categories": "Kategori", "header.recent": "Terbaru", diff --git a/public/language/it/global.json b/public/language/it/global.json index de920881c3..2064486bfd 100644 --- a/public/language/it/global.json +++ b/public/language/it/global.json @@ -23,7 +23,7 @@ "close": "Chiudi", "pagination": "Impaginazione", "pagination.out_of": "%1 di %2", - "pagination.enter_index": "Inserisci un numero di pagina", + "pagination.enter_index": "Go to post index", "header.admin": "Amministratore", "header.categories": "Categorie", "header.recent": "Recenti", diff --git a/public/language/ja/global.json b/public/language/ja/global.json index 79abf1cf83..5803512829 100644 --- a/public/language/ja/global.json +++ b/public/language/ja/global.json @@ -23,7 +23,7 @@ "close": "閉じる", "pagination": "ページ", "pagination.out_of": "%2件中%1件目", - "pagination.enter_index": "Enter index", + "pagination.enter_index": "Go to post index", "header.admin": "管理", "header.categories": "カテゴリ", "header.recent": "最近", diff --git a/public/language/ko/global.json b/public/language/ko/global.json index ec2f1cf2f1..6e1fb5b669 100644 --- a/public/language/ko/global.json +++ b/public/language/ko/global.json @@ -23,7 +23,7 @@ "close": "닫기", "pagination": "페이지", "pagination.out_of": "현재: %1 / 전체: %2", - "pagination.enter_index": "이동할 포스트 번호 입력", + "pagination.enter_index": "Go to post index", "header.admin": "관리자", "header.categories": "카테고리", "header.recent": "최근", diff --git a/public/language/lt/global.json b/public/language/lt/global.json index a06519ea93..00a6bde041 100644 --- a/public/language/lt/global.json +++ b/public/language/lt/global.json @@ -23,7 +23,7 @@ "close": "Uždaryti", "pagination": "Numeracija", "pagination.out_of": "%1 iš %2", - "pagination.enter_index": "Įrašykite indeksą", + "pagination.enter_index": "Go to post index", "header.admin": "Administratorius", "header.categories": "Kategorijos", "header.recent": "Naujausi", diff --git a/public/language/lv/global.json b/public/language/lv/global.json index 9b26c4db9b..85848c8caf 100644 --- a/public/language/lv/global.json +++ b/public/language/lv/global.json @@ -23,7 +23,7 @@ "close": "Aizvērt", "pagination": "Dalīšana pa lapām", "pagination.out_of": "%1 no %2", - "pagination.enter_index": "Ievadīt numuru", + "pagination.enter_index": "Go to post index", "header.admin": "Administrācija", "header.categories": "Kategorijas", "header.recent": "Nesenie", diff --git a/public/language/ms/global.json b/public/language/ms/global.json index 7c19ebea3a..fb5d0a418c 100644 --- a/public/language/ms/global.json +++ b/public/language/ms/global.json @@ -23,7 +23,7 @@ "close": "Tutup", "pagination": "Mukasurat", "pagination.out_of": "%1 daripada %2", - "pagination.enter_index": "Masukkan indeks", + "pagination.enter_index": "Go to post index", "header.admin": "Pentadbir", "header.categories": "Kategori", "header.recent": "Terkini", diff --git a/public/language/nb/global.json b/public/language/nb/global.json index db3a528802..a1ae5a4246 100644 --- a/public/language/nb/global.json +++ b/public/language/nb/global.json @@ -23,7 +23,7 @@ "close": "Lukk", "pagination": "Paginering", "pagination.out_of": "%1 ut av %2", - "pagination.enter_index": "Skriv indeks", + "pagination.enter_index": "Go to post index", "header.admin": "Admin", "header.categories": "Kategorier", "header.recent": "Seneste", diff --git a/public/language/nl/global.json b/public/language/nl/global.json index 11e43a68b0..16de8cfe8e 100644 --- a/public/language/nl/global.json +++ b/public/language/nl/global.json @@ -23,7 +23,7 @@ "close": "Sluiten", "pagination": "Paginering", "pagination.out_of": "%1 van %2", - "pagination.enter_index": "Vul index in", + "pagination.enter_index": "Go to post index", "header.admin": "Beheer", "header.categories": "Categorieën", "header.recent": "Recent", diff --git a/public/language/pl/global.json b/public/language/pl/global.json index 7d741ff85a..4a096c650b 100644 --- a/public/language/pl/global.json +++ b/public/language/pl/global.json @@ -23,7 +23,7 @@ "close": "Zamknij", "pagination": "Numerowanie stron", "pagination.out_of": "%1 z %2", - "pagination.enter_index": "Wpisz indeks.", + "pagination.enter_index": "Go to post index", "header.admin": "Administracja", "header.categories": "Kategorie", "header.recent": "Ostatnie", diff --git a/public/language/pt-BR/global.json b/public/language/pt-BR/global.json index 0924675e72..642255b20d 100644 --- a/public/language/pt-BR/global.json +++ b/public/language/pt-BR/global.json @@ -23,7 +23,7 @@ "close": "Fechar", "pagination": "Paginação", "pagination.out_of": "%1 de %2", - "pagination.enter_index": "Digite o índice", + "pagination.enter_index": "Go to post index", "header.admin": "Admin", "header.categories": "Categorias", "header.recent": "Recente", diff --git a/public/language/pt-PT/global.json b/public/language/pt-PT/global.json index ec4d7699f3..1fa4b002ae 100644 --- a/public/language/pt-PT/global.json +++ b/public/language/pt-PT/global.json @@ -23,7 +23,7 @@ "close": "Fechar", "pagination": "Paginação", "pagination.out_of": "%1 de %2", - "pagination.enter_index": "Introduz o index", + "pagination.enter_index": "Go to post index", "header.admin": "Administrador", "header.categories": "Categorias", "header.recent": "Recentes", diff --git a/public/language/ro/global.json b/public/language/ro/global.json index 18001ec1cf..ebfa75e87f 100644 --- a/public/language/ro/global.json +++ b/public/language/ro/global.json @@ -23,7 +23,7 @@ "close": "Închide", "pagination": "Paginație", "pagination.out_of": "%1 din %2", - "pagination.enter_index": "Introdu index", + "pagination.enter_index": "Go to post index", "header.admin": "Admin", "header.categories": "Categorii", "header.recent": "Recente", diff --git a/public/language/ru/global.json b/public/language/ru/global.json index 3ac793b3bf..7cce07e5fe 100644 --- a/public/language/ru/global.json +++ b/public/language/ru/global.json @@ -23,7 +23,7 @@ "close": "Закрыть", "pagination": "Разбивка на страницы", "pagination.out_of": "%1 из %2", - "pagination.enter_index": "Перейти на...", + "pagination.enter_index": "Go to post index", "header.admin": "Админка", "header.categories": "Категории", "header.recent": "Последние", diff --git a/public/language/rw/global.json b/public/language/rw/global.json index 532188b2d3..8416897c52 100644 --- a/public/language/rw/global.json +++ b/public/language/rw/global.json @@ -23,7 +23,7 @@ "close": "Funga", "pagination": "Umubare wa Paji", "pagination.out_of": "%1 muri %2", - "pagination.enter_index": "Shyiramo umubare", + "pagination.enter_index": "Go to post index", "header.admin": "Ubuyobozi", "header.categories": "Ibyiciro", "header.recent": "Ibiheruka", diff --git a/public/language/sc/global.json b/public/language/sc/global.json index 43c0fd3a9b..2fe64fec86 100644 --- a/public/language/sc/global.json +++ b/public/language/sc/global.json @@ -23,7 +23,7 @@ "close": "Serra", "pagination": "Paginatzione", "pagination.out_of": "%1 out of %2", - "pagination.enter_index": "Enter index", + "pagination.enter_index": "Go to post index", "header.admin": "Amministradore", "header.categories": "Categories", "header.recent": "Ùrtimos", diff --git a/public/language/sk/global.json b/public/language/sk/global.json index d3a468c8c1..06ee020b42 100644 --- a/public/language/sk/global.json +++ b/public/language/sk/global.json @@ -23,7 +23,7 @@ "close": "Zatvoriť", "pagination": "Stránkovanie", "pagination.out_of": "%1 z %2", - "pagination.enter_index": "Zadajte záznam", + "pagination.enter_index": "Go to post index", "header.admin": "Správca", "header.categories": "Kategórie", "header.recent": "Nedávne", diff --git a/public/language/sl/global.json b/public/language/sl/global.json index 28006cfc21..ebea071723 100644 --- a/public/language/sl/global.json +++ b/public/language/sl/global.json @@ -23,7 +23,7 @@ "close": "Zapri", "pagination": "Oštevilčenje strani", "pagination.out_of": "%1 od %2", - "pagination.enter_index": "Vnesi številko", + "pagination.enter_index": "Go to post index", "header.admin": "Skrbnik", "header.categories": "Kategorije", "header.recent": "Nedavno", diff --git a/public/language/sr/global.json b/public/language/sr/global.json index c6073e81fd..e696ef72f1 100644 --- a/public/language/sr/global.json +++ b/public/language/sr/global.json @@ -23,7 +23,7 @@ "close": "Затвори", "pagination": "Нумерисање страница", "pagination.out_of": "%1 од %2", - "pagination.enter_index": "Унесите индекс", + "pagination.enter_index": "Go to post index", "header.admin": "Админ", "header.categories": "Категорије", "header.recent": "Недавно", diff --git a/public/language/sv/global.json b/public/language/sv/global.json index f14fe0afbd..b030cada5d 100644 --- a/public/language/sv/global.json +++ b/public/language/sv/global.json @@ -23,7 +23,7 @@ "close": "Stäng", "pagination": "Siduppdelning", "pagination.out_of": "%1 av %2", - "pagination.enter_index": "Skriv in index ", + "pagination.enter_index": "Go to post index", "header.admin": "Admin", "header.categories": "Kategorier", "header.recent": "Senaste", diff --git a/public/language/th/global.json b/public/language/th/global.json index 8b8bd12fd1..21cad1c9c3 100644 --- a/public/language/th/global.json +++ b/public/language/th/global.json @@ -23,7 +23,7 @@ "close": "ปิด", "pagination": "การแบ่งหน้า", "pagination.out_of": "%1 จาก %2", - "pagination.enter_index": "กรอกหมายเลข", + "pagination.enter_index": "Go to post index", "header.admin": "ผู้ดูแลระบบ", "header.categories": "หมวดหมู่", "header.recent": "ล่าสุด", diff --git a/public/language/tr/global.json b/public/language/tr/global.json index 1e0e42dce3..f743ebc4bb 100644 --- a/public/language/tr/global.json +++ b/public/language/tr/global.json @@ -23,7 +23,7 @@ "close": "Kapat", "pagination": "Sayfalara numara koyma", "pagination.out_of": "%1 - %2", - "pagination.enter_index": "İndex gir", + "pagination.enter_index": "Go to post index", "header.admin": "Yönetim", "header.categories": "Kategoriler", "header.recent": "Güncel", diff --git a/public/language/uk/global.json b/public/language/uk/global.json index 42601de5db..4bc5e4d55e 100644 --- a/public/language/uk/global.json +++ b/public/language/uk/global.json @@ -23,7 +23,7 @@ "close": "Закрити", "pagination": "Розбиття на сторінки", "pagination.out_of": "%1 із %2", - "pagination.enter_index": "Уведіть номер", + "pagination.enter_index": "Go to post index", "header.admin": "Адмін", "header.categories": "Категорії", "header.recent": "Недавні", diff --git a/public/language/vi/admin/settings/uploads.json b/public/language/vi/admin/settings/uploads.json index f22d0b3b53..7a8fadf405 100644 --- a/public/language/vi/admin/settings/uploads.json +++ b/public/language/vi/admin/settings/uploads.json @@ -2,7 +2,7 @@ "posts": "Bài Đăng", "private": "Đặt tệp tải lên ở chế độ riêng tư", "strip-exif-data": "Tách Dữ Liệu EXIF", - "preserve-orphaned-uploads": "Keep uploaded files on disk after a post is purged", + "preserve-orphaned-uploads": "Giữ các tệp đã tải lên trên đĩa sau khi bài đăng được xóa", "private-extensions": "Phần mở rộng tệp để đặt ở chế độ riêng tư", "private-uploads-extensions-help": "Nhập danh sách phần mở rộng tệp tại đây phân tách bằng dấu phẩy để đặt ở chế độ riêng tư (VD: pdf,xls,doc). Để trống có nghĩa là mọi tệp đều riêng tư.", "resize-image-width-threshold": "Chỉnh kích cỡ ảnh nếu chúng rộng hơn chiều rộng đã đặt", diff --git a/public/language/vi/global.json b/public/language/vi/global.json index bc9a48332a..ddce58282d 100644 --- a/public/language/vi/global.json +++ b/public/language/vi/global.json @@ -23,7 +23,7 @@ "close": "Đóng", "pagination": "Phân trang", "pagination.out_of": "%1 trong số %2", - "pagination.enter_index": "Nhập chỉ mục", + "pagination.enter_index": "Đi đến chỉ mục bài đăng", "header.admin": "Quản trị viên", "header.categories": "Chuyên mục", "header.recent": "Gần đây", diff --git a/public/language/vi/topic.json b/public/language/vi/topic.json index 7a0a20dd17..93da4be69f 100644 --- a/public/language/vi/topic.json +++ b/public/language/vi/topic.json @@ -181,7 +181,7 @@ "timeago_earlier": "%1 trước đó", "first-post": "Bài viết đầu tiên", "last-post": "Bài viết cuối cùng", - "go-to-my-next-post": "Go to my next post", - "no-more-next-post": "You don't have more posts in this topic", + "go-to-my-next-post": "Đi tới bài kế tiếp của tôi", + "no-more-next-post": "Bạn không có bài viết nào khác trong chủ đề này", "post-quick-reply": "Đăng trả lời nhanh" } \ No newline at end of file diff --git a/public/language/zh-CN/global.json b/public/language/zh-CN/global.json index 1ac52ce361..26ecd2cd89 100644 --- a/public/language/zh-CN/global.json +++ b/public/language/zh-CN/global.json @@ -23,7 +23,7 @@ "close": "关闭", "pagination": "分页", "pagination.out_of": "%1 / %2", - "pagination.enter_index": "输入索引", + "pagination.enter_index": "Go to post index", "header.admin": "管理", "header.categories": "版块", "header.recent": "最新", diff --git a/public/language/zh-TW/global.json b/public/language/zh-TW/global.json index 315e195d8b..bc492eda30 100644 --- a/public/language/zh-TW/global.json +++ b/public/language/zh-TW/global.json @@ -23,7 +23,7 @@ "close": "關閉", "pagination": "分頁", "pagination.out_of": "%1 / %2", - "pagination.enter_index": "輸入索引", + "pagination.enter_index": "Go to post index", "header.admin": "管理", "header.categories": "版面", "header.recent": "最新", From 5321ba4d71398d4b81cdd99fcaa6b12dafdd57d2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 17 Feb 2022 05:17:27 +0000 Subject: [PATCH 10/79] chore(deps): bump express from 4.17.2 to 4.17.3 in /install Bumps [express](https://github.com/expressjs/express) from 4.17.2 to 4.17.3. - [Release notes](https://github.com/expressjs/express/releases) - [Changelog](https://github.com/expressjs/express/blob/master/History.md) - [Commits](https://github.com/expressjs/express/compare/4.17.2...4.17.3) --- updated-dependencies: - dependency-name: express dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- install/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/package.json b/install/package.json index c0249a1b42..98ca0c670b 100644 --- a/install/package.json +++ b/install/package.json @@ -57,7 +57,7 @@ "csurf": "1.11.0", "daemon": "1.1.0", "diff": "5.0.0", - "express": "4.17.2", + "express": "4.17.3", "express-session": "1.17.2", "express-useragent": "1.0.15", "graceful-fs": "4.2.9", From 3acd2ac8505cfdb54bc666a1d231f27fea661f74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Thu, 17 Feb 2022 11:19:43 -0500 Subject: [PATCH 11/79] refactor: wrap around if at end remove debug log dont focus input on mobile --- public/src/modules/navigator.js | 7 ++++--- src/socket.io/topics.js | 10 +++++++++- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/public/src/modules/navigator.js b/public/src/modules/navigator.js index 88e76e9b7a..824f55434a 100644 --- a/public/src/modules/navigator.js +++ b/public/src/modules/navigator.js @@ -56,7 +56,9 @@ define('navigator', ['forum/pagination', 'components', 'hooks', 'alerts'], funct paginationBlockEl.off('shown.bs.dropdown', '.wrapper').on('shown.bs.dropdown', '.wrapper', function () { setTimeout(async function () { - $('.pagination-block input').focus(); + if (utils.findBootstrapEnvironment() === 'lg') { + $('.pagination-block input').focus(); + } const postCountInTopic = await socket.emit('topics.getPostCountInTopic', ajaxify.data.tid); if (postCountInTopic > 0) { paginationBlockEl.find('#myNextPostBtn').removeAttr('disabled'); @@ -107,10 +109,9 @@ define('navigator', ['forum/pagination', 'components', 'hooks', 'alerts'], funct if (ajaxify.data.template.topic) { let nextIndex = await getNext(index); if (lastNextIndex === nextIndex) { // handles last post in pagination - console.log('fail', nextIndex, lastNextIndex); nextIndex = await getNext(nextIndex); } - if (nextIndex) { + if (nextIndex && index !== nextIndex + 1) { lastNextIndex = nextIndex; $(window).one('action:ajaxify.end', function () { if (paginationBlockEl.find('.dropdown-menu').is(':hidden')) { diff --git a/src/socket.io/topics.js b/src/socket.io/topics.js index c69bb63f3f..4183063b1f 100644 --- a/src/socket.io/topics.js +++ b/src/socket.io/topics.js @@ -88,13 +88,21 @@ SocketTopics.getMyNextPostIndex = async function (socket, data) { cache.set(cacheKey, pids, 30000); return pids; } - + const postCountInTopic = await db.sortedSetScore(`tid:${data.tid}:posters`, socket.uid); + if (postCountInTopic <= 0) { + return 0; + } const [topicPids, userPidsInCategory] = await Promise.all([ getTopicPids(data.index), getUserPids(), ]); const userPidsInTopic = _.intersection(topicPids, userPidsInCategory); if (!userPidsInTopic.length) { + if (postCountInTopic > 0) { + // wrap around to beginning + const wrapIndex = await SocketTopics.getMyNextPostIndex(socket, { ...data, index: 1 }); + return wrapIndex; + } return 0; } return await posts.getPidIndex(userPidsInTopic[0], data.tid, data.sort); From 4164898d85340bde8a7778d7ed5e63c8af16091a Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Thu, 17 Feb 2022 12:30:03 -0500 Subject: [PATCH 12/79] fix: regression caused by 94b79ce4024f72a3eee2cfa06b05d8f66898149f `./nodebb setup` was no longer able to be called without arguments or env vars --- src/install.js | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/src/install.js b/src/install.js index f9f7912d9f..9afa1b54f9 100644 --- a/src/install.js +++ b/src/install.js @@ -47,7 +47,7 @@ questions.optional = [ ]; function checkSetupFlagEnv() { - let setupVal = install.values || {}; + let setupVal = install.values; const envConfMap = { NODEBB_URL: 'url', @@ -65,17 +65,21 @@ function checkSetupFlagEnv() { }; // Set setup values from env vars (if set) - winston.info('[install/checkSetupFlagEnv] checking env vars for setup info...'); - - Object.entries(process.env).forEach(([evName, evValue]) => { // get setup values from env - if (evName.startsWith('NODEBB_DB_')) { - setupVal[`${process.env.NODEBB_DB}:${envConfMap[evName]}`] = evValue; - } else if (evName.startsWith('NODEBB_')) { - setupVal[envConfMap[evName]] = evValue; - } - }); + const envKeys = Object.keys(process.env); + if (Object.keys(envConfMap).some(key => envKeys.includes(key))) { + winston.info('[install/checkSetupFlagEnv] checking env vars for setup info...'); + setupVal = setupVal || {}; + + Object.entries(process.env).forEach(([evName, evValue]) => { // get setup values from env + if (evName.startsWith('NODEBB_DB_')) { + setupVal[`${process.env.NODEBB_DB}:${envConfMap[evName]}`] = evValue; + } else if (evName.startsWith('NODEBB_')) { + setupVal[envConfMap[evName]] = evValue; + } + }); - setupVal['admin:password:confirm'] = setupVal['admin:password']; + setupVal['admin:password:confirm'] = setupVal['admin:password']; + } // try to get setup values from json, if successful this overwrites all values set by env // TODO: better behaviour would be to support overrides per value, i.e. in order of priority (generic pattern): From 0e30362b2c6534c0096d8e8b81f9034d023ea94f Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 17 Feb 2022 13:19:52 -0500 Subject: [PATCH 13/79] fix(deps): update dependency nodebb-plugin-dbsearch to v5.1.2 (#10313) Co-authored-by: Renovate Bot --- install/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/package.json b/install/package.json index 98ca0c670b..b475c13514 100644 --- a/install/package.json +++ b/install/package.json @@ -87,7 +87,7 @@ "nconf": "0.11.3", "nodebb-plugin-2factor": "3.0.4", "nodebb-plugin-composer-default": "7.0.20", - "nodebb-plugin-dbsearch": "5.1.1", + "nodebb-plugin-dbsearch": "5.1.2", "nodebb-plugin-emoji": "3.5.16", "nodebb-plugin-emoji-android": "2.0.5", "nodebb-plugin-markdown": "9.0.7", From 6e156daaf63703df17cd376bd1d2d752272b458f Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Thu, 17 Feb 2022 14:07:51 -0500 Subject: [PATCH 14/79] fix: don't load setup.json into nconf if setup.json doesn't exist --- install/web.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/install/web.js b/install/web.js index 8d5774326b..68b4ae5a7b 100644 --- a/install/web.js +++ b/install/web.js @@ -284,12 +284,15 @@ async function copyCSS() { async function loadDefaults() { const setupDefaultsPath = path.join(__dirname, '../setup.json'); try { - await fs.promises.access(setupDefaultsPath, fs.constants.F_OK + fs.constants.R_OK); + // eslint-disable-next-line no-bitwise + await fs.promises.access(setupDefaultsPath, fs.constants.F_OK | fs.constants.R_OK); } catch (err) { // setup.json not found or inaccessible, proceed with no defaults if (err.code !== 'ENOENT') { throw err; } + + return; } winston.info('[installer] Found setup.json, populating default values'); nconf.file({ From 17836f2a3a4708c5916d4361d3a278d17bdc2981 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Thu, 17 Feb 2022 14:10:24 -0500 Subject: [PATCH 15/79] Re-introduce lodash into src/package-install.js (#10315) * test: add failing test for if package.json is non-existant, fix tests' beforeEach method * Revert "fix: #10289, remove lodash dependency in src/cli/package-install.js" This reverts commit 81fa2e22bc954a9c1878b0529cceee03f0f3a87b. * fix: regression caused by 94b79ce4024f72a3eee2cfa06b05d8f66898149f `./nodebb setup` was no longer able to be called without arguments or env vars * fix: .updatePackageFile() throwing if no package.json * fix: removing unneeded code in src/cli/index.js that seemed to be used to handle cases where package.json was missing (initial install) ... However, as .updatePackageFile() now handled cases where there is no package.json, it should be ok to remove this code * fix: handle missing package.json or node_modules/ --- src/cli/index.js | 33 +++++++++++---------------------- src/cli/package-install.js | 27 ++++++++------------------- test/package-install.js | 11 +++++++++-- 3 files changed, 28 insertions(+), 43 deletions(-) diff --git a/src/cli/index.js b/src/cli/index.js index 0ed6b449fd..7b5670dc75 100644 --- a/src/cli/index.js +++ b/src/cli/index.js @@ -10,31 +10,18 @@ require('../../require-main'); const packageInstall = require('./package-install'); const { paths } = require('../constants'); -// check to make sure dependencies are installed try { - fs.accessSync(paths.currentPackage, fs.constants.R_OK); -} catch (e) { - if (e.code === 'ENOENT') { - console.warn('package.json not found.'); - console.log('Populating package.json...'); - - packageInstall.updatePackageFile(); - packageInstall.preserveExtraneousPlugins(); - - try { - fs.accessSync(path.join(paths.nodeModules, 'chalk/package.json'), fs.constants.R_OK); - - const chalk = require('chalk'); - console.log(chalk.green('OK')); - } catch (e) { - console.log('OK'); + fs.accessSync(paths.currentPackage, fs.constants.R_OK); // throw on missing package.json + try { // handle missing node_modules/ directory + fs.accessSync(paths.nodeModules, fs.constants.R_OK); + } catch (e) { + if (e.code === 'ENOENT') { + // run package installation just to sync up node_modules/ with existing package.json + packageInstall.installAll(); + } else { + throw e; } - } else { - throw e; } -} - -try { fs.accessSync(path.join(paths.nodeModules, 'semver/package.json'), fs.constants.R_OK); const semver = require('semver'); @@ -53,12 +40,14 @@ try { checkVersion('async'); checkVersion('commander'); checkVersion('chalk'); + checkVersion('lodash'); } catch (e) { if (['ENOENT', 'DEP_WRONG_VERSION', 'MODULE_NOT_FOUND'].includes(e.code)) { console.warn('Dependencies outdated or not yet installed.'); console.log('Installing them now...\n'); packageInstall.updatePackageFile(); + packageInstall.preserveExtraneousPlugins(); packageInstall.installAll(); const chalk = require('chalk'); diff --git a/src/cli/package-install.js b/src/cli/package-install.js index d5e99b16d4..e9ca4a2e44 100644 --- a/src/cli/package-install.js +++ b/src/cli/package-install.js @@ -1,6 +1,7 @@ 'use strict'; const path = require('path'); + const fs = require('fs'); const cproc = require('child_process'); @@ -17,34 +18,22 @@ function sortDependencies(dependencies) { }, {}); } -function merge(to, from) { - // Poor man's version of _.merge() - if (Object.values(from).every(val => typeof val !== 'object')) { - return Object.assign(to, from); - } - - Object.keys(from).forEach((key) => { - if (Object.getPrototypeOf(from[key]) === Object.prototype) { - to[key] = merge(to[key], from[key]); - } else { - to[key] = from[key]; - } - }); - - return to; -} - pkgInstall.updatePackageFile = () => { - let oldPackageContents = {}; + let oldPackageContents; try { oldPackageContents = JSON.parse(fs.readFileSync(paths.currentPackage, 'utf8')); } catch (e) { if (e.code !== 'ENOENT') { throw e; + } else { + // No local package.json, copy from install/package.json + fs.copyFileSync(paths.installPackage, paths.currentPackage); + return; } } + const _ = require('lodash'); const defaultPackageContents = JSON.parse(fs.readFileSync(paths.installPackage, 'utf8')); let dependencies = {}; @@ -59,7 +48,7 @@ pkgInstall.updatePackageFile = () => { // Sort dependencies alphabetically dependencies = sortDependencies({ ...dependencies, ...defaultPackageContents.dependencies }); - const packageContents = { ...merge(oldPackageContents, defaultPackageContents), dependencies, devDependencies }; + const packageContents = { ..._.merge(oldPackageContents, defaultPackageContents), dependencies, devDependencies }; fs.writeFileSync(paths.currentPackage, JSON.stringify(packageContents, null, 4)); }; diff --git a/test/package-install.js b/test/package-install.js index 0d31387df1..97d6041bae 100644 --- a/test/package-install.js +++ b/test/package-install.js @@ -23,12 +23,11 @@ describe('Package install lib', () => { // Move `install/package.json` and `package.json` out of the way for now await fs.copyFile(sourcePackagePath, path.resolve(__dirname, '../install/package.json.bak')); // safekeeping await fs.copyFile(packageFilePath, path.resolve(__dirname, '../package.json.bak')); // safekeeping - await fs.copyFile(sourcePackagePath, packageFilePath); // match files for testing }); beforeEach(async () => { await fs.copyFile(path.resolve(__dirname, '../install/package.json.bak'), sourcePackagePath); - await fs.copyFile(path.resolve(__dirname, '../package.json.bak'), packageFilePath); + await fs.copyFile(sourcePackagePath, packageFilePath); // match files for testing source = JSON.parse(await fs.readFile(sourcePackagePath)); current = JSON.parse(await fs.readFile(packageFilePath)); }); @@ -95,6 +94,14 @@ describe('Package install lib', () => { assert.strictEqual(updated.devDependencies.hasOwnProperty('expect'), false); }); + it('should handle if there is no package.json', async () => { + await fs.unlink(packageFilePath); + + pkgInstall.updatePackageFile(); + const updated = JSON.parse(await fs.readFile(packageFilePath, 'utf8')); + assert.deepStrictEqual(updated, source); + }); + after(async () => { // Clean up await fs.rename(path.resolve(__dirname, '../install/package.json.bak'), sourcePackagePath); From 32f693019bdf2c8989f49ee5ed5c2d2d0ddab062 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Thu, 17 Feb 2022 14:47:23 -0500 Subject: [PATCH 16/79] test: check contents of config.json in tests --- test/mocks/databasemock.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/test/mocks/databasemock.js b/test/mocks/databasemock.js index 414cb7cfdd..e3520378d2 100644 --- a/test/mocks/databasemock.js +++ b/test/mocks/databasemock.js @@ -26,6 +26,15 @@ winston.add(new winston.transports.Console({ ), })); +try { + const fs = require('fs'); + const configJSON = fs.readFileSync(path.join(__dirname, '../../config.json'), 'utf-8'); + console.log('configJSON', configJSON); +} catch (err) { + console.error(err.stack); + throw err; +} + nconf.file({ file: path.join(__dirname, '../../config.json') }); nconf.defaults({ base_dir: path.join(__dirname, '../..'), From 9db90a3098e3ddbe3520d67cf127b642bda20a29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Thu, 17 Feb 2022 15:11:24 -0500 Subject: [PATCH 17/79] test: log configJSON --- test/mocks/databasemock.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/mocks/databasemock.js b/test/mocks/databasemock.js index e3520378d2..28d2eae236 100644 --- a/test/mocks/databasemock.js +++ b/test/mocks/databasemock.js @@ -29,7 +29,8 @@ winston.add(new winston.transports.Console({ try { const fs = require('fs'); const configJSON = fs.readFileSync(path.join(__dirname, '../../config.json'), 'utf-8'); - console.log('configJSON', configJSON); + winston.info('configJSON'); + winston.info(configJSON); } catch (err) { console.error(err.stack); throw err; From 04900291dbc8cf878692a31e5c35f517dea04dbb Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 17 Feb 2022 19:26:31 -0500 Subject: [PATCH 18/79] fix(deps): update dependency nodebb-plugin-emoji to v3.5.17 (#10314) Co-authored-by: Renovate Bot --- install/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/package.json b/install/package.json index b475c13514..b72478e0b4 100644 --- a/install/package.json +++ b/install/package.json @@ -88,7 +88,7 @@ "nodebb-plugin-2factor": "3.0.4", "nodebb-plugin-composer-default": "7.0.20", "nodebb-plugin-dbsearch": "5.1.2", - "nodebb-plugin-emoji": "3.5.16", + "nodebb-plugin-emoji": "3.5.17", "nodebb-plugin-emoji-android": "2.0.5", "nodebb-plugin-markdown": "9.0.7", "nodebb-plugin-mentions": "3.0.5", From afd2993dfe0b7c0f03a3a7940bf57b47bf87f719 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 17 Feb 2022 19:27:49 -0500 Subject: [PATCH 19/79] fix(deps): update dependency mongodb to v4.4.0 (#10319) Co-authored-by: Renovate Bot --- install/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/package.json b/install/package.json index b72478e0b4..4203b9d608 100644 --- a/install/package.json +++ b/install/package.json @@ -79,7 +79,7 @@ "material-design-lite": "1.3.0", "mime": "3.0.0", "mkdirp": "1.0.4", - "mongodb": "4.3.1", + "mongodb": "4.4.0", "morgan": "1.10.0", "mousetrap": "1.6.5", "multiparty": "4.2.3", From 21913b5b192d4b5f4074a225e59844e6e1161b39 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 18 Feb 2022 05:26:54 +0000 Subject: [PATCH 20/79] chore(deps): bump prompt from 1.2.1 to 1.2.2 in /install Bumps [prompt](https://github.com/flatiron/prompt) from 1.2.1 to 1.2.2. - [Release notes](https://github.com/flatiron/prompt/releases) - [Changelog](https://github.com/flatiron/prompt/blob/master/CHANGELOG.md) - [Commits](https://github.com/flatiron/prompt/commits) --- updated-dependencies: - dependency-name: prompt dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- install/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/package.json b/install/package.json index 4203b9d608..8f514c1dbe 100644 --- a/install/package.json +++ b/install/package.json @@ -108,7 +108,7 @@ "pg-cursor": "2.7.3", "postcss": "8.4.6", "postcss-clean": "1.2.0", - "prompt": "1.2.1", + "prompt": "1.2.2", "ioredis": "4.28.5", "request": "2.88.2", "request-promise-native": "1.0.9", From c17b9bd447917a409ca626f2c0a54cec07a1a386 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 18 Feb 2022 14:42:13 -0500 Subject: [PATCH 21/79] fix(deps): update dependency nodebb-plugin-markdown to v9.0.8 (#10327) Co-authored-by: Renovate Bot --- install/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/package.json b/install/package.json index 8f514c1dbe..ae342cd5dd 100644 --- a/install/package.json +++ b/install/package.json @@ -90,7 +90,7 @@ "nodebb-plugin-dbsearch": "5.1.2", "nodebb-plugin-emoji": "3.5.17", "nodebb-plugin-emoji-android": "2.0.5", - "nodebb-plugin-markdown": "9.0.7", + "nodebb-plugin-markdown": "9.0.8", "nodebb-plugin-mentions": "3.0.5", "nodebb-plugin-spam-be-gone": "0.7.13", "nodebb-rewards-essentials": "0.2.1", From 52836f3a7f815c0ca7f144f17205f012372325dd Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Fri, 18 Feb 2022 14:48:08 -0500 Subject: [PATCH 22/79] fix: allow translation keys in `label` attributes --- public/vendor/bootbox/wrapper.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/vendor/bootbox/wrapper.js b/public/vendor/bootbox/wrapper.js index b37f675395..54e703fa31 100644 --- a/public/vendor/bootbox/wrapper.js +++ b/public/vendor/bootbox/wrapper.js @@ -23,7 +23,7 @@ require(['translator', 'bootbox'], function (shim, bootbox) { var translator = shim.Translator.create(); var dialog = bootbox.dialog; - var attrsToTranslate = ['placeholder', 'title', 'value']; + var attrsToTranslate = ['placeholder', 'title', 'value', 'label']; bootbox.dialog = function (options) { var show = options.show !== false; options.show = false; From 1fa413420177bb767140d5a5f20f9cd9360693aa Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Fri, 18 Feb 2022 14:49:15 -0500 Subject: [PATCH 23/79] fix: #10329, select elements in sorted-list not showing proper values --- public/src/modules/settings/sorted-list.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/public/src/modules/settings/sorted-list.js b/public/src/modules/settings/sorted-list.js index dba5da9bc0..c03e2ea6ed 100644 --- a/public/src/modules/settings/sorted-list.js +++ b/public/src/modules/settings/sorted-list.js @@ -92,9 +92,15 @@ define('settings/sorted-list', [ const editBtn = $('[data-sorted-list-uuid="' + itemUUID + '"] [data-type="edit"]'); editBtn.on('click', function () { - const form = $('[data-sorted-list-uuid="' + itemUUID + '"][data-sorted-list-object="' + key + '"]').clone(true).show(); + const form = $('[data-sorted-list-uuid="' + itemUUID + '"][data-sorted-list-object="' + key + '"]'); + const clone = form.clone(true).show(); - const modal = bootbox.confirm(form, function (save) { + // .clone() doesn't preserve the state of `select` elements, fixing after the fact + clone.find('select').each((idx, el) => { + el.value = form.find(`select#${el.id}`).val(); + }); + + const modal = bootbox.confirm(clone, function (save) { if (save) { const form = $('
'); form.append(modal.find('form').children()); From 1c1062e11b80600ae6247ce33788c97249af9a76 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 18 Feb 2022 16:49:56 -0500 Subject: [PATCH 24/79] fix(deps): update dependency nodebb-plugin-dbsearch to v5.1.3 (#10330) Co-authored-by: Renovate Bot --- install/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/package.json b/install/package.json index ae342cd5dd..611cdc3de2 100644 --- a/install/package.json +++ b/install/package.json @@ -87,7 +87,7 @@ "nconf": "0.11.3", "nodebb-plugin-2factor": "3.0.4", "nodebb-plugin-composer-default": "7.0.20", - "nodebb-plugin-dbsearch": "5.1.2", + "nodebb-plugin-dbsearch": "5.1.3", "nodebb-plugin-emoji": "3.5.17", "nodebb-plugin-emoji-android": "2.0.5", "nodebb-plugin-markdown": "9.0.8", From 31cbff19ed7df4a8c172b9fb5ae7b721a3d9696c Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 18 Feb 2022 17:16:16 -0500 Subject: [PATCH 25/79] fix(deps): update dependency nodebb-plugin-mentions to v3.0.6 (#10328) Co-authored-by: Renovate Bot --- install/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/package.json b/install/package.json index 611cdc3de2..ad67a5a743 100644 --- a/install/package.json +++ b/install/package.json @@ -91,7 +91,7 @@ "nodebb-plugin-emoji": "3.5.17", "nodebb-plugin-emoji-android": "2.0.5", "nodebb-plugin-markdown": "9.0.8", - "nodebb-plugin-mentions": "3.0.5", + "nodebb-plugin-mentions": "3.0.6", "nodebb-plugin-spam-be-gone": "0.7.13", "nodebb-rewards-essentials": "0.2.1", "nodebb-theme-lavender": "5.3.2", From 5694e62e59ed0e3b08e3628db5849126226c9589 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Fri, 18 Feb 2022 17:22:14 -0500 Subject: [PATCH 26/79] fix: #10322 --- src/categories/delete.js | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/categories/delete.js b/src/categories/delete.js index ff491a5dbc..0feb3397ab 100644 --- a/src/categories/delete.js +++ b/src/categories/delete.js @@ -22,16 +22,17 @@ module.exports = function (Categories) { await topics.purgePostsAndTopic(tid, uid); }); const categoryData = await Categories.getCategoryData(cid); - await purgeCategory(categoryData); + await purgeCategory(cid, categoryData); plugins.hooks.fire('action:category.delete', { cid: cid, uid: uid, category: categoryData }); }; - async function purgeCategory(categoryData) { - const { cid } = categoryData; - await db.sortedSetRemoveBulk([ - ['categories:cid', cid], - ['categories:name', `${categoryData.name.substr(0, 200).toLowerCase()}:${cid}`], - ]); + async function purgeCategory(cid, categoryData) { + const bulkRemove = [['categories:cid', cid]]; + if (categoryData && categoryData.name) { + bulkRemove.push(['categories:name', `${categoryData.name.substr(0, 200).toLowerCase()}:${cid}`]); + } + await db.sortedSetRemoveBulk(bulkRemove); + await removeFromParent(cid); await deleteTags(cid); await db.deleteAll([ From 0b813d601efd42148d8bd85ef146b43a1f52a47b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Fri, 18 Feb 2022 19:01:32 -0500 Subject: [PATCH 27/79] fix: #10316, fix quoting regression --- public/src/client/topic/postTools.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/public/src/client/topic/postTools.js b/public/src/client/topic/postTools.js index 577b116580..51146641ca 100644 --- a/public/src/client/topic/postTools.js +++ b/public/src/client/topic/postTools.js @@ -252,8 +252,8 @@ define('forum/topic/postTools', [ }); } - function onReplyClicked(button, tid) { - const selectedNode = getSelectedNode(); + async function onReplyClicked(button, tid) { + const selectedNode = await getSelectedNode(); showStaleWarning(async function () { let username = await getUserSlug(button); @@ -285,8 +285,8 @@ define('forum/topic/postTools', [ }); } - function onQuoteClicked(button, tid) { - const selectedNode = getSelectedNode(); + async function onQuoteClicked(button, tid) { + const selectedNode = await getSelectedNode(); showStaleWarning(async function () { const username = await getUserSlug(button); From 00eebf10af2eb9691f46176a24ce08a224d02ee2 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Sat, 19 Feb 2022 10:24:58 +0000 Subject: [PATCH 28/79] chore(deps): update dependency mocha to v9.2.1 --- install/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/package.json b/install/package.json index ad67a5a743..a04fefde8a 100644 --- a/install/package.json +++ b/install/package.json @@ -155,7 +155,7 @@ "husky": "7.0.4", "jsdom": "19.0.0", "lint-staged": "12.3.4", - "mocha": "9.2.0", + "mocha": "9.2.1", "mocha-lcov-reporter": "1.3.0", "mockdate": "3.0.5", "nyc": "15.1.0", From 10a5901e4acc7dbe732e3a059d707c7fb41d1534 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Sun, 20 Feb 2022 13:43:50 -0500 Subject: [PATCH 29/79] fix: persona test fail --- test/api.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/api.js b/test/api.js index 64857041f2..0d76fe0067 100644 --- a/test/api.js +++ b/test/api.js @@ -267,7 +267,10 @@ describe('API', async () => { pathObj.path = pathObj.path.replace(/\/:([^\\/]+)/g, '/{$1}'); return pathObj; }); - const exclusionPrefixes = ['/api/admin/plugins', '/api/compose', '/debug']; + const exclusionPrefixes = [ + '/api/admin/plugins', '/api/compose', '/debug', + '/api/user/{userslug}/theme', // from persona + ]; paths = paths.filter(path => path.method !== '_all' && !exclusionPrefixes.some(prefix => path.path.startsWith(prefix))); From 244d88017f239e7920fb28d3f1b8fc6e9c6a906f Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sun, 20 Feb 2022 13:45:23 -0500 Subject: [PATCH 30/79] fix(deps): update dependency nodebb-theme-persona to v11.4.0 (#10325) Co-authored-by: Renovate Bot --- install/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/package.json b/install/package.json index a04fefde8a..73b4b837f8 100644 --- a/install/package.json +++ b/install/package.json @@ -95,7 +95,7 @@ "nodebb-plugin-spam-be-gone": "0.7.13", "nodebb-rewards-essentials": "0.2.1", "nodebb-theme-lavender": "5.3.2", - "nodebb-theme-persona": "11.3.40", + "nodebb-theme-persona": "11.4.0", "nodebb-theme-slick": "1.4.23", "nodebb-theme-vanilla": "12.1.17", "nodebb-widget-essentials": "5.0.9", From 496e9013d3ccd22fe54743b8400ce4e817406228 Mon Sep 17 00:00:00 2001 From: "Misty (Bot)" Date: Mon, 21 Feb 2022 04:05:55 -0500 Subject: [PATCH 31/79] Latest translations and fallbacks --- public/language/fr/admin/settings/uploads.json | 2 +- public/language/fr/global.json | 2 +- public/language/fr/topic.json | 4 ++-- public/language/fr/user.json | 6 +++--- public/language/it/global.json | 2 +- public/language/it/topic.json | 4 ++-- public/language/sr/email.json | 4 ++-- public/language/sr/error.json | 4 ++-- public/language/sr/global.json | 4 ++-- public/language/sr/modules.json | 2 +- public/language/sr/pages.json | 2 +- public/language/sr/topic.json | 4 ++-- public/language/sr/user.json | 4 ++-- public/language/sr/users.json | 2 +- 14 files changed, 23 insertions(+), 23 deletions(-) diff --git a/public/language/fr/admin/settings/uploads.json b/public/language/fr/admin/settings/uploads.json index dcf1b83dd8..ed8eb8e06f 100644 --- a/public/language/fr/admin/settings/uploads.json +++ b/public/language/fr/admin/settings/uploads.json @@ -2,7 +2,7 @@ "posts": "Sujets", "private": "Rendre privés les fichiers téléchargés", "strip-exif-data": "Supprimer les données EXIF", - "preserve-orphaned-uploads": "Keep uploaded files on disk after a post is purged", + "preserve-orphaned-uploads": "Conserver les fichiers téléchargés après la suppression d'une publication.", "private-extensions": "Rendre privé des extensions de fichier.", "private-uploads-extensions-help": "Renseignez ici une liste d'extensions de fichiers séparées par des virgules pour les rendre privées (par exemple : pdf, xls, doc). Une liste vide signifie que tous les fichiers sont privés.", "resize-image-width-threshold": "Redimensionner les images si elles sont plus larges que la largeur spécifiée", diff --git a/public/language/fr/global.json b/public/language/fr/global.json index 18c9a152b2..6c94b1bd53 100644 --- a/public/language/fr/global.json +++ b/public/language/fr/global.json @@ -23,7 +23,7 @@ "close": "Fermer", "pagination": "Pagination", "pagination.out_of": "%1 sur %2", - "pagination.enter_index": "Go to post index", + "pagination.enter_index": "Aller à l'index des messages", "header.admin": "Admin", "header.categories": "Catégories", "header.recent": "Récent", diff --git a/public/language/fr/topic.json b/public/language/fr/topic.json index fbfac50f85..1f128e5aa0 100644 --- a/public/language/fr/topic.json +++ b/public/language/fr/topic.json @@ -181,7 +181,7 @@ "timeago_earlier": "il y a %1", "first-post": "Premier message", "last-post": "Dernier message", - "go-to-my-next-post": "Go to my next post", - "no-more-next-post": "You don't have more posts in this topic", + "go-to-my-next-post": "Aller à mon prochain message", + "no-more-next-post": "Vous n'avez plus de messages dans ce sujet", "post-quick-reply": "Réponse rapide" } \ No newline at end of file diff --git a/public/language/fr/user.json b/public/language/fr/user.json index 14a455e9e2..d1e9dd37f1 100644 --- a/public/language/fr/user.json +++ b/public/language/fr/user.json @@ -96,16 +96,16 @@ "digest_weekly": "Hebdomadaire", "digest_biweekly": "Deux fois par semaine", "digest_monthly": "Mensuel", - "has_no_follower": "Personne n'est abonné à cet utilisateur :(", + "has_no_follower": "Cet utilisateur n'a pas encore d'abonné :(", "follows_no_one": "Cet utilisateur n'est abonné à personne :(", "has_no_posts": "Cet utilisateur n'a encore rien posté.", - "has_no_best_posts": "Cet utilisateur n'a donné d'avis positifs", + "has_no_best_posts": "Cet utilisateur n'a pas encore d'avis positifs", "has_no_topics": "Cet utilisateur n'a encore créé aucun sujet.", "has_no_watched_topics": "Cet utilisateur ne s'est encore abonné à aucun sujet.", "has_no_ignored_topics": "Cet utilisateur n'a encore ignoré aucun sujet.", "has_no_upvoted_posts": "Cet utilisateur n'a donné d'avis positifs", "has_no_downvoted_posts": "Cet utilisateur n'a pas donné d'avis négatifs", - "has_no_controversial_posts": "This user does not have any downvoted posts yet.", + "has_no_controversial_posts": "Cet utilisateur n'a pas encore d'avis négatifs.", "has_no_blocks": "Vous n'avez bloqué aucun utilisateur.", "email_hidden": "Email masqué", "hidden": "masqué", diff --git a/public/language/it/global.json b/public/language/it/global.json index 2064486bfd..46ee51179b 100644 --- a/public/language/it/global.json +++ b/public/language/it/global.json @@ -23,7 +23,7 @@ "close": "Chiudi", "pagination": "Impaginazione", "pagination.out_of": "%1 di %2", - "pagination.enter_index": "Go to post index", + "pagination.enter_index": "Vai all'indice dei post", "header.admin": "Amministratore", "header.categories": "Categorie", "header.recent": "Recenti", diff --git a/public/language/it/topic.json b/public/language/it/topic.json index 861fcdd58f..28bdc7f9f9 100644 --- a/public/language/it/topic.json +++ b/public/language/it/topic.json @@ -181,7 +181,7 @@ "timeago_earlier": "%1 precedente", "first-post": "Primo post", "last-post": "Ultimo post", - "go-to-my-next-post": "Go to my next post", - "no-more-next-post": "You don't have more posts in this topic", + "go-to-my-next-post": "Vai al mio prossimo post", + "no-more-next-post": "Non hai più post in questa discussione", "post-quick-reply": "Invia una risposta rapida" } \ No newline at end of file diff --git a/public/language/sr/email.json b/public/language/sr/email.json index 3818787c48..44c271e691 100644 --- a/public/language/sr/email.json +++ b/public/language/sr/email.json @@ -48,8 +48,8 @@ "unsub.cta": "Кликните овде да измените та подешавања", "unsubscribe": "одјава", "unsub.success": "Више нећете примати е-пошту са листе слања %1", - "unsub.failure.title": "Unable to unsubscribe", - "unsub.failure.message": "Unfortunately, we were not able to unsubscribe you from the mailing list, as there was an issue with the link. However, you can alter your email preferences by going to your user settings.

(error: %1)", + "unsub.failure.title": "Није могуће одјавити се", + "unsub.failure.message": "Нажалост, нисмо били у могућности да вас одјавимо са листе за слање јер је дошло до проблема са везом. Међутим, можете да промените подешавања е-поште тако што ћете отићи на ваша корисничка подешавања.

(грешка: %1)", "banned.subject": "Забрањени сте на %1", "banned.text1": "Корисник %1 је забрањен на %2.", "banned.text2": "Ова забрана ће трајати до %1.", diff --git a/public/language/sr/error.json b/public/language/sr/error.json index d494422c2e..be04e44304 100644 --- a/public/language/sr/error.json +++ b/public/language/sr/error.json @@ -1,8 +1,8 @@ { "invalid-data": "Неисправни подаци", "invalid-json": "Неважећи JSON", - "wrong-parameter-type": "A value of type %3 was expected for property `%1`, but %2 was received instead", - "required-parameters-missing": "Required parameters were missing from this API call: %1", + "wrong-parameter-type": "Очекивана је вредност типа %3 за својство %1, али је уместо тога примљен %2", + "required-parameters-missing": "Недостајали су обавезни параметри у овом API позиву: %1", "not-logged-in": "Изгледа да нисте пријављени.", "account-locked": "Ваш налог је привремено закључан", "search-requires-login": "Претраживање захтева налог — пријавите се или се региструјте.", diff --git a/public/language/sr/global.json b/public/language/sr/global.json index e696ef72f1..7da7113606 100644 --- a/public/language/sr/global.json +++ b/public/language/sr/global.json @@ -23,7 +23,7 @@ "close": "Затвори", "pagination": "Нумерисање страница", "pagination.out_of": "%1 од %2", - "pagination.enter_index": "Go to post index", + "pagination.enter_index": "Иди на индекс порука", "header.admin": "Админ", "header.categories": "Категорије", "header.recent": "Недавно", @@ -56,7 +56,7 @@ "posts": "Поруке", "x-posts": "%1 поруке/а", "best": "Најбоље", - "controversial": "Controversial", + "controversial": "Спорно", "votes": "Гласови", "x-votes": "%1 гласа/ова", "voters": "Гласачи", diff --git a/public/language/sr/modules.json b/public/language/sr/modules.json index 44cd5b6b33..723d3f9134 100644 --- a/public/language/sr/modules.json +++ b/public/language/sr/modules.json @@ -1,6 +1,6 @@ { "chat.chatting_with": "Ћаскај са", - "chat.placeholder": "Type chat message here, drag & drop images, press enter to send", + "chat.placeholder": "Укуцајте поруку ћаскања овде, превуците и отпустите слике, притисните enter за слање", "chat.scroll-up-alert": "Гледате старије поруке, кликните овде да бисте прешли на најновију поруку.", "chat.send": "Пошаљи", "chat.no_active": "Нема активних ћаскања.", diff --git a/public/language/sr/pages.json b/public/language/sr/pages.json index ba4f3c4873..74d8adb262 100644 --- a/public/language/sr/pages.json +++ b/public/language/sr/pages.json @@ -54,7 +54,7 @@ "account/upvoted": "Поруке које је гласао %1", "account/downvoted": "Поруке које је негативно гласао %1", "account/best": "Најбоље поруке од %1", - "account/controversial": "Controversial posts made by %1", + "account/controversial": "Спорне поруке од %1", "account/blocks": "Корисници које је блокирао %1", "account/uploads": "Отпремио %1", "account/sessions": "Сесије пријављивања", diff --git a/public/language/sr/topic.json b/public/language/sr/topic.json index e01610788f..2bfd1fe812 100644 --- a/public/language/sr/topic.json +++ b/public/language/sr/topic.json @@ -181,7 +181,7 @@ "timeago_earlier": "%1 раније", "first-post": "Прва порука", "last-post": "Последња порука", - "go-to-my-next-post": "Go to my next post", - "no-more-next-post": "You don't have more posts in this topic", + "go-to-my-next-post": "Иди на моју следећу поруку", + "no-more-next-post": "Немате више порука у овој теми", "post-quick-reply": "Објави брзи одговор" } \ No newline at end of file diff --git a/public/language/sr/user.json b/public/language/sr/user.json index 1920e715d4..6b653744af 100644 --- a/public/language/sr/user.json +++ b/public/language/sr/user.json @@ -105,7 +105,7 @@ "has_no_ignored_topics": "Овај корисник још није игнорисао ниједну тему.", "has_no_upvoted_posts": "Овај корисник још увек није гласао за неку поруку.", "has_no_downvoted_posts": "Овај корисник још увек није негативно гласао за неку поруку.", - "has_no_controversial_posts": "This user does not have any downvoted posts yet.", + "has_no_controversial_posts": "Овај корисник још увек нема ниједну поруку за коју се негативно гласало.", "has_no_blocks": "Нисте блокирали ниједног корисника", "email_hidden": "Скривена е-пошта", "hidden": "скривена", @@ -184,7 +184,7 @@ "consent.export_posts": "Извези поруке (.csv)", "consent.export-posts-success": "Извоз порука, добићете обавештење након завршетка.", "emailUpdate.intro": "Унесите своју адресу е-поште испод. Овај форум користи вашу адресу е-поште за планирано слање сажетка и обавештења, као и за опоравак налога у случају изгубљене лозинке.", - "emailUpdate.optional": "This field is optional. You are not obligated to provide your email address, but without a validated email you will not be able to recover your account or login with your email.", + "emailUpdate.optional": "Ово поље је опционо. Нисте обавезни да наведете своју адресу е-поште, али без ваљане е-поште нећете моћи да вратите свој налог или да се пријавите помоћу своје е-поште.", "emailUpdate.required": "Ово поље је обавезно.", "emailUpdate.change-instructions": "На унету адресу е-поште биће послата потврдна порука са јединственом везом. Приступ тој вези потврдиће ваше власништво над адресом е-поште и она ће постати активна на вашем налогу. У било ком тренутку можете да ажурирате своју е-пошту на страници налога." } \ No newline at end of file diff --git a/public/language/sr/users.json b/public/language/sr/users.json index 45d8f58fd8..96f579342d 100644 --- a/public/language/sr/users.json +++ b/public/language/sr/users.json @@ -5,7 +5,7 @@ "most_flags": "Најчешће означени заставицом", "search": "Претрага", "enter_username": "Унесите корисничко име за претрагу", - "search-user-for-chat": "Search a user to start chat", + "search-user-for-chat": "Претражите корисника да бисте започели ћаскање", "load_more": "Учитај више", "users-found-search-took": "Нађено је %1 корисника! Претрага је завршена за %2 секунде.", "filter-by": "Филтрирај према", From 6b22d0e15fa2eb8e940c3f4b229f1f5ef1313cb0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Mon, 21 Feb 2022 20:12:45 -0500 Subject: [PATCH 32/79] fix: #10334, use the correct env vars for web install --- install/web.js | 39 ++++++++++++++++++------------------- src/install.js | 2 +- src/views/install/index.tpl | 2 +- 3 files changed, 21 insertions(+), 22 deletions(-) diff --git a/install/web.js b/install/web.js index 68b4ae5a7b..53128b4cf1 100644 --- a/install/web.js +++ b/install/web.js @@ -113,7 +113,7 @@ function ping(req, res) { } function welcome(req, res) { - const dbs = ['redis', 'mongo', 'postgres']; + const dbs = ['mongo', 'redis', 'postgres']; const databases = dbs.map((databaseName) => { const questions = require(`../src/database/${databaseName}`).questions.filter(question => question && !question.hideOnWebInstall); @@ -146,29 +146,28 @@ function install(req, res) { } req.setTimeout(0); installing = true; - const setupEnvVars = nconf.get(); - for (const [key, value] of Object.entries(req.body)) { - if (!process.env.hasOwnProperty(key)) { - setupEnvVars[key.replace(':', '__')] = value; - } - } - // Flatten any objects in setupEnvVars - const pushToRoot = function (parentKey, key) { - setupEnvVars[`${parentKey}__${key}`] = setupEnvVars[parentKey][key]; + const database = nconf.get('database') || req.body.database || 'mongo'; + const setupEnvVars = { + ...process.env, + NODEBB_URL: nconf.get('url') || req.body.url || (`${req.protocol}://${req.get('host')}`), + NODEBB_PORT: nconf.get('port') || 4567, + NODEBB_ADMIN_USERNAME: nconf.get('admin:username') || req.body['admin:username'], + NODEBB_ADMIN_PASSWORD: nconf.get('admin:password') || req.body['admin:password'], + NODEBB_ADMIN_EMAIL: nconf.get('admin:email') || req.body['admin:email'], + NODEBB_DB: database, + NODEBB_DB_HOST: nconf.get(`${database}:host`) || req.body[`${database}:host`], + NODEBB_DB_PORT: nconf.get(`${database}:port`) || req.body[`${database}:port`], + NODEBB_DB_USER: nconf.get(`${database}:username`) || req.body[`${database}:username`], + NODEBB_DB_PASSWORD: nconf.get(`${database}:password`) || req.body[`${database}:password`], + NODEBB_DB_NAME: nconf.get(`${database}:database`) || req.body[`${database}:database`], + NODEBB_DB_SSL: nconf.get(`${database}:ssl`) || req.body[`${database}:ssl`], + defaultPlugins: JSON.stringify(nconf.get('defaultplugins') || nconf.get('defaultPlugins') || []), }; - for (const [parentKey, value] of Object.entries(setupEnvVars)) { - if (typeof value === 'object' && value !== null && !Array.isArray(value)) { - Object.keys(value).forEach(key => pushToRoot(parentKey, key)); - delete setupEnvVars[parentKey]; - } else if (Array.isArray(value)) { - setupEnvVars[parentKey] = JSON.stringify(value); - } - } winston.info('Starting setup process'); - winston.info(setupEnvVars); - launchUrl = setupEnvVars.url; + winston.info(JSON.stringify(setupEnvVars, null, 4)); + launchUrl = setupEnvVars.NODEBB_URL; const child = require('child_process').fork('app', ['--setup'], { env: setupEnvVars, diff --git a/src/install.js b/src/install.js index 9afa1b54f9..97e981d071 100644 --- a/src/install.js +++ b/src/install.js @@ -493,7 +493,7 @@ async function enableDefaultPlugins() { ]; let customDefaults = nconf.get('defaultplugins') || nconf.get('defaultPlugins'); - winston.info('[install/defaultPlugins] customDefaults', customDefaults); + winston.info(`[install/defaultPlugins] customDefaults ${String(customDefaults)}`); if (customDefaults && customDefaults.length) { try { diff --git a/src/views/install/index.tpl b/src/views/install/index.tpl index e022d64639..3b9a9e8ce3 100644 --- a/src/views/install/index.tpl +++ b/src/views/install/index.tpl @@ -100,8 +100,8 @@
From fb4f89f391c27d335ca073307e946cace7cfab56 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Tue, 22 Feb 2022 10:28:23 -0500 Subject: [PATCH 33/79] fix(sorted-list): only call `.stripHTMLTags()` on string values --- public/src/modules/settings/sorted-list.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/src/modules/settings/sorted-list.js b/public/src/modules/settings/sorted-list.js index c03e2ea6ed..48b3bee79b 100644 --- a/public/src/modules/settings/sorted-list.js +++ b/public/src/modules/settings/sorted-list.js @@ -148,7 +148,7 @@ define('settings/sorted-list', [ function stripTags(data) { return Object.entries(data || {}).forEach(([field, value]) => { - data[field] = utils.stripHTMLTags(value, utils.stripTags); + data[field] = typeof value === 'string' ? utils.stripHTMLTags(value, utils.stripTags) : value; }); } From 92d613e42096fdb3b45e29c00c30e65922c0b8ee Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Tue, 22 Feb 2022 10:39:54 -0500 Subject: [PATCH 34/79] feat(sorted-list): add new client-side hook `filter:settings.sorted-list.loadItem` --- public/src/modules/settings/sorted-list.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/public/src/modules/settings/sorted-list.js b/public/src/modules/settings/sorted-list.js index 48b3bee79b..e5fb9d7b31 100644 --- a/public/src/modules/settings/sorted-list.js +++ b/public/src/modules/settings/sorted-list.js @@ -50,7 +50,9 @@ define('settings/sorted-list', [ const list = ajaxify.data[call ? hash : 'settings'][key]; if (Array.isArray(list) && typeof list[0] !== 'string') { - list.forEach(function (item) { + await Promise.all(list.map(async (item) => { + ({ item } = await hooks.fire('filter:settings.sorted-list.loadItem', { item })); + const itemUUID = utils.generateUUID(); const form = $(formHtml).deserialize(item); form.attr('data-sorted-list-uuid', itemUUID); @@ -60,7 +62,7 @@ define('settings/sorted-list', [ parse($container, itemUUID, item).then(() => { hooks.fire('action:settings.sorted-list.loaded', { element: listEl.get(0) }); }); - }); + })); } listEl.sortable().addClass('pointer'); From 914733e44bc0956e9f704b5a55c5ed817f0d5a20 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Tue, 22 Feb 2022 11:41:33 -0500 Subject: [PATCH 35/79] fix: allow calls to api module without a defined payload --- public/src/modules/api.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/public/src/modules/api.js b/public/src/modules/api.js index 614b799f04..e3468190af 100644 --- a/public/src/modules/api.js +++ b/public/src/modules/api.js @@ -47,18 +47,18 @@ define('api', ['hooks'], (hooks) => { } api.get = (route, payload, onSuccess) => call({ - url: route + (Object.keys(payload).length ? ('?' + $.param(payload)) : ''), + url: route + (payload && Object.keys(payload).length ? ('?' + $.param(payload)) : ''), }, onSuccess); api.head = (route, payload, onSuccess) => call({ - url: route + (Object.keys(payload).length ? ('?' + $.param(payload)) : ''), + url: route + (payload && Object.keys(payload).length ? ('?' + $.param(payload)) : ''), method: 'head', }, onSuccess); api.post = (route, payload, onSuccess) => call({ url: route, method: 'post', - data: JSON.stringify(payload), + data: JSON.stringify(payload || {}), contentType: 'application/json; charset=utf-8', headers: { 'x-csrf-token': config.csrf_token, @@ -68,7 +68,7 @@ define('api', ['hooks'], (hooks) => { api.put = (route, payload, onSuccess) => call({ url: route, method: 'put', - data: JSON.stringify(payload), + data: JSON.stringify(payload || {}), contentType: 'application/json; charset=utf-8', headers: { 'x-csrf-token': config.csrf_token, From 1c8d1d231e43c5d4338948757775d78260b90b14 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Tue, 22 Feb 2022 13:26:30 -0500 Subject: [PATCH 36/79] fix(sorted-list): call loadItem hook on add/edit items as well as on item retrieval, refactor edit to call parse() --- public/src/modules/settings/sorted-list.js | 32 ++++++++++------------ 1 file changed, 15 insertions(+), 17 deletions(-) diff --git a/public/src/modules/settings/sorted-list.js b/public/src/modules/settings/sorted-list.js index e5fb9d7b31..42b5c72085 100644 --- a/public/src/modules/settings/sorted-list.js +++ b/public/src/modules/settings/sorted-list.js @@ -67,7 +67,7 @@ define('settings/sorted-list', [ listEl.sortable().addClass('pointer'); }, - addItem: function ($formElements, $target) { + addItem: async ($formElements, $target) => { const key = $target.attr('data-sorted-list'); const itemUUID = utils.generateUUID(); const form = $('
'); @@ -75,7 +75,8 @@ define('settings/sorted-list', [ $('#content').append(form.hide()); - const data = Settings.helper.serializeForm(form); + let data = Settings.helper.serializeForm(form); + ({ item: data } = await hooks.fire('filter:settings.sorted-list.loadItem', { item: data })); parse($target, itemUUID, data); }, }; @@ -90,7 +91,6 @@ define('settings/sorted-list', [ function setupEditButton($container, itemUUID) { const $list = $container.find('[data-type="list"]'); const key = $container.attr('data-sorted-list'); - const itemTpl = $container.attr('data-item-template'); const editBtn = $('[data-sorted-list-uuid="' + itemUUID + '"] [data-type="edit"]'); editBtn.on('click', function () { @@ -102,7 +102,7 @@ define('settings/sorted-list', [ el.value = form.find(`select#${el.id}`).val(); }); - const modal = bootbox.confirm(clone, function (save) { + const modal = bootbox.confirm(clone, async (save) => { if (save) { const form = $('
'); form.append(modal.find('form').children()); @@ -111,25 +111,19 @@ define('settings/sorted-list', [ $('#content').append(form.hide()); - const data = Settings.helper.serializeForm(form); + let data = Settings.helper.serializeForm(form); + ({ item: data } = await hooks.fire('filter:settings.sorted-list.loadItem', { item: data })); stripTags(data); - app.parseAndTranslate(itemTpl, data, function (itemHtml) { - itemHtml = $(itemHtml); - const oldItem = $list.find('[data-sorted-list-uuid="' + itemUUID + '"]'); - oldItem.after(itemHtml); - oldItem.remove(); - itemHtml.attr('data-sorted-list-uuid', itemUUID); - - setupRemoveButton($container, itemUUID); - setupEditButton($container, itemUUID); - }); + const oldItem = $list.find('[data-sorted-list-uuid="' + itemUUID + '"]'); + parse($container, itemUUID, data, oldItem); } }); }); } - function parse($container, itemUUID, data) { + function parse($container, itemUUID, data, replaceEl) { + // replaceEl is optional const $list = $container.find('[data-type="list"]'); const itemTpl = $container.attr('data-item-template'); @@ -138,7 +132,11 @@ define('settings/sorted-list', [ return new Promise((resolve) => { app.parseAndTranslate(itemTpl, data, function (itemHtml) { itemHtml = $(itemHtml); - $list.append(itemHtml); + if (replaceEl) { + replaceEl.replaceWith(itemHtml); + } else { + $list.append(itemHtml); + } itemHtml.attr('data-sorted-list-uuid', itemUUID); setupRemoveButton($container, itemUUID); From b84e61d568d05c95f9d8c222b5dfa016fdbe7cf1 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 22 Feb 2022 16:05:03 -0500 Subject: [PATCH 37/79] fix(deps): update dependency nodebb-theme-persona to v11.4.1 (#10337) Co-authored-by: Renovate Bot --- install/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/package.json b/install/package.json index 73b4b837f8..730070f785 100644 --- a/install/package.json +++ b/install/package.json @@ -95,7 +95,7 @@ "nodebb-plugin-spam-be-gone": "0.7.13", "nodebb-rewards-essentials": "0.2.1", "nodebb-theme-lavender": "5.3.2", - "nodebb-theme-persona": "11.4.0", + "nodebb-theme-persona": "11.4.1", "nodebb-theme-slick": "1.4.23", "nodebb-theme-vanilla": "12.1.17", "nodebb-widget-essentials": "5.0.9", From 67e4df781712f3047df8b34c66824105c01af14f Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Wed, 23 Feb 2022 12:17:51 +0000 Subject: [PATCH 38/79] chore(deps): update dependency smtp-server to v3.10.0 --- install/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/package.json b/install/package.json index 730070f785..859802d848 100644 --- a/install/package.json +++ b/install/package.json @@ -159,7 +159,7 @@ "mocha-lcov-reporter": "1.3.0", "mockdate": "3.0.5", "nyc": "15.1.0", - "smtp-server": "3.9.0" + "smtp-server": "3.10.0" }, "bugs": { "url": "https://github.com/NodeBB/NodeBB/issues" From f30c65a49dfd41399d38c3c3bdafa1cae4e2e1d2 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Wed, 23 Feb 2022 17:45:41 +0000 Subject: [PATCH 39/79] fix(deps): update dependency nodebb-plugin-2factor to v3.0.5 --- install/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/package.json b/install/package.json index 859802d848..3174467378 100644 --- a/install/package.json +++ b/install/package.json @@ -85,7 +85,7 @@ "multiparty": "4.2.3", "@nodebb/bootswatch": "3.4.2", "nconf": "0.11.3", - "nodebb-plugin-2factor": "3.0.4", + "nodebb-plugin-2factor": "3.0.5", "nodebb-plugin-composer-default": "7.0.20", "nodebb-plugin-dbsearch": "5.1.3", "nodebb-plugin-emoji": "3.5.17", From 3fc592d4c8f542039c7764ea4f29d45ff38f1046 Mon Sep 17 00:00:00 2001 From: "Misty (Bot)" Date: Thu, 24 Feb 2022 04:06:02 -0500 Subject: [PATCH 40/79] Latest translations and fallbacks --- public/language/he/modules.json | 6 +++--- public/language/sr/error.json | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/public/language/he/modules.json b/public/language/he/modules.json index 66c91ba452..1fae5a3436 100644 --- a/public/language/he/modules.json +++ b/public/language/he/modules.json @@ -1,7 +1,7 @@ { "chat.chatting_with": "שוחח עם", - "chat.placeholder": "הקלד את הודעת הצ'אט כאן, ניתן לגרור ולשחרר תמונות, בסיום הקש אנטר כדי לשלוח.", - "chat.scroll-up-alert": "אתה מסתכל על הודעות ישנות. לחץ כאן למעבר להודעה האחרונה.", + "chat.placeholder": "הקלד את הודעת הצ'אט כאן, ניתן גם לגרור ולשחרר כאן תמונות, הקש אנטר לשליחה.", + "chat.scroll-up-alert": "אתה צופה כעת על הודעות ישנות. לחץ כאן למעבר להודעה האחרונה.", "chat.send": "שלח", "chat.no_active": "אין לך צ'אטים פעילים", "chat.user_typing": "%1 מקליד ...", @@ -59,7 +59,7 @@ "composer.upload-file": "העלה קובץ", "composer.zen_mode": "מסך מלא", "composer.select_category": "בחר קטגוריה", - "composer.textarea.placeholder": "כתוב את תוכן הפוסט כאן. ניתן גם לגרור לכאן תמונות.", + "composer.textarea.placeholder": "כתוב את תוכן הפוסט כאן. ניתן גם לגרור ולשחרר כאן תמונות.", "composer.schedule-for": "תזמון נושא ל", "composer.schedule-date": "תאריך", "composer.schedule-time": "שעה", diff --git a/public/language/sr/error.json b/public/language/sr/error.json index be04e44304..e31248f427 100644 --- a/public/language/sr/error.json +++ b/public/language/sr/error.json @@ -10,8 +10,8 @@ "invalid-cid": "Неисправан ID категорије", "invalid-tid": "Неисправан ID теме", "invalid-pid": "Неисправан ID поруке", - "invalid-uid": "Неисправан ИД корисника", - "invalid-mid": "Invalid Chat Message ID", + "invalid-uid": "Неисправан ID корисника", + "invalid-mid": "Неисправан ID поруке ћаскања", "invalid-date": "Мора се навести важећи датум", "invalid-username": "Неисправно корисничко име", "invalid-email": "Неисправна е-пошта", From e44cbb243029c6489a855eedec731ef468c4e0ae Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 24 Feb 2022 05:19:41 +0000 Subject: [PATCH 41/79] chore(deps): bump json2csv from 5.0.6 to 5.0.7 in /install Bumps [json2csv](https://github.com/zemirco/json2csv) from 5.0.6 to 5.0.7. - [Release notes](https://github.com/zemirco/json2csv/releases) - [Changelog](https://github.com/zemirco/json2csv/blob/v5.0.7/CHANGELOG.md) - [Commits](https://github.com/zemirco/json2csv/compare/v5.0.6...v5.0.7) --- updated-dependencies: - dependency-name: json2csv dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- install/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/package.json b/install/package.json index 3174467378..a3ce0f0b6b 100644 --- a/install/package.json +++ b/install/package.json @@ -70,7 +70,7 @@ "jquery-serializeobject": "1.0.0", "jquery-ui": "1.13.1", "jsesc": "3.0.2", - "json2csv": "5.0.6", + "json2csv": "5.0.7", "jsonwebtoken": "8.5.1", "less": "3.13.1", "lodash": "4.17.21", From 52ee5ce8e1c61a3e1b61f38b551462a29b4a50ac Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 25 Feb 2022 05:18:58 +0000 Subject: [PATCH 42/79] chore(deps): bump postcss from 8.4.6 to 8.4.7 in /install Bumps [postcss](https://github.com/postcss/postcss) from 8.4.6 to 8.4.7. - [Release notes](https://github.com/postcss/postcss/releases) - [Changelog](https://github.com/postcss/postcss/blob/main/CHANGELOG.md) - [Commits](https://github.com/postcss/postcss/compare/8.4.6...8.4.7) --- updated-dependencies: - dependency-name: postcss dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- install/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/package.json b/install/package.json index a3ce0f0b6b..eb61f8f8f6 100644 --- a/install/package.json +++ b/install/package.json @@ -106,7 +106,7 @@ "passport-local": "1.0.0", "pg": "8.7.3", "pg-cursor": "2.7.3", - "postcss": "8.4.6", + "postcss": "8.4.7", "postcss-clean": "1.2.0", "prompt": "1.2.2", "ioredis": "4.28.5", From e0b1c374e4465a331ba6449a889f0e758f425e77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Fri, 25 Feb 2022 14:43:10 -0500 Subject: [PATCH 43/79] feat: resolve paths for staticDirs as well --- src/plugins/data.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/data.js b/src/plugins/data.js index 8eb1c79452..565b8ba623 100644 --- a/src/plugins/data.js +++ b/src/plugins/data.js @@ -97,7 +97,7 @@ Data.getStaticDirectories = async function (pluginData) { return; } - const dirPath = path.join(pluginData.path, pluginData.staticDirs[route]); + const dirPath = await resolveModulePath(pluginData.path, pluginData.staticDirs[route]); try { const stats = await fs.promises.stat(dirPath); if (!stats.isDirectory()) { From 0e12f82dd823f41ea776e1055ea760c546dae2d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Fri, 25 Feb 2022 18:42:45 -0500 Subject: [PATCH 44/79] fix: dont overwrite asset_base_url if its set --- src/prestart.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/prestart.js b/src/prestart.js index b93bf05838..59c909a83d 100644 --- a/src/prestart.js +++ b/src/prestart.js @@ -95,7 +95,9 @@ function loadConfig(configFile) { nconf.set('secure', urlObject.protocol === 'https:'); nconf.set('use_port', !!urlObject.port); nconf.set('relative_path', relativePath); - nconf.set('asset_base_url', `${relativePath}/assets`); + if (!nconf.get('asset_base_url')) { + nconf.set('asset_base_url', `${relativePath}/assets`); + } nconf.set('port', nconf.get('PORT') || nconf.get('port') || urlObject.port || (nconf.get('PORT_ENV_VAR') ? nconf.get(nconf.get('PORT_ENV_VAR')) : false) || 4567); // cookies don't provide isolation by port: http://stackoverflow.com/a/16328399/122353 From e83c8be2bd82df9c455fd3309be7e3f7a9259acd Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Sat, 26 Feb 2022 01:26:38 +0000 Subject: [PATCH 45/79] chore(deps): update dependency eslint to v8.10.0 --- install/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/package.json b/install/package.json index eb61f8f8f6..557ecc9727 100644 --- a/install/package.json +++ b/install/package.json @@ -147,7 +147,7 @@ "@commitlint/cli": "16.2.1", "@commitlint/config-angular": "16.2.1", "coveralls": "3.1.1", - "eslint": "8.9.0", + "eslint": "8.10.0", "eslint-config-nodebb": "0.1.1", "eslint-plugin-import": "2.25.4", "grunt": "1.4.1", From 64a6ff370af233b57ea890cf082600136420af5e Mon Sep 17 00:00:00 2001 From: "Misty (Bot)" Date: Mon, 28 Feb 2022 04:05:52 -0500 Subject: [PATCH 46/79] Latest translations and fallbacks --- public/language/hr/notifications.json | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/public/language/hr/notifications.json b/public/language/hr/notifications.json index 613b634b21..002a630350 100644 --- a/public/language/hr/notifications.json +++ b/public/language/hr/notifications.json @@ -14,7 +14,7 @@ "topics": "Teme", "replies": "Odgovori", "chat": "Razgovori", - "group-chat": "Group Chats", + "group-chat": "Grupni Chat", "follows": "Pratitelji", "upvote": "Glasači za", "new-flags": "Nove zastave", @@ -32,7 +32,7 @@ "user_flagged_user": "%1 označio je profil (%2)", "user_flagged_user_dual": "%1 i %2su označili profil (%3)", "user_flagged_user_multiple": "%1 i %2 ostalih su označili korisnički profil (%3)", - "user_posted_to": "%1 i %2 su odgovorili na: %3", + "user_posted_to": "%1 je odgovorio/la na: %2", "user_posted_to_dual": "%1 i %2 ostalih su odgovorili na objavu u: %3", "user_posted_to_multiple": "%1 i %2 drugih su odgovorili na: %3", "user_posted_topic": "%1 je otvorio novu temu: %2", @@ -43,7 +43,7 @@ "new_register": "%1 je poslao zahtjev za registraciju.", "new_register_multiple": "%1 registracija čeka odobrenje.", "flag_assigned_to_you": "Zastava%1 je dodijeljena vama.", - "post_awaiting_review": "Post awaiting review", + "post_awaiting_review": "Objava čeka pregled", "profile-exported": "%1 profile exported, click to download", "posts-exported": "%1 posts exported, click to download", "uploads-exported": "%1 uploads exported, click to download", @@ -56,10 +56,10 @@ "email-confirm-error-message": "Nastao je problem pri potvrdi Vaše email adrese. Provjerite kod ili zatražite novi.", "email-confirm-sent": "Provjera korisničkog emaila poslana.", "none": "None", - "notification_only": "Notification Only", - "email_only": "Email Only", - "notification_and_email": "Notification & Email", - "notificationType_upvote": "When someone upvotes your post", + "notification_only": "Obavijest samo", + "email_only": "Email samo", + "notification_and_email": "Obavijest i Email", + "notificationType_upvote": "Kada netko ocijeni vašu objavi", "notificationType_new-topic": "When someone you follow posts a topic", "notificationType_new-reply": "When a new reply is posted in a topic you are watching", "notificationType_post-edit": "When a post is edited in a topic you are watching", From 81e7ca201e84b9ce508e0352c64a0ccb4ee78dfc Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 28 Feb 2022 05:23:29 +0000 Subject: [PATCH 47/79] chore(deps): bump nodebb-plugin-spam-be-gone in /install Bumps [nodebb-plugin-spam-be-gone](https://github.com/akhoury/nodebb-plugin-spam-be-gone) from 0.7.13 to 0.7.14. - [Release notes](https://github.com/akhoury/nodebb-plugin-spam-be-gone/releases) - [Commits](https://github.com/akhoury/nodebb-plugin-spam-be-gone/compare/v0.7.13...v0.7.14) --- updated-dependencies: - dependency-name: nodebb-plugin-spam-be-gone dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- install/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/package.json b/install/package.json index 557ecc9727..2116215eab 100644 --- a/install/package.json +++ b/install/package.json @@ -92,7 +92,7 @@ "nodebb-plugin-emoji-android": "2.0.5", "nodebb-plugin-markdown": "9.0.8", "nodebb-plugin-mentions": "3.0.6", - "nodebb-plugin-spam-be-gone": "0.7.13", + "nodebb-plugin-spam-be-gone": "0.7.14", "nodebb-rewards-essentials": "0.2.1", "nodebb-theme-lavender": "5.3.2", "nodebb-theme-persona": "11.4.1", From 4a1e761adbf360cc30e8e6b127403ed4e174e80f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Mon, 28 Feb 2022 20:36:47 -0500 Subject: [PATCH 48/79] refactor: remove code that doesn't do anything --- public/src/client/account/edit.js | 9 --------- 1 file changed, 9 deletions(-) diff --git a/public/src/client/account/edit.js b/public/src/client/account/edit.js index f907e84e63..282f104c5c 100644 --- a/public/src/client/account/edit.js +++ b/public/src/client/account/edit.js @@ -16,15 +16,6 @@ define('forum/account/edit', [ $('#submitBtn').on('click', updateProfile); - app.loadJQueryUI(function () { - $('#inputBirthday').datepicker({ - changeMonth: true, - changeYear: true, - yearRange: '1900:-5y', - defaultDate: '-13y', - }); - }); - if (ajaxify.data.groupTitleArray.length === 1 && ajaxify.data.groupTitleArray[0] === '') { $('#groupTitle option[value=""]').attr('selected', true); } From 40230725c352db6cd387245dfdce3d24f2b8790f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Mon, 28 Feb 2022 20:37:55 -0500 Subject: [PATCH 49/79] refactor: move header unread code to separate module --- public/src/app.js | 6 +- public/src/client/header.js | 10 +++- public/src/client/header/unread.js | 96 ++++++++++++++++++++++++++++++ public/src/client/unread.js | 95 +---------------------------- 4 files changed, 109 insertions(+), 98 deletions(-) create mode 100644 public/src/client/header/unread.js diff --git a/public/src/app.js b/public/src/app.js index 92bdccc1bc..87c8d3ddfc 100644 --- a/public/src/app.js +++ b/public/src/app.js @@ -85,11 +85,10 @@ app.flags = {}; 'translator', 'messages', 'search', - 'forum/unread', 'forum/header', 'hooks', 'timeago/jquery.timeago', - ], function (taskbar, helpers, pagination, translator, messages, search, unread, header, hooks) { + ], function (taskbar, helpers, pagination, translator, messages, search, header, hooks) { header.prepareDOM(); translator.prepareDOM(); taskbar.init(); @@ -97,9 +96,6 @@ app.flags = {}; pagination.init(); search.init(); - if (app.user.uid > 0) { - unread.initUnreadTopics(); - } function finishLoad() { hooks.fire('action:app.load'); messages.show(); diff --git a/public/src/client/header.js b/public/src/client/header.js index f7537b7021..31de3bc475 100644 --- a/public/src/client/header.js +++ b/public/src/client/header.js @@ -1,9 +1,17 @@ 'use strict'; -define('forum/header', ['forum/header/notifications', 'forum/header/chat', 'alerts'], function (notifications, chat, alerts) { +define('forum/header', [ + 'forum/header/unread', + 'forum/header/notifications', + 'forum/header/chat', + 'alerts', +], function (unread, notifications, chat, alerts) { const module = {}; module.prepareDOM = function () { + if (app.user.uid > 0) { + unread.initUnreadTopics(); + } notifications.prepareDOM(); chat.prepareDOM(); handleStatusChange(); diff --git a/public/src/client/header/unread.js b/public/src/client/header/unread.js new file mode 100644 index 0000000000..40e8e143cf --- /dev/null +++ b/public/src/client/header/unread.js @@ -0,0 +1,96 @@ +'use strict'; + +define('forum/header/unread', function () { + const unread = {}; + const watchStates = { + ignoring: 1, + notwatching: 2, + watching: 3, + }; + + unread.initUnreadTopics = function () { + const unreadTopics = app.user.unreadData; + + function onNewPost(data) { + if (data && data.posts && data.posts.length && unreadTopics) { + const post = data.posts[0]; + if (parseInt(post.uid, 10) === parseInt(app.user.uid, 10) || + (!post.topic.isFollowing && post.categoryWatchState !== watchStates.watching) + ) { + return; + } + + const tid = post.topic.tid; + if (!unreadTopics[''][tid] || !unreadTopics.new[tid] || + !unreadTopics.watched[tid] || !unreadTopics.unreplied[tid]) { + markTopicsUnread(tid); + } + + if (!unreadTopics[''][tid]) { + increaseUnreadCount(''); + unreadTopics[''][tid] = true; + } + const isNewTopic = post.isMain && parseInt(post.uid, 10) !== parseInt(app.user.uid, 10); + if (isNewTopic && !unreadTopics.new[tid]) { + increaseUnreadCount('new'); + unreadTopics.new[tid] = true; + } + const isUnreplied = parseInt(post.topic.postcount, 10) <= 1; + if (isUnreplied && !unreadTopics.unreplied[tid]) { + increaseUnreadCount('unreplied'); + unreadTopics.unreplied[tid] = true; + } + + if (post.topic.isFollowing && !unreadTopics.watched[tid]) { + increaseUnreadCount('watched'); + unreadTopics.watched[tid] = true; + } + } + } + + function increaseUnreadCount(filter) { + const unreadUrl = '/unread' + (filter ? '?filter=' + filter : ''); + const newCount = 1 + parseInt($('a[href="' + config.relative_path + unreadUrl + '"].navigation-link i').attr('data-content'), 10); + updateUnreadTopicCount(unreadUrl, newCount); + } + + function markTopicsUnread(tid) { + $('[data-tid="' + tid + '"]').addClass('unread'); + } + + $(window).on('action:ajaxify.end', function () { + if (ajaxify.data.template.topic) { + ['', 'new', 'watched', 'unreplied'].forEach(function (filter) { + delete unreadTopics[filter][ajaxify.data.tid]; + }); + } + }); + socket.removeListener('event:new_post', onNewPost); + socket.on('event:new_post', onNewPost); + + socket.removeListener('event:unread.updateCount', updateUnreadCounters); + socket.on('event:unread.updateCount', updateUnreadCounters); + }; + + function updateUnreadCounters(data) { + updateUnreadTopicCount('/unread', data.unreadTopicCount); + updateUnreadTopicCount('/unread?filter=new', data.unreadNewTopicCount); + updateUnreadTopicCount('/unread?filter=watched', data.unreadWatchedTopicCount); + updateUnreadTopicCount('/unread?filter=unreplied', data.unreadUnrepliedTopicCount); + } + + function updateUnreadTopicCount(url, count) { + if (!utils.isNumber(count)) { + return; + } + + $('a[href="' + config.relative_path + url + '"].navigation-link i') + .toggleClass('unread-count', count > 0) + .attr('data-content', count > 99 ? '99+' : count); + + $('#mobile-menu [data-unread-url="' + url + '"]').attr('data-content', count > 99 ? '99+' : count); + } + unread.updateUnreadTopicCount = updateUnreadTopicCount; + + return unread; +}); diff --git a/public/src/client/unread.js b/public/src/client/unread.js index 9ae0bf7a09..e331636915 100644 --- a/public/src/client/unread.js +++ b/public/src/client/unread.js @@ -2,16 +2,10 @@ define('forum/unread', [ - 'topicSelect', 'components', 'topicList', 'categorySelector', 'alerts', -], function (topicSelect, components, topicList, categorySelector, alerts) { + 'forum/header/unread', 'topicSelect', 'components', 'topicList', 'categorySelector', 'alerts', +], function (headerUnread, topicSelect, components, topicList, categorySelector, alerts) { const Unread = {}; - const watchStates = { - ignoring: 1, - notwatching: 2, - watching: 3, - }; - Unread.init = function () { app.enterRoom('unread_topics'); @@ -19,7 +13,7 @@ define('forum/unread', [ topicList.init('unread'); - updateUnreadTopicCount('/' + ajaxify.data.selectedFilter.url, ajaxify.data.topicCount); + headerUnread.updateUnreadTopicCount('/' + ajaxify.data.selectedFilter.url, ajaxify.data.topicCount); }; function handleMarkRead() { @@ -114,88 +108,5 @@ define('forum/unread', [ } } - function updateUnreadTopicCount(url, count) { - if (!utils.isNumber(count)) { - return; - } - - $('a[href="' + config.relative_path + url + '"].navigation-link i') - .toggleClass('unread-count', count > 0) - .attr('data-content', count > 99 ? '99+' : count); - - $('#mobile-menu [data-unread-url="' + url + '"]').attr('data-content', count > 99 ? '99+' : count); - } - - Unread.initUnreadTopics = function () { - const unreadTopics = app.user.unreadData; - - function onNewPost(data) { - if (data && data.posts && data.posts.length && unreadTopics) { - const post = data.posts[0]; - if (parseInt(post.uid, 10) === parseInt(app.user.uid, 10) || - (!post.topic.isFollowing && post.categoryWatchState !== watchStates.watching) - ) { - return; - } - - const tid = post.topic.tid; - if (!unreadTopics[''][tid] || !unreadTopics.new[tid] || - !unreadTopics.watched[tid] || !unreadTopics.unreplied[tid]) { - markTopicsUnread(tid); - } - - if (!unreadTopics[''][tid]) { - increaseUnreadCount(''); - unreadTopics[''][tid] = true; - } - const isNewTopic = post.isMain && parseInt(post.uid, 10) !== parseInt(app.user.uid, 10); - if (isNewTopic && !unreadTopics.new[tid]) { - increaseUnreadCount('new'); - unreadTopics.new[tid] = true; - } - const isUnreplied = parseInt(post.topic.postcount, 10) <= 1; - if (isUnreplied && !unreadTopics.unreplied[tid]) { - increaseUnreadCount('unreplied'); - unreadTopics.unreplied[tid] = true; - } - - if (post.topic.isFollowing && !unreadTopics.watched[tid]) { - increaseUnreadCount('watched'); - unreadTopics.watched[tid] = true; - } - } - } - - function increaseUnreadCount(filter) { - const unreadUrl = '/unread' + (filter ? '?filter=' + filter : ''); - const newCount = 1 + parseInt($('a[href="' + config.relative_path + unreadUrl + '"].navigation-link i').attr('data-content'), 10); - updateUnreadTopicCount(unreadUrl, newCount); - } - - function markTopicsUnread(tid) { - $('[data-tid="' + tid + '"]').addClass('unread'); - } - - $(window).on('action:ajaxify.end', function () { - if (ajaxify.data.template.topic) { - ['', 'new', 'watched', 'unreplied'].forEach(function (filter) { - delete unreadTopics[filter][ajaxify.data.tid]; - }); - } - }); - socket.removeListener('event:new_post', onNewPost); - socket.on('event:new_post', onNewPost); - - socket.removeListener('event:unread.updateCount', updateUnreadCounters); - socket.on('event:unread.updateCount', updateUnreadCounters); - }; - - function updateUnreadCounters(data) { - updateUnreadTopicCount('/unread', data.unreadTopicCount); - updateUnreadTopicCount('/unread?filter=new', data.unreadNewTopicCount); - updateUnreadTopicCount('/unread?filter=watched', data.unreadWatchedTopicCount); - updateUnreadTopicCount('/unread?filter=unreplied', data.unreadUnrepliedTopicCount); - } - return Unread; }); From 3e5a0f0d68696087c69963fbd96f5a2e07fe72a1 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 1 Mar 2022 13:38:11 -0500 Subject: [PATCH 50/79] fix(deps): update dependency nodebb-plugin-mentions to v3.0.7 (#10355) Co-authored-by: Renovate Bot --- install/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/package.json b/install/package.json index 2116215eab..c15b546c4f 100644 --- a/install/package.json +++ b/install/package.json @@ -91,7 +91,7 @@ "nodebb-plugin-emoji": "3.5.17", "nodebb-plugin-emoji-android": "2.0.5", "nodebb-plugin-markdown": "9.0.8", - "nodebb-plugin-mentions": "3.0.6", + "nodebb-plugin-mentions": "3.0.7", "nodebb-plugin-spam-be-gone": "0.7.14", "nodebb-rewards-essentials": "0.2.1", "nodebb-theme-lavender": "5.3.2", From fec907d99d09603ae29389c3c3136dab4cb4370f Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Tue, 1 Mar 2022 14:30:29 -0500 Subject: [PATCH 51/79] fix: #10354, flag actions regression --- public/src/client/flags/detail.js | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/public/src/client/flags/detail.js b/public/src/client/flags/detail.js index 3eaac8c842..644b7a1c35 100644 --- a/public/src/client/flags/detail.js +++ b/public/src/client/flags/detail.js @@ -83,15 +83,15 @@ define('forum/flags/detail', [ break; case 'delete-post': - postAction('delete', ajaxify.data.target.pid, ajaxify.data.target.tid); + postAction('delete', api.del, `/posts/${ajaxify.data.target.pid}/state`); break; case 'purge-post': - postAction('purge', ajaxify.data.target.pid, ajaxify.data.target.tid); + postAction('purge', api.del, `/posts/${ajaxify.data.target.pid}`); break; case 'restore-post': - postAction('restore', ajaxify.data.target.pid, ajaxify.data.target.tid); + postAction('restore', api.put, `/posts/${ajaxify.data.target.pid}/state`); break; case 'prepare-edit': { @@ -115,23 +115,14 @@ define('forum/flags/detail', [ }); }; - function postAction(action, pid, tid) { + function postAction(action, method, path) { translator.translate('[[topic:post_' + action + '_confirm]]', function (msg) { bootbox.confirm(msg, function (confirm) { if (!confirm) { return; } - socket.emit('posts.' + action, { - pid: pid, - tid: tid, - }, function (err) { - if (err) { - alerts.error(err); - } - - ajaxify.refresh(); - }); + method(path).then(ajaxify.refresh).catch(alerts.error); }); }); } From 37ef8366d0c2c751de563286358ea16cfc86dc39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Wed, 2 Mar 2022 11:08:16 -0500 Subject: [PATCH 52/79] fix: #10360, only take top level posts --- public/src/client/topic/posts.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/src/client/topic/posts.js b/public/src/client/topic/posts.js index 4dfe7c181f..9c7c7a245d 100644 --- a/public/src/client/topic/posts.js +++ b/public/src/client/topic/posts.js @@ -132,7 +132,7 @@ define('forum/topic/posts', [ if (!isPreviousPostAdded && data.posts[0].selfPost) { return ajaxify.go('post/' + data.posts[0].pid); } - const repliesSelector = $('[component="post"]:not([data-index=0]), [component="topic/event"]'); + const repliesSelector = $('[component="topic"]>[component="post"]:not([data-index=0]), [component="topic"]>[component="topic/event"]'); createNewPosts(data, repliesSelector, direction, false, function (html) { if (html) { html.addClass('new'); From 5479f36443b3a2acce2203644c2c64cba0b66992 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Wed, 2 Mar 2022 11:41:10 -0500 Subject: [PATCH 53/79] fix: #10358, bad uploads path --- src/controllers/accounts/uploads.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/controllers/accounts/uploads.js b/src/controllers/accounts/uploads.js index d1c113846a..b8afa0d1fe 100644 --- a/src/controllers/accounts/uploads.js +++ b/src/controllers/accounts/uploads.js @@ -1,5 +1,7 @@ 'use strict'; +const path = require('path'); + const nconf = require('nconf'); const db = require('../../database'); @@ -27,7 +29,7 @@ uploadsController.get = async function (req, res, next) { userData.uploads = uploadNames.map(uploadName => ({ name: uploadName, - url: nconf.get('upload_url') + uploadName, + url: path.resolve(nconf.get('upload_url'), uploadName), })); const pageCount = Math.ceil(itemCount / itemsPerPage); userData.pagination = pagination.create(page, pageCount, req.query); From 7ee4e4e004c4f40a16fbd3417a3ea9b60765fb81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Wed, 2 Mar 2022 15:00:27 -0500 Subject: [PATCH 54/79] fix: #10357 --- src/categories/topics.js | 2 +- src/controllers/accounts/posts.js | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/categories/topics.js b/src/categories/topics.js index fdba6ab59d..020713aabe 100644 --- a/src/categories/topics.js +++ b/src/categories/topics.js @@ -163,7 +163,7 @@ module.exports = function (Categories) { if (!topic.scheduled && topic.deleted && !topic.isOwner) { topic.title = '[[topic:topic_is_deleted]]'; if (topic.hasOwnProperty('titleRaw')) { - topics.titleRaw = '[[topic:topic_is_deleted]]'; + topic.titleRaw = '[[topic:topic_is_deleted]]'; } topic.slug = topic.tid; topic.teaser = null; diff --git a/src/controllers/accounts/posts.js b/src/controllers/accounts/posts.js index a43a70ccd4..94bc2d9169 100644 --- a/src/controllers/accounts/posts.js +++ b/src/controllers/accounts/posts.js @@ -5,6 +5,7 @@ const user = require('../../user'); const posts = require('../../posts'); const topics = require('../../topics'); const categories = require('../../categories'); +const privileges = require('../../privileges'); const pagination = require('../../pagination'); const helpers = require('../helpers'); const accountHelpers = require('./helpers'); @@ -56,7 +57,8 @@ const templateToData = { return cids.map(c => `cid:${c}:uid:${userData.uid}:pids:votes`); }, getTopics: async (sets, req, start, stop) => { - const pids = await db.getSortedSetRevRangeByScore(sets, start, stop - start + 1, '+inf', 1); + let pids = await db.getSortedSetRevRangeByScore(sets, start, stop - start + 1, '+inf', 1); + pids = await privileges.posts.filter('topics:read', pids, req.uid); const postObjs = await posts.getPostSummaryByPids(pids, req.uid, { stripTags: false }); return { posts: postObjs, nextStart: stop + 1 }; }, @@ -74,7 +76,8 @@ const templateToData = { return cids.map(c => `cid:${c}:uid:${userData.uid}:pids:votes`); }, getTopics: async (sets, req, start, stop) => { - const pids = await db.getSortedSetRangeByScore(sets, start, stop - start + 1, '-inf', -1); + let pids = await db.getSortedSetRangeByScore(sets, start, stop - start + 1, '-inf', -1); + pids = await privileges.posts.filter('topics:read', pids, req.uid); const postObjs = await posts.getPostSummaryByPids(pids, req.uid, { stripTags: false }); return { posts: postObjs, nextStart: stop + 1 }; }, From 50ed3a324ca1d1d17d2198c484023230860a4901 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Wed, 2 Mar 2022 17:51:07 -0500 Subject: [PATCH 55/79] test: possible fix random psql test failure --- src/controllers/authentication.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/controllers/authentication.js b/src/controllers/authentication.js index e71ff710d7..cf2d6a55a4 100644 --- a/src/controllers/authentication.js +++ b/src/controllers/authentication.js @@ -182,7 +182,9 @@ authenticationController.registerComplete = async function (req, res) { const errors = results.map(result => result.status === 'rejected' && result.reason && result.reason.message).filter(Boolean); if (errors.length) { req.flash('errors', errors); - return res.redirect(`${nconf.get('relative_path')}/register/complete`); + return req.session.save(() => { + res.redirect(`${nconf.get('relative_path')}/register/complete`); + }); } if (req.session.registration.register === true) { From 1a6c2c55341088c9ee6b94c00f1a58a46e1b3a5b Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 2 Mar 2022 17:56:06 -0500 Subject: [PATCH 56/79] fix(deps): update dependency sharp to v0.30.2 (#10359) Co-authored-by: Renovate Bot --- install/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/package.json b/install/package.json index c15b546c4f..5e3118d55a 100644 --- a/install/package.json +++ b/install/package.json @@ -118,7 +118,7 @@ "sanitize-html": "2.7.0", "semver": "7.3.5", "serve-favicon": "2.5.0", - "sharp": "0.30.1", + "sharp": "0.30.2", "sitemap": "7.1.1", "slideout": "1.0.1", "socket.io": "4.4.1", From eac9cd03ca27c0b0f31494a27752f4bd7c4938bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Wed, 2 Mar 2022 18:29:17 -0500 Subject: [PATCH 57/79] feat: closes #10324, show recently online users as well --- src/controllers/users.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/controllers/users.js b/src/controllers/users.js index 818cb86123..ee57bf1afe 100644 --- a/src/controllers/users.js +++ b/src/controllers/users.js @@ -148,14 +148,22 @@ usersController.getUsers = async function (set, uid, query) { usersController.getUsersAndCount = async function (set, uid, start, stop) { async function getCount() { if (set === 'users:online') { - return await db.sortedSetCount('users:online', Date.now() - (meta.config.onlineCutoff * 60000), '+inf'); + return await db.sortedSetCount('users:online', Date.now() - 86400000, '+inf'); } else if (set === 'users:banned' || set === 'users:flags') { return await db.sortedSetCard(set); } return await db.getObjectField('global', 'userCount'); } + async function getUsers() { + if (set === 'users:online') { + const count = parseInt(stop, 10) === -1 ? stop : stop - start + 1; + const uids = await db.getSortedSetRevRangeByScore(set, start, count, '+inf', Date.now() - 86400000); + return await user.getUsers(uids, uid); + } + return await user.getUsersFromSet(set, uid, start, stop); + } const [usersData, count] = await Promise.all([ - user.getUsersFromSet(set, uid, start, stop), + getUsers(), getCount(), ]); return { From c75714b7e3382bff4116a14ce4563e2cc500058b Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 2 Mar 2022 18:31:19 -0500 Subject: [PATCH 58/79] fix(deps): update dependency body-parser to v1.19.2 (#10298) Co-authored-by: Renovate Bot --- install/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/package.json b/install/package.json index 5e3118d55a..2e311df9dd 100644 --- a/install/package.json +++ b/install/package.json @@ -35,7 +35,7 @@ "autoprefixer": "10.4.2", "bcryptjs": "2.4.3", "benchpressjs": "2.4.3", - "body-parser": "1.19.1", + "body-parser": "1.19.2", "bootbox": "5.5.2", "bootstrap": "3.4.1", "chalk": "4.1.2", From 4d590f6550340448b5a735f0ff49b1fa4c902edf Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 2 Mar 2022 18:34:24 -0500 Subject: [PATCH 59/79] fix(deps): update dependency nodebb-theme-persona to v11.4.2 (#10361) Co-authored-by: Renovate Bot --- install/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/package.json b/install/package.json index 2e311df9dd..29f9c0b763 100644 --- a/install/package.json +++ b/install/package.json @@ -95,7 +95,7 @@ "nodebb-plugin-spam-be-gone": "0.7.14", "nodebb-rewards-essentials": "0.2.1", "nodebb-theme-lavender": "5.3.2", - "nodebb-theme-persona": "11.4.1", + "nodebb-theme-persona": "11.4.2", "nodebb-theme-slick": "1.4.23", "nodebb-theme-vanilla": "12.1.17", "nodebb-widget-essentials": "5.0.9", From 2cc3f0a19a64a968008e376496f7e63af89519e8 Mon Sep 17 00:00:00 2001 From: "Misty (Bot)" Date: Thu, 3 Mar 2022 04:05:37 -0500 Subject: [PATCH 60/79] Latest translations and fallbacks --- public/language/tr/admin/settings/uploads.json | 2 +- public/language/tr/global.json | 2 +- public/language/tr/modules.json | 2 +- public/language/tr/topic.json | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/public/language/tr/admin/settings/uploads.json b/public/language/tr/admin/settings/uploads.json index b5f75b4b3f..fb86843457 100644 --- a/public/language/tr/admin/settings/uploads.json +++ b/public/language/tr/admin/settings/uploads.json @@ -2,7 +2,7 @@ "posts": "İletiler", "private": "Yüklenen dosyaları gizli yap", "strip-exif-data": "EXIF bilgilerini sil", - "preserve-orphaned-uploads": "Keep uploaded files on disk after a post is purged", + "preserve-orphaned-uploads": "Bir ileti kaldırıldıktan sonra yüklenilen dosyaları diskte bırak", "private-extensions": "Gizli yapılacak dosya uzantıları", "private-uploads-extensions-help": "Buraya gizli yapılacak dosya uzantıları listesini virgülle ayırarak giriniz. (ör. pdf,xls,doc). Boş bırakmak, tüm dosyaların gizli olacağı anlamına gelir.", "resize-image-width-threshold": "Belirtilen genişlikten daha genişse görüntüleri yeniden boyutlandırın", diff --git a/public/language/tr/global.json b/public/language/tr/global.json index f743ebc4bb..ec24809b05 100644 --- a/public/language/tr/global.json +++ b/public/language/tr/global.json @@ -23,7 +23,7 @@ "close": "Kapat", "pagination": "Sayfalara numara koyma", "pagination.out_of": "%1 - %2", - "pagination.enter_index": "Go to post index", + "pagination.enter_index": "İleti dizinine git", "header.admin": "Yönetim", "header.categories": "Kategoriler", "header.recent": "Güncel", diff --git a/public/language/tr/modules.json b/public/language/tr/modules.json index 502360b4b0..47522447ac 100644 --- a/public/language/tr/modules.json +++ b/public/language/tr/modules.json @@ -59,7 +59,7 @@ "composer.upload-file": "Dosya Yükle", "composer.zen_mode": "Tam ekran modu", "composer.select_category": "Bir kategori seç", - "composer.textarea.placeholder": "İletinizi buraya giriniz, görselleri sürükleyip bırakabilirsiniz", + "composer.textarea.placeholder": "iletinizi buraya giriniz, görselleri sürükleyip bırakabilirsiniz...", "composer.schedule-for": "Konuyu Zamanla", "composer.schedule-date": "Tarih", "composer.schedule-time": "Zaman", diff --git a/public/language/tr/topic.json b/public/language/tr/topic.json index 50ee344b4b..7ff3c8239e 100644 --- a/public/language/tr/topic.json +++ b/public/language/tr/topic.json @@ -181,7 +181,7 @@ "timeago_earlier": "%1 önce", "first-post": "İlk ileti", "last-post": "Son ileti", - "go-to-my-next-post": "Go to my next post", - "no-more-next-post": "You don't have more posts in this topic", + "go-to-my-next-post": "Diğer iletime git", + "no-more-next-post": "Bu başlıkta başka bir iletiniz bulunmamaktadır.", "post-quick-reply": "Hızlı yanıt gönder" } \ No newline at end of file From 4b730df974809370fd7533655d00ce6da79b5b7f Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 3 Mar 2022 12:50:17 -0500 Subject: [PATCH 61/79] fix(deps): update dependency mongodb to v4.4.1 (#10364) Co-authored-by: Renovate Bot --- install/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/package.json b/install/package.json index 29f9c0b763..700600dede 100644 --- a/install/package.json +++ b/install/package.json @@ -79,7 +79,7 @@ "material-design-lite": "1.3.0", "mime": "3.0.0", "mkdirp": "1.0.4", - "mongodb": "4.4.0", + "mongodb": "4.4.1", "morgan": "1.10.0", "mousetrap": "1.6.5", "multiparty": "4.2.3", From cc665fd614c101d4b4074d57cf1c46e032dd0e22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Thu, 3 Mar 2022 18:16:05 -0500 Subject: [PATCH 62/79] fix: lastonline timestamps and display for guests --- src/controllers/users.js | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/src/controllers/users.js b/src/controllers/users.js index ee57bf1afe..d177d8989c 100644 --- a/src/controllers/users.js +++ b/src/controllers/users.js @@ -8,6 +8,7 @@ const pagination = require('../pagination'); const privileges = require('../privileges'); const helpers = require('./helpers'); const api = require('../api'); +const utils = require('../utils'); const usersController = module.exports; @@ -51,10 +52,10 @@ usersController.getOnlineUsers = async function (req, res) { let hiddenCount = 0; if (!userData.isAdminOrGlobalMod) { userData.users = userData.users.filter((user) => { - if (user && user.status === 'offline') { + if (user && user.userStatus === 'offline') { hiddenCount += 1; } - return user && user.status !== 'offline'; + return user && user.userStatus !== 'offline'; }); } @@ -157,8 +158,22 @@ usersController.getUsersAndCount = async function (set, uid, start, stop) { async function getUsers() { if (set === 'users:online') { const count = parseInt(stop, 10) === -1 ? stop : stop - start + 1; - const uids = await db.getSortedSetRevRangeByScore(set, start, count, '+inf', Date.now() - 86400000); - return await user.getUsers(uids, uid); + const data = await db.getSortedSetRevRangeByScoreWithScores(set, start, count, '+inf', Date.now() - 86400000); + const uids = data.map(d => d.value); + const scores = data.map(d => d.score); + const [userStatus, userData] = await Promise.all([ + user.getUsersFields(uids, ['status']), + user.getUsers(uids, uid), + ]); + + userData.forEach((user, i) => { + if (user) { + user.lastonline = scores[i]; + user.lastonlineISO = utils.toISOString(user.lastonline); + user.userStatus = userStatus[i].status || 'online'; + } + }); + return userData; } return await user.getUsersFromSet(set, uid, start, stop); } From 21cd1e612fe256fce31d6352301c9d396b22e926 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Thu, 3 Mar 2022 18:16:24 -0500 Subject: [PATCH 63/79] fix: db call --- src/controllers/users.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/controllers/users.js b/src/controllers/users.js index d177d8989c..40a6e2b9ac 100644 --- a/src/controllers/users.js +++ b/src/controllers/users.js @@ -162,7 +162,7 @@ usersController.getUsersAndCount = async function (set, uid, start, stop) { const uids = data.map(d => d.value); const scores = data.map(d => d.score); const [userStatus, userData] = await Promise.all([ - user.getUsersFields(uids, ['status']), + db.getObjectsFields(uids.map(uid => `user:${uid}`), ['status']), user.getUsers(uids, uid), ]); From 56345777ce7bf32a3841ca2b2ed4a714af08e69e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Fri, 4 Mar 2022 13:28:54 -0500 Subject: [PATCH 64/79] fix: always show self on /users?online --- src/controllers/users.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/controllers/users.js b/src/controllers/users.js index 40a6e2b9ac..2f697c4b9c 100644 --- a/src/controllers/users.js +++ b/src/controllers/users.js @@ -52,10 +52,11 @@ usersController.getOnlineUsers = async function (req, res) { let hiddenCount = 0; if (!userData.isAdminOrGlobalMod) { userData.users = userData.users.filter((user) => { - if (user && user.userStatus === 'offline') { + const showUser = user && (user.uid === req.uid || user.userStatus !== 'offline'); + if (!showUser) { hiddenCount += 1; } - return user && user.userStatus !== 'offline'; + return showUser; }); } From 62187caa673eb2b32c8390dd3a9ad6281a9a0790 Mon Sep 17 00:00:00 2001 From: gasoved Date: Fri, 4 Mar 2022 23:38:16 +0300 Subject: [PATCH 65/79] feat: post auto flagging on downvotes #10029 (#10367) * feat: post auto flagging on downvotes * fix: just get one admin --- install/data/defaults.json | 1 + .../en-GB/admin/settings/reputation.json | 1 + public/language/en-GB/flags.json | 3 ++- src/cli/user.js | 2 +- src/flags.js | 16 +++++++++------- src/posts/votes.js | 9 +++++++++ src/user/index.js | 4 ++++ src/views/admin/settings/reputation.tpl | 4 ++++ 8 files changed, 31 insertions(+), 9 deletions(-) diff --git a/install/data/defaults.json b/install/data/defaults.json index 2eb0a15bb1..952702a3fb 100644 --- a/install/data/defaults.json +++ b/install/data/defaults.json @@ -87,6 +87,7 @@ "min:rep:aboutme": 0, "min:rep:signature": 0, "flags:limitPerTarget": 0, + "flags:autoFlagOnDownvoteThreshold": 0, "notificationType_upvote": "notification", "notificationType_new-topic": "notification", "notificationType_new-reply": "notification", diff --git a/public/language/en-GB/admin/settings/reputation.json b/public/language/en-GB/admin/settings/reputation.json index 7cfa636521..8ea8cda4c1 100644 --- a/public/language/en-GB/admin/settings/reputation.json +++ b/public/language/en-GB/admin/settings/reputation.json @@ -18,5 +18,6 @@ "flags.limit-per-target": "Maximum number of times something can be flagged", "flags.limit-per-target-placeholder": "Default: 0", "flags.limit-per-target-help": "When a post or user is flagged multiple times, each additional flag is considered a "report" and added to the original flag. Set this option to a number other than zero to limit the number of reports an item can receive.", + "flags.auto-flag-on-downvote-threshold": "Number of downvotes to auto flag posts (Set to 0 to disable, default: 0)", "flags.auto-resolve-on-ban": "Automatically resolve all of a user's tickets when they are banned" } \ No newline at end of file diff --git a/public/language/en-GB/flags.json b/public/language/en-GB/flags.json index 5bd46b6b1d..d526bd6e25 100644 --- a/public/language/en-GB/flags.json +++ b/public/language/en-GB/flags.json @@ -81,5 +81,6 @@ "bulk-actions": "Bulk Actions", "bulk-resolve": "Resolve Flag(s)", "bulk-success": "%1 flags updated", - "flagged-timeago-readable": "Flagged (%2)" + "flagged-timeago-readable": "Flagged (%2)", + "auto-flagged": "[Auto Flagged] Received %1 downvotes." } \ No newline at end of file diff --git a/src/cli/user.js b/src/cli/user.js index 097ff8bd3b..bbd747865f 100644 --- a/src/cli/user.js +++ b/src/cli/user.js @@ -101,7 +101,7 @@ async function execute(cmd, args) { function UserCmdHelpers() { async function getAdminUidOrFail() { - const adminUid = (await db.getSortedSetMembers('group:administrators:members')).reverse()[0]; + const adminUid = await user.getFirstAdminUid(); if (!adminUid) { const err = new Error('An admin account does not exists to execute the operation.'); err.name = 'UserError'; diff --git a/src/flags.js b/src/flags.js index 60543ae1ce..990cced428 100644 --- a/src/flags.js +++ b/src/flags.js @@ -377,7 +377,7 @@ Flags.deleteNote = async function (flagId, datetime) { await db.sortedSetRemove(`flag:${flagId}:notes`, note[0]); }; -Flags.create = async function (type, id, uid, reason, timestamp) { +Flags.create = async function (type, id, uid, reason, timestamp, forceFlag = false) { let doHistoryAppend = false; if (!timestamp) { timestamp = Date.now(); @@ -387,14 +387,14 @@ Flags.create = async function (type, id, uid, reason, timestamp) { // Sanity checks Flags.exists(type, id, uid), Flags.targetExists(type, id), - Flags.canFlag(type, id, uid), + Flags.canFlag(type, id, uid, forceFlag), Flags.targetFlagged(type, id), // Extra data for zset insertion Flags.getTargetUid(type, id), Flags.getTargetCid(type, id), ]); - if (flagExists) { + if (!forceFlag && flagExists) { throw new Error(`[[error:${type}-already-flagged]]`); } else if (!targetExists) { throw new Error('[[error:invalid-data]]'); @@ -499,9 +499,9 @@ Flags.exists = async function (type, id, uid) { return await db.isSortedSetMember('flags:hash', [type, id, uid].join(':')); }; -Flags.canFlag = async function (type, id, uid) { +Flags.canFlag = async function (type, id, uid, skipLimitCheck = false) { const limit = meta.config['flags:limitPerTarget']; - if (limit > 0) { + if (!skipLimitCheck && limit > 0) { const score = await db.sortedSetScore('flags:byTarget', `${type}:${id}`); if (score >= limit) { throw new Error(`[[error:${type}-flagged-too-many-times]]`); @@ -729,7 +729,7 @@ Flags.appendNote = async function (flagId, uid, note, datetime) { }); }; -Flags.notify = async function (flagObj, uid) { +Flags.notify = async function (flagObj, uid, notifySelf = false) { const [admins, globalMods] = await Promise.all([ groups.getMembers('administrators', 0, -1), groups.getMembers('Global Moderators', 0, -1), @@ -780,7 +780,9 @@ Flags.notify = async function (flagObj, uid) { from: uid, to: uids, }); - uids = uids.filter(_uid => parseInt(_uid, 10) !== parseInt(uid, 10)); + if (!notifySelf) { + uids = uids.filter(_uid => parseInt(_uid, 10) !== parseInt(uid, 10)); + } await notifications.push(notifObj, uids); }; diff --git a/src/posts/votes.js b/src/posts/votes.js index 1a56c4a66d..08466a2fe8 100644 --- a/src/posts/votes.js +++ b/src/posts/votes.js @@ -2,10 +2,12 @@ const meta = require('../meta'); const db = require('../database'); +const flags = require('../flags'); const user = require('../user'); const topics = require('../topics'); const plugins = require('../plugins'); const privileges = require('../privileges'); +const translator = require('../translator'); module.exports = function (Posts) { const votesInProgress = {}; @@ -243,6 +245,13 @@ module.exports = function (Posts) { if (!postData || !postData.pid || !postData.tid) { return; } + const threshold = meta.config['flags:autoFlagOnDownvoteThreshold']; + if (threshold && postData.votes <= (-threshold)) { + const adminUid = await user.getFirstAdminUid(); + const reportMsg = await translator.translate(`[[flags:auto-flagged, ${-postData.votes}]]`); + const flagObj = await flags.create('post', postData.pid, adminUid, reportMsg, null, true); + await flags.notify(flagObj, adminUid, true); + } await Promise.all([ updateTopicVoteCount(postData), db.sortedSetAdd('posts:votes', postData.votes, postData.pid), diff --git a/src/user/index.js b/src/user/index.js index 6a52886011..3f409669cf 100644 --- a/src/user/index.js +++ b/src/user/index.js @@ -211,6 +211,10 @@ User.getAdminsandGlobalModsandModerators = async function () { return await User.getUsersData(_.union(...results)); }; +User.getFirstAdminUid = async function () { + return (await db.getSortedSetRange('group:administrators:members', 0, 0))[0]; +}; + User.getModeratorUids = async function () { const cids = await categories.getAllCidsFromSet('categories:cid'); const uids = await categories.getModeratorUids(cids); diff --git a/src/views/admin/settings/reputation.tpl b/src/views/admin/settings/reputation.tpl index c6e5c62387..24f8e632a1 100644 --- a/src/views/admin/settings/reputation.tpl +++ b/src/views/admin/settings/reputation.tpl @@ -82,6 +82,10 @@ [[admin/settings/reputation:flags.limit-per-target-help]]

+
+ + +