diff --git a/package.json b/package.json index a763a58892..9cf1c7207d 100644 --- a/package.json +++ b/package.json @@ -48,7 +48,7 @@ "mime": "^1.3.4", "minimist": "^1.1.1", "mkdirp": "~0.5.0", - "mongodb": "2.2.16", + "mongodb": "2.2.25", "morgan": "^1.3.2", "mousetrap": "^1.5.3", "nconf": "~0.8.2", diff --git a/public/language/en-GB/admin/settings/reputation.json b/public/language/en-GB/admin/settings/reputation.json index 11d6184721..f0e59e8db9 100644 --- a/public/language/en-GB/admin/settings/reputation.json +++ b/public/language/en-GB/admin/settings/reputation.json @@ -2,6 +2,7 @@ "reputation": "Reputation Settings", "disable": "Disable Reputation System", "disable-down-voting": "Disable Down Voting", + "votes-are-public": "All Votes Are Public", "thresholds": "Activity Thresholds", "min-rep-downvote": "Minimum reputation to downvote posts", "min-rep-flag": "Minimum reputation to flag posts" diff --git a/src/database/mongo.js b/src/database/mongo.js index 8e6494ffd7..dcf1f69e31 100644 --- a/src/database/mongo.js +++ b/src/database/mongo.js @@ -79,9 +79,10 @@ var connOptions = { server: { poolSize: parseInt(nconf.get('mongo:poolSize'), 10) || 10, - socketOptions: { autoReconnect: true, keepAlive: nconf.get('mongo:keepAlive') || 0 }, + socketOptions: { keepAlive: nconf.get('mongo:keepAlive') || 0 }, reconnectTries: 3600, reconnectInterval: 1000, + auto_reconnect: true, }, }; diff --git a/src/socket.io/posts/votes.js b/src/socket.io/posts/votes.js index 0c12fe262d..3e65964343 100644 --- a/src/socket.io/posts/votes.js +++ b/src/socket.io/posts/votes.js @@ -6,6 +6,7 @@ var db = require('../../database'); var user = require('../../user'); var posts = require('../../posts'); var privileges = require('../../privileges'); +var meta = require('../../meta'); var helpers = require('./helpers'); module.exports = function (SocketPosts) { @@ -16,6 +17,9 @@ module.exports = function (SocketPosts) { async.waterfall([ function (next) { + if (parseInt(meta.config.votesArePublic, 10) !== 0) { + return next(null, true); + } privileges.categories.isAdminOrMod(data.cid, socket.uid, next); }, function (isAdminOrMod, next) { diff --git a/src/views/admin/settings/reputation.tpl b/src/views/admin/settings/reputation.tpl index 907fa90190..aee71910d4 100644 --- a/src/views/admin/settings/reputation.tpl +++ b/src/views/admin/settings/reputation.tpl @@ -14,7 +14,13 @@
+
+
+
@@ -32,4 +38,4 @@ - \ No newline at end of file +