mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-01-01 05:10:42 +01:00
fix: #7041
This commit is contained in:
@@ -66,6 +66,7 @@
|
||||
"reputation:disabled": 0,
|
||||
"downvote:disabled": 0,
|
||||
"disableSignatures": 0,
|
||||
"min:rep:downvote": 0,
|
||||
"min:rep:flag": 0,
|
||||
"min:rep:profile-picture": 0,
|
||||
"min:rep:cover-picture": 0,
|
||||
|
||||
@@ -46,6 +46,8 @@ function deserialize(config) {
|
||||
return deserialized;
|
||||
}
|
||||
|
||||
Configs.deserialize = deserialize;
|
||||
|
||||
Configs.init = function (callback) {
|
||||
var config;
|
||||
async.waterfall([
|
||||
|
||||
@@ -179,10 +179,8 @@ SocketAdmin.config.setMultiple = function (socket, data, callback) {
|
||||
}
|
||||
|
||||
var changes = {};
|
||||
data = meta.configs.deserialize(data);
|
||||
Object.keys(data).forEach(function (key) {
|
||||
if (typeof meta.config[key] === 'number') {
|
||||
data[key] = parseInt(data[key], 10);
|
||||
}
|
||||
if (data[key] !== meta.config[key]) {
|
||||
changes[key] = data[key];
|
||||
changes[key + '_old'] = meta.config[key];
|
||||
|
||||
Reference in New Issue
Block a user