remove some more config from api/config

v1.18.x
barisusakli 9 years ago
parent c62a60029a
commit 5ac02a59ac

@ -420,7 +420,7 @@ define('forum/topic/postTools', ['share', 'navigator', 'components', 'translator
}
function showStaleWarning(callback) {
if (ajaxify.data.lastposttime < (Date.now() - (1000*60*60*24*config.topicStaleDays))) {
if (ajaxify.data.lastposttime < (Date.now() - (1000 * 60 * 60 * 24 * ajaxify.data.topicStaleDays))) {
translator.translate('[[topic:stale.warning]]', function(translated) {
var warning = bootbox.dialog({
title: '[[topic:stale.title]]',

@ -36,12 +36,11 @@ apiController.getConfig = function(req, res, next) {
config.browserTitle = validator.escape(meta.config.browserTitle || meta.config.title || 'NodeBB');
config.titleLayout = (meta.config.titleLayout || '{pageTitle} | {browserTitle}').replace(/{/g, '&#123;').replace(/}/g, '&#125;');
config.showSiteTitle = parseInt(meta.config.showSiteTitle, 10) === 1;
config.postDelay = meta.config.postDelay;
config.minimumTitleLength = meta.config.minimumTitleLength;
config.maximumTitleLength = meta.config.maximumTitleLength;
config.minimumPostLength = meta.config.minimumPostLength;
config.maximumPostLength = meta.config.maximumPostLength;
config.topicStaleDays = parseInt(meta.config.topicStaleDays, 10) || 60;
config.hasImageUploadPlugin = plugins.hasListeners('filter:uploadImage');
config.maximumProfileImageSize = meta.config.maximumProfileImageSize;
config.minimumUsernameLength = meta.config.minimumUsernameLength;

@ -249,6 +249,7 @@ topicsController.get = function(req, res, callback) {
}
data.privileges = userPrivileges;
data.topicStaleDays = parseInt(meta.config.topicStaleDays, 10) || 60;
data['reputation:disabled'] = parseInt(meta.config['reputation:disabled'], 10) === 1;
data['downvote:disabled'] = parseInt(meta.config['downvote:disabled'], 10) === 1;
data['feeds:disableRSS'] = parseInt(meta.config['feeds:disableRSS'], 10) === 1;

Loading…
Cancel
Save