mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-12-19 15:00:22 +01:00
Compare commits
4 Commits
protocol-v
...
v1.11.0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ab5035f4e2 | ||
|
|
2555d72c84 | ||
|
|
213582df8b | ||
|
|
543336070a |
@@ -2,7 +2,7 @@
|
|||||||
"name": "nodebb",
|
"name": "nodebb",
|
||||||
"license": "GPL-3.0",
|
"license": "GPL-3.0",
|
||||||
"description": "NodeBB Forum",
|
"description": "NodeBB Forum",
|
||||||
"version": "1.10.2",
|
"version": "1.11.0",
|
||||||
"homepage": "http://www.nodebb.org",
|
"homepage": "http://www.nodebb.org",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
@@ -80,7 +80,7 @@
|
|||||||
"mubsub-nbb": "^1.5.0",
|
"mubsub-nbb": "^1.5.0",
|
||||||
"nconf": "^0.10.0",
|
"nconf": "^0.10.0",
|
||||||
"nodebb-plugin-composer-default": "6.1.10",
|
"nodebb-plugin-composer-default": "6.1.10",
|
||||||
"nodebb-plugin-dbsearch": "3.0.0",
|
"nodebb-plugin-dbsearch": "3.0.3",
|
||||||
"nodebb-plugin-emoji": "^2.2.5",
|
"nodebb-plugin-emoji": "^2.2.5",
|
||||||
"nodebb-plugin-emoji-android": "2.0.0",
|
"nodebb-plugin-emoji-android": "2.0.0",
|
||||||
"nodebb-plugin-markdown": "8.8.5",
|
"nodebb-plugin-markdown": "8.8.5",
|
||||||
|
|||||||
@@ -335,12 +335,14 @@ Categories.flattenCategories = function (allCategories, categoryData) {
|
|||||||
*/
|
*/
|
||||||
Categories.getTree = function (categories, parentCid) {
|
Categories.getTree = function (categories, parentCid) {
|
||||||
parentCid = parentCid || 0;
|
parentCid = parentCid || 0;
|
||||||
const cids = categories.map(category => category.cid);
|
const cids = categories.map(category => category && category.cid);
|
||||||
const cidToCategory = {};
|
const cidToCategory = {};
|
||||||
const parents = {};
|
const parents = {};
|
||||||
cids.forEach((cid, index) => {
|
cids.forEach((cid, index) => {
|
||||||
cidToCategory[cid] = categories[index];
|
if (cid) {
|
||||||
parents[cid] = _.clone(categories[index]);
|
cidToCategory[cid] = categories[index];
|
||||||
|
parents[cid] = _.clone(categories[index]);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const tree = [];
|
const tree = [];
|
||||||
|
|||||||
@@ -47,11 +47,11 @@ module.require = function (p) {
|
|||||||
if (err.code === 'MODULE_NOT_FOUND') {
|
if (err.code === 'MODULE_NOT_FOUND') {
|
||||||
let stackLine = err.stack.split('\n');
|
let stackLine = err.stack.split('\n');
|
||||||
stackLine = stackLine.find(line => line.includes('nodebb-plugin') || line.includes('nodebb-theme'));
|
stackLine = stackLine.find(line => line.includes('nodebb-plugin') || line.includes('nodebb-theme'));
|
||||||
winston.warn('[plugins/require] ' + err.message + ', please update your plugin!\n' + stackLine);
|
var deprecatedPath = err.message.replace('Cannot find module ', '');
|
||||||
|
winston.warn('[deprecated] requiring core modules with `module.parent.require(' + deprecatedPath + ')` is deprecated. Please use `require.main.require("./src/<module_name>")` instead.\n' + stackLine);
|
||||||
if (path.isAbsolute(p)) {
|
if (path.isAbsolute(p)) {
|
||||||
throw err;
|
throw err;
|
||||||
}
|
}
|
||||||
|
|
||||||
return defaultRequire.apply(module, [path.join('../', p)]);
|
return defaultRequire.apply(module, [path.join('../', p)]);
|
||||||
}
|
}
|
||||||
throw err;
|
throw err;
|
||||||
|
|||||||
Reference in New Issue
Block a user