v1.18.x
Julian Lam 10 years ago
parent 2b5d0e89a5
commit 30b2f55ebc

@ -2,6 +2,8 @@
var async = require('async'),
winston = require('winston'),
templates = require('templates.js'),
user = require('./user'),
groups = require('./groups'),
plugins = require('./plugins'),
@ -38,7 +40,8 @@ var async = require('async'),
async.apply(Meta.js.minify, false),
async.apply(Meta.css.minify),
async.apply(Meta.templates.compile),
async.apply(auth.reloadRoutes)
async.apply(auth.reloadRoutes),
async.apply(templates.flush)
], next);
}
], function(err) {

@ -42,16 +42,7 @@ function routeCurrentTheme(app, themeId, themesData) {
winston.info('[themes] Using theme ' + themeId);
}
// Theme's templates path
var themePath = nconf.get('base_templates_path'),
fallback = path.join(themesPath, themeObj.id, 'templates');
if (themeObj.templates) {
themePath = path.join(themesPath, themeObj.id, themeObj.templates);
} else if (fs.existsSync(fallback)) {
themePath = fallback;
}
nconf.set('theme_templates_path', themePath);
meta.themes.setPath(themeObj);
}
module.exports = function(app, data) {

Loading…
Cancel
Save