Node.js based forum software built for the modern web
remove parseInts
Barış Soner Uşaklı369e4854d21a
diff --git a/src/socket.io/topics/tools.js b/src/socket.io/topics/tools.jsindex b6679b9a61..d681a0b95e 100644--- a/src/socket.io/topics/tools.js+++ b/src/socket.io/topics/tools.js@@ -16,7 +16,7 @@ module.exports = function (SocketTopics) {if (!data) {return callback(new Error('[[error:invalid-data]]'));}- var topic;+async.waterfall([function (next) {async.parallel({@@ -32,16 +32,13 @@ module.exports = function (SocketTopics) {if (!results.topic) {return next(new Error('[[error:no-topic]]'));}- topic = results.topic;- topic.privileges = results.privileges;++ results.topic.privileges = results.privileges;plugins.fireHook('filter:topic.thread_tools', { topic: results.topic, uid: socket.uid, tools: [] }, next);},function (data, next) {- topic.deleted = parseInt(topic.deleted, 10) === 1;- topic.locked = parseInt(topic.locked, 10) === 1;- topic.pinned = parseInt(topic.pinned, 10) === 1;- topic.thread_tools = data.tools;- next(null, topic);+ data.topic.thread_tools = data.tools;+ next(null, data.topic);},], callback);};