Node.js based forum software built for the modern web
allow custom themes to include templates that don't exist in the base theme
psychobunnyeab0ca746306
diff --git a/src/middleware/index.js b/src/middleware/index.jsindex a3eaf67f35..9294d2cab2 100644--- a/src/middleware/index.js+++ b/src/middleware/index.js@@ -95,10 +95,11 @@ function compileTemplates(pluginTemplates) {themeTpls = !themeTpls ? [] : themeTpls.map(function(tpl) { return tpl.replace(nconf.get('theme_templates_path'), ''); });baseTpls.forEach(function(el, i) {- var relative_path = (themeTpls.indexOf(el) !== -1 ? themeTpls[themeTpls.indexOf(el)] : baseTpls[i]),- full_path = path.join(themeTpls.indexOf(el) !== -1 ? nconf.get('theme_templates_path') : nconf.get('base_templates_path'), relative_path);+ paths[baseTpls[i]] = path.join(nconf.get('base_templates_path'), baseTpls[i]);+ });- paths[themeTpls.indexOf(el) !== -1 ? themeTpls[themeTpls.indexOf(el)] : baseTpls[i]] = full_path;+ themeTpls.forEach(function(el, i) {+ paths[themeTpls[i]] = path.join(nconf.get('theme_templates_path'), themeTpls[i]);});async.each(Object.keys(paths), function(relative_path, next) {