Node.js based forum software built for the modern web
closed #2149
Julian Lam30b2f55ebc2f
diff --git a/src/meta.js b/src/meta.jsindex be696ca98f..357c4a432e 100644--- a/src/meta.js+++ b/src/meta.js@@ -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) {diff --git a/src/middleware/index.js b/src/middleware/index.jsindex 7f5eb46ddb..c21dd0cbbe 100644--- a/src/middleware/index.js+++ b/src/middleware/index.js@@ -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) {