mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-12-20 23:40:38 +01:00
Compare commits
13 Commits
socket.io-
...
v3.1.6
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
35efc444ce | ||
|
|
8620a2cd0a | ||
|
|
a757716ddd | ||
|
|
b0d1686185 | ||
|
|
3eaf04827e | ||
|
|
1d1639d46f | ||
|
|
c5cd76e798 | ||
|
|
b73f307abe | ||
|
|
6aae88d5dd | ||
|
|
0c4870ec12 | ||
|
|
67f44a3212 | ||
|
|
3256fb30e7 | ||
|
|
24ebb1536b |
36
CHANGELOG.md
36
CHANGELOG.md
@@ -1,3 +1,39 @@
|
|||||||
|
#### v3.1.5 (2023-06-13)
|
||||||
|
|
||||||
|
##### Chores
|
||||||
|
|
||||||
|
* fix persona (74174414)
|
||||||
|
* up themes (97ff1f11)
|
||||||
|
* incrementing version number - v3.1.4 (2452783c)
|
||||||
|
* update changelog for v3.1.4 (633dc2de)
|
||||||
|
* incrementing version number - v3.1.3 (3b4e9d3f)
|
||||||
|
* incrementing version number - v3.1.2 (40fa3489)
|
||||||
|
* incrementing version number - v3.1.1 (40250733)
|
||||||
|
* incrementing version number - v3.1.0 (0cb386bd)
|
||||||
|
* incrementing version number - v3.0.1 (26f6ea49)
|
||||||
|
* incrementing version number - v3.0.0 (224e08cd)
|
||||||
|
|
||||||
|
##### New Features
|
||||||
|
|
||||||
|
* add back support for req.body._csrf (67f44a32)
|
||||||
|
|
||||||
|
##### Bug Fixes
|
||||||
|
|
||||||
|
* improper neutralization of user input in image wrapping code (1d1639d4)
|
||||||
|
* don't update edit data if edited timestamp is not available (c5cd76e7)
|
||||||
|
* filter null nav items (b73f307a)
|
||||||
|
* rimraf usage in user image delete (3256fb30)
|
||||||
|
* closes #11620, fix copy code when line numbers are enabled (82e26829)
|
||||||
|
* logins dashboard user images (8cb6ebb9)
|
||||||
|
|
||||||
|
##### Refactors
|
||||||
|
|
||||||
|
* change welcome headers to be smaller (0c4870ec)
|
||||||
|
|
||||||
|
##### Tests
|
||||||
|
|
||||||
|
* remove socket.io test (24ebb153)
|
||||||
|
|
||||||
#### v3.1.4 (2023-05-18)
|
#### v3.1.4 (2023-05-18)
|
||||||
|
|
||||||
##### Chores
|
##### Chores
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
# Welcome to your brand new NodeBB forum!
|
### Welcome to your brand new NodeBB forum!
|
||||||
|
|
||||||
This is what a topic and post looks like. As an administrator, you can edit the post\'s title and content.
|
This is what a topic and post looks like. As an administrator, you can edit the post\'s title and content.
|
||||||
To customise your forum, go to the [Administrator Control Panel](../../admin). You can modify all aspects of your forum there, including installation of third-party plugins.
|
To customise your forum, go to the [Administrator Control Panel](../../admin). You can modify all aspects of your forum there, including installation of third-party plugins.
|
||||||
|
|
||||||
## Additional Resources
|
#### Additional Resources
|
||||||
|
|
||||||
* [NodeBB Documentation](https://docs.nodebb.org)
|
* [NodeBB Documentation](https://docs.nodebb.org)
|
||||||
* [Community Support Forum](https://community.nodebb.org)
|
* [Community Support Forum](https://community.nodebb.org)
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
"name": "nodebb",
|
"name": "nodebb",
|
||||||
"license": "GPL-3.0",
|
"license": "GPL-3.0",
|
||||||
"description": "NodeBB Forum",
|
"description": "NodeBB Forum",
|
||||||
"version": "3.1.4",
|
"version": "3.1.6",
|
||||||
"homepage": "https://www.nodebb.org",
|
"homepage": "https://www.nodebb.org",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
|||||||
@@ -371,7 +371,7 @@ define('forum/topic', [
|
|||||||
}
|
}
|
||||||
|
|
||||||
function setupQuickReply() {
|
function setupQuickReply() {
|
||||||
if (config.enableQuickReply || config.theme.enableQuickReply) {
|
if (config.enableQuickReply || (config.theme && config.theme.enableQuickReply)) {
|
||||||
quickreply.init();
|
quickreply.init();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -142,19 +142,21 @@ define('forum/topic/events', [
|
|||||||
posts.addBlockquoteEllipses(editedPostEl.parent());
|
posts.addBlockquoteEllipses(editedPostEl.parent());
|
||||||
editedPostEl.fadeIn(250);
|
editedPostEl.fadeIn(250);
|
||||||
|
|
||||||
const editData = {
|
if (data.post.edited) {
|
||||||
editor: data.editor,
|
const editData = {
|
||||||
editedISO: utils.toISOString(data.post.edited),
|
editor: data.editor,
|
||||||
};
|
editedISO: utils.toISOString(data.post.edited),
|
||||||
|
};
|
||||||
|
|
||||||
app.parseAndTranslate('partials/topic/post-editor', editData, function (html) {
|
app.parseAndTranslate('partials/topic/post-editor', editData, function (html) {
|
||||||
editorEl.replaceWith(html);
|
editorEl.replaceWith(html);
|
||||||
postContainer.find('[component="post/edit-indicator"]')
|
postContainer.find('[component="post/edit-indicator"]')
|
||||||
.removeClass('hidden')
|
.removeClass('hidden')
|
||||||
.translateAttr('title', `[[global:edited-timestamp, ${editData.editedISO}]]`);
|
.translateAttr('title', `[[global:edited-timestamp, ${editData.editedISO}]]`);
|
||||||
postContainer.find('[component="post/editor"] .timeago').timeago();
|
postContainer.find('[component="post/editor"] .timeago').timeago();
|
||||||
hooks.fire('action:posts.edited', data);
|
hooks.fire('action:posts.edited', data);
|
||||||
});
|
});
|
||||||
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
hooks.fire('action:posts.edited', data);
|
hooks.fire('action:posts.edited', data);
|
||||||
|
|||||||
@@ -26,8 +26,9 @@ define('forum/topic/images', [], function () {
|
|||||||
const srcExt = src.split('.').slice(1).pop();
|
const srcExt = src.split('.').slice(1).pop();
|
||||||
const altFilename = alt.split('/').pop();
|
const altFilename = alt.split('/').pop();
|
||||||
const altExt = altFilename.split('.').slice(1).pop();
|
const altExt = altFilename.split('.').slice(1).pop();
|
||||||
|
|
||||||
imageEl.wrap('<a href="' + src + '" ' +
|
imageEl.wrap('<a href="' + src + '" ' +
|
||||||
(!srcExt && altExt ? ' download="' + altFilename + '" ' : '') +
|
(!srcExt && altExt ? ' download="' + utils.escapeHTML(altFilename) + '" ' : '') +
|
||||||
' target="_blank" rel="noopener">');
|
' target="_blank" rel="noopener">');
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -440,7 +440,7 @@ define('forum/topic/posts', [
|
|||||||
blockquotes.each(function () {
|
blockquotes.each(function () {
|
||||||
const $this = $(this);
|
const $this = $(this);
|
||||||
if ($this.find(':hidden:not(br)').length && !$this.find('.toggle').length) {
|
if ($this.find(':hidden:not(br)').length && !$this.find('.toggle').length) {
|
||||||
$this.append('<i class="fa fa-angle-down pointer toggle"></i>');
|
$this.append('<i class="d-inline-block fa fa-angle-down pointer toggle py-1 px-3 border text-bg-light"></i>');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -111,7 +111,7 @@ Messaging.getRecentChats = async (callerUid, uid, start, stop) => {
|
|||||||
teasers: Promise.all(roomIds.map(async roomId => Messaging.getTeaser(uid, roomId))),
|
teasers: Promise.all(roomIds.map(async roomId => Messaging.getTeaser(uid, roomId))),
|
||||||
});
|
});
|
||||||
|
|
||||||
results.roomData.forEach((room, index) => {
|
await Promise.all(results.roomData.map(async (room, index) => {
|
||||||
if (room) {
|
if (room) {
|
||||||
room.users = results.users[index];
|
room.users = results.users[index];
|
||||||
room.groupChat = room.hasOwnProperty('groupChat') ? room.groupChat : room.users.length > 2;
|
room.groupChat = room.hasOwnProperty('groupChat') ? room.groupChat : room.users.length > 2;
|
||||||
@@ -125,12 +125,9 @@ Messaging.getRecentChats = async (callerUid, uid, start, stop) => {
|
|||||||
});
|
});
|
||||||
room.users = room.users.filter(user => user && parseInt(user.uid, 10));
|
room.users = room.users.filter(user => user && parseInt(user.uid, 10));
|
||||||
room.lastUser = room.users[0];
|
room.lastUser = room.users[0];
|
||||||
|
|
||||||
room.usernames = Messaging.generateUsernames(room.users, uid);
|
room.usernames = Messaging.generateUsernames(room.users, uid);
|
||||||
|
room.chatWithMessage = await Messaging.generateChatWithMessage(room.users, uid);
|
||||||
}
|
}
|
||||||
});
|
|
||||||
await Promise.all(results.roomData.map(async (room) => {
|
|
||||||
room.chatWithMessage = await Messaging.generateChatWithMessage(room.users, uid);
|
|
||||||
}));
|
}));
|
||||||
|
|
||||||
results.roomData = results.roomData.filter(Boolean);
|
results.roomData = results.roomData.filter(Boolean);
|
||||||
|
|||||||
@@ -12,7 +12,9 @@ const {
|
|||||||
return req.headers['x-csrf-token'];
|
return req.headers['x-csrf-token'];
|
||||||
} else if (req.body && req.body.csrf_token) {
|
} else if (req.body && req.body.csrf_token) {
|
||||||
return req.body.csrf_token;
|
return req.body.csrf_token;
|
||||||
} else if (req.query) {
|
} else if (req.body && req.body._csrf) {
|
||||||
|
return req.body._csrf;
|
||||||
|
} else if (req.query && req.query._csrf) {
|
||||||
return req.query._csrf;
|
return req.query._csrf;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ admin.get = async function () {
|
|||||||
}
|
}
|
||||||
const ids = await db.getSortedSetRange('navigation:enabled', 0, -1);
|
const ids = await db.getSortedSetRange('navigation:enabled', 0, -1);
|
||||||
const data = await db.getObjects(ids.map(id => `navigation:enabled:${id}`));
|
const data = await db.getObjects(ids.map(id => `navigation:enabled:${id}`));
|
||||||
cache = data.map((item) => {
|
cache = data.filter(Boolean).map((item) => {
|
||||||
if (item.hasOwnProperty('groups')) {
|
if (item.hasOwnProperty('groups')) {
|
||||||
try {
|
try {
|
||||||
item.groups = JSON.parse(item.groups);
|
item.groups = JSON.parse(item.groups);
|
||||||
|
|||||||
@@ -208,9 +208,6 @@ module.exports = function (User) {
|
|||||||
|
|
||||||
async function deleteImages(uid) {
|
async function deleteImages(uid) {
|
||||||
const folder = path.join(nconf.get('upload_path'), 'profile');
|
const folder = path.join(nconf.get('upload_path'), 'profile');
|
||||||
await Promise.all([
|
await rimraf(`${uid}-profile{avatar,cover}*`, { glob: { cwd: folder } });
|
||||||
rimraf(path.join(folder, `${uid}-profilecover*`), { glob: true }),
|
|
||||||
rimraf(path.join(folder, `${uid}-profileavatar*`), { glob: true }),
|
|
||||||
]);
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -107,14 +107,6 @@ describe('socket.io', () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should return error for invalid eventName type', (done) => {
|
|
||||||
const eventName = ['topics.loadMoreTags'];
|
|
||||||
io.emit(eventName, (err) => {
|
|
||||||
assert.strictEqual(err.message, `[[error:invalid-event, object]]`);
|
|
||||||
done();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should get installed themes', (done) => {
|
it('should get installed themes', (done) => {
|
||||||
const themes = ['nodebb-theme-persona'];
|
const themes = ['nodebb-theme-persona'];
|
||||||
io.emit('admin.themes.getInstalled', (err, data) => {
|
io.emit('admin.themes.getInstalled', (err, data) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user