This commit is contained in:
barisusakli
2016-11-30 16:28:25 +03:00
parent 12f834072a
commit 4cb48c46ab
3 changed files with 10 additions and 3 deletions

View File

@@ -63,7 +63,9 @@ apiController.getConfig = function (req, res, next) {
config.csrf_token = req.csrfToken();
config.searchEnabled = plugins.hasListeners('filter:search.query');
config.bootswatchSkin = 'default';
config.timeagoCutoff = meta.config.timeagoCutoff;
var timeagoCutoff = meta.config.timeagoCutoff === undefined ? 30 : meta.config.timeagoCutoff;
config.timeagoCutoff = timeagoCutoff !== '' ? Math.max(0, parseInt(timeagoCutoff, 10)) : timeagoCutoff;
config.cookies = {
enabled: parseInt(meta.config.cookieConsentEnabled, 10) === 1,