remove from global config

v1.18.x
barisusakli 9 years ago
parent 5b6e8bd167
commit ebf820d571

@ -274,19 +274,19 @@ define('forum/account/edit', ['forum/account/header', 'uploader', 'translator'],
function updateSignature() { function updateSignature() {
var el = $('#inputSignature'); var el = $('#inputSignature');
$('#signatureCharCountLeft').html(getCharsLeft(el, config.maximumSignatureLength)); $('#signatureCharCountLeft').html(getCharsLeft(el, ajaxify.data.maximumSignatureLength));
el.on('keyup change', function() { el.on('keyup change', function() {
$('#signatureCharCountLeft').html(getCharsLeft(el, config.maximumSignatureLength)); $('#signatureCharCountLeft').html(getCharsLeft(el, ajaxify.data.maximumSignatureLength));
}); });
} }
function updateAboutMe() { function updateAboutMe() {
var el = $('#inputAboutMe'); var el = $('#inputAboutMe');
$('#aboutMeCharCountLeft').html(getCharsLeft(el, config.maximumAboutMeLength)); $('#aboutMeCharCountLeft').html(getCharsLeft(el, ajaxify.data.maximumAboutMeLength));
el.on('keyup change', function() { el.on('keyup change', function() {
$('#aboutMeCharCountLeft').html(getCharsLeft(el, config.maximumAboutMeLength)); $('#aboutMeCharCountLeft').html(getCharsLeft(el, ajaxify.data.maximumAboutMeLength));
}); });
} }

@ -7,6 +7,7 @@ var winston = require('winston');
var db = require('../../database'); var db = require('../../database');
var user = require('../../user'); var user = require('../../user');
var meta = require('../../meta');
var helpers = require('../helpers'); var helpers = require('../helpers');
var accountHelpers = require('./helpers'); var accountHelpers = require('./helpers');
@ -18,6 +19,9 @@ editController.get = function(req, res, callback) {
return callback(err); return callback(err);
} }
userData.maximumSignatureLength = parseInt(meta.config.maximumSignatureLength, 10) || 255;
userData.maximumAboutMeLength = parseInt(meta.config.maximumAboutMeLength, 10) || 1000;
userData.title = '[[pages:account/edit, ' + userData.username + ']]'; userData.title = '[[pages:account/edit, ' + userData.username + ']]';
userData.breadcrumbs = helpers.buildBreadcrumbs([{text: userData.username, url: '/user/' + userData.userslug}, {text: '[[user:edit]]'}]); userData.breadcrumbs = helpers.buildBreadcrumbs([{text: userData.username, url: '/user/' + userData.userslug}, {text: '[[user:edit]]'}]);

@ -47,8 +47,6 @@ apiController.getConfig = function(req, res, next) {
config.minimumUsernameLength = meta.config.minimumUsernameLength; config.minimumUsernameLength = meta.config.minimumUsernameLength;
config.maximumUsernameLength = meta.config.maximumUsernameLength; config.maximumUsernameLength = meta.config.maximumUsernameLength;
config.minimumPasswordLength = meta.config.minimumPasswordLength; config.minimumPasswordLength = meta.config.minimumPasswordLength;
config.maximumSignatureLength = meta.config.maximumSignatureLength;
config.maximumAboutMeLength = meta.config.maximumAboutMeLength || 1000;
config.useOutgoingLinksPage = parseInt(meta.config.useOutgoingLinksPage, 10) === 1; config.useOutgoingLinksPage = parseInt(meta.config.useOutgoingLinksPage, 10) === 1;
config.allowGuestSearching = parseInt(meta.config.allowGuestSearching, 10) === 1; config.allowGuestSearching = parseInt(meta.config.allowGuestSearching, 10) === 1;
config.allowGuestUserSearching = parseInt(meta.config.allowGuestUserSearching, 10) === 1; config.allowGuestUserSearching = parseInt(meta.config.allowGuestUserSearching, 10) === 1;

Loading…
Cancel
Save