Merge remote-tracking branch 'origin/master'

v1.18.x
barisusakli 10 years ago
commit 5555b9256d

@ -291,7 +291,7 @@ function activate() {
winston.info('Activating plugin %s', plugin); winston.info('Activating plugin %s', plugin);
db.sortedSetAdd('plugins:active', plugin, 1, start); db.sortedSetAdd('plugins:active', 0, plugin, start);
}); });
} }

@ -6,7 +6,7 @@ var fs = require('fs');
var themesController = {}; var themesController = {};
themesController.get = function(req, res, next) { themesController.get = function(req, res, next) {
var themeDir = path.join(__dirname, '../../node_modules/' + req.params.theme); var themeDir = path.join(__dirname, '../../../node_modules/' + req.params.theme);
fs.exists(themeDir, function(exists) { fs.exists(themeDir, function(exists) {
if (exists) { if (exists) {
var themeConfig = require(path.join(themeDir, 'theme.json')), var themeConfig = require(path.join(themeDir, 'theme.json')),
@ -14,7 +14,7 @@ themesController.get = function(req, res, next) {
if (themeConfig.screenshot && fs.existsSync(screenshotPath)) { if (themeConfig.screenshot && fs.existsSync(screenshotPath)) {
res.sendFile(screenshotPath); res.sendFile(screenshotPath);
} else { } else {
res.sendFile(path.join(__dirname, '../../public/images/themes/default.png')); res.sendFile(path.join(__dirname, '../../../public/images/themes/default.png'));
} }
} else { } else {
return next(); return next();

@ -89,9 +89,7 @@ SocketAdmin.themes.set = function(socket, data, callback) {
} }
var wrappedCallback = function(err) { var wrappedCallback = function(err) {
meta.themes.set(data, function() { meta.themes.set(data, callback);
callback();
});
}; };
if (data.type === 'bootswatch') { if (data.type === 'bootswatch') {
wrappedCallback(); wrappedCallback();

Loading…
Cancel
Save