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