mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-08 15:05:46 +01:00
adding cache-buster to template globals
This commit is contained in:
1
app.js
1
app.js
@@ -126,6 +126,7 @@ function start() {
|
|||||||
upgrade = require('./src/upgrade');
|
upgrade = require('./src/upgrade');
|
||||||
|
|
||||||
templates.setGlobal('relative_path', nconf.get('relative_path'));
|
templates.setGlobal('relative_path', nconf.get('relative_path'));
|
||||||
|
templates.setGlobal('cache-buster', meta.config['cache-buster'] ? 'v=' + meta.config['cache-buster'] : '');
|
||||||
|
|
||||||
upgrade.check(function(schema_ok) {
|
upgrade.check(function(schema_ok) {
|
||||||
if (schema_ok || nconf.get('check-schema') === false) {
|
if (schema_ok || nconf.get('check-schema') === false) {
|
||||||
|
|||||||
@@ -204,9 +204,7 @@ middleware.renderHeader = function(req, res, callback) {
|
|||||||
'brand:logo': meta.config['brand:logo'] || '',
|
'brand:logo': meta.config['brand:logo'] || '',
|
||||||
'brand:logo:display': meta.config['brand:logo']?'':'hide',
|
'brand:logo:display': meta.config['brand:logo']?'':'hide',
|
||||||
csrf: res.locals.csrf_token,
|
csrf: res.locals.csrf_token,
|
||||||
relative_path: nconf.get('relative_path'),
|
|
||||||
navigation: custom_header.navigation,
|
navigation: custom_header.navigation,
|
||||||
'cache-buster': meta.config['cache-buster'] ? 'v=' + meta.config['cache-buster'] : '',
|
|
||||||
allowRegistration: meta.config.allowRegistration === undefined || parseInt(meta.config.allowRegistration, 10) === 1,
|
allowRegistration: meta.config.allowRegistration === undefined || parseInt(meta.config.allowRegistration, 10) === 1,
|
||||||
searchEnabled: plugins.hasListeners('filter:search.query') ? true : false
|
searchEnabled: plugins.hasListeners('filter:search.query') ? true : false
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user