Skip to content

Node.js based forum software built for the modern web

removing backwards compatibility fixed in preparation for 0.5.0. Prepare for stuff to break!!!!!

Julian Lamd74de798fc0d
diff --git a/src/meta.js b/src/meta.js
index a655249b1f..8df7667a21 100644
--- a/src/meta.js
+++ b/src/meta.js
@@ -259,7 +259,6 @@ var fs = require('fs'),
jsPaths = scripts.map(function (jsPath) {
jsPath = path.normalize(jsPath);
- // The filter:scripts.get plugin will be deprecated as of v0.5.0, specify scripts in plugin.json instead
if (jsPath.substring(0, 7) === 'plugins') {
var matches = _.map(plugins.staticDirs, function(realPath, mappedPath) {
if (jsPath.match(mappedPath)) {
@@ -283,7 +282,6 @@ var fs = require('fs'),
}
});
- // Remove scripts that could not be found (remove this line at v0.5.0)
Meta.js.scripts = jsPaths.filter(function(path) {
return path !== null;
});
diff --git a/src/middleware/index.js b/src/middleware/index.js
index 197f0a9c8d..13e0df1aee 100644
--- a/src/middleware/index.js
+++ b/src/middleware/index.js
@@ -61,17 +61,6 @@ function routeCurrentTheme(app, themeId, themesData) {
// Theme's templates path
nconf.set('theme_templates_path', themeObj.templates ? path.join(themesPath, themeObj.id, themeObj.templates) : nconf.get('base_templates_path'));
themeTemplatesPath = nconf.get('theme_templates_path');
-
- // Theme's static directory (to be deprecated for 0.5.0)
- if (themeObj.staticDir) {
- app.use(relativePath + '/css/assets', express.static(path.join(themesPath, themeObj.id, themeObj.staticDir), {
- maxAge: app.enabled('cache') ? 5184000000 : 0
- }));
-
- if (process.env.NODE_ENV === 'development') {
- winston.info('Static directory routed for theme: ' + themeObj.id);
- }
- }
}
function compileTemplates(pluginTemplates) {
diff --git a/src/plugins.js b/src/plugins.js
index a1c715711b..61276bfffe 100644
--- a/src/plugins.js
+++ b/src/plugins.js
@@ -195,18 +195,8 @@ var fs = require('fs'),
}
Plugins.cssFiles = Plugins.cssFiles.concat(pluginData.css.map(function(file) {
- if (fs.existsSync(path.join(__dirname, '../node_modules', pluginData.id, file))) {
- return path.join(pluginData.id, file);
- } else {
- // Backwards compatibility with < v0.4.0, remove this for v0.5.0
- if (pluginData.staticDir) {
- return path.join(pluginData.id, pluginData.staticDir, file);
- } else {
- winston.error('[plugins/' + pluginData.id + '] This plugin\'s CSS is incorrectly configured, please contact the plugin author.');
- return null;
- }
- }
- }).filter(function(path) { return path })); // Filter out nulls, remove this for v0.5.0
+ return path.join(pluginData.id, file);
+ }));
}
next();