mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-02-08 07:40:05 +01:00
Merge remote-tracking branch 'origin/master' into develop
This commit is contained in:
@@ -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",
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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,
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -14,7 +14,13 @@
|
||||
<div class="checkbox">
|
||||
<label class="mdl-switch mdl-js-switch mdl-js-ripple-effect">
|
||||
<input type="checkbox" class="mdl-switch__input" data-field="downvote:disabled">
|
||||
<span class="mdl-switch__label"><strong>[[admin/settings/reputation:disable-down-voting]]</trong></strong>
|
||||
<span class="mdl-switch__label"><strong>[[admin/settings/reputation:disable-down-voting]]</strong></span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="checkbox">
|
||||
<label class="mdl-switch mdl-js-switch mdl-js-ripple-effect">
|
||||
<input type="checkbox" class="mdl-switch__input" data-field="votesArePublic">
|
||||
<span class="mdl-switch__label"><strong>[[admin/settings/reputation:votes-are-public]]</strong></span>
|
||||
</label>
|
||||
</div>
|
||||
</form>
|
||||
@@ -32,4 +38,4 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- IMPORT admin/partials/settings/footer.tpl -->
|
||||
<!-- IMPORT admin/partials/settings/footer.tpl -->
|
||||
|
||||
Reference in New Issue
Block a user