Skip to content

Commit

Permalink
static:app.load change closes #1527
Browse files Browse the repository at this point in the history
  • Loading branch information
barisusakli committed Nov 8, 2014
1 parent 220c82a commit 41ae8b6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/plugins.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ var fs = require('fs'),
// Deprecated as of v0.5.0, remove this hook call for NodeBB v0.6.0-1
Plugins.fireHook('action:app.load', router, middleware, controllers);

Plugins.fireHook('static:app.load', router, middleware, controllers, function() {
Plugins.fireHook('static:app.load', {app: app, router: router, middleware: middleware, controllers: controllers}, function() {
hotswap.replace('plugins', router);
winston.info('[plugins] All plugins reloaded and rerouted');
callback();
Expand Down Expand Up @@ -796,9 +796,9 @@ var fs = require('fs'),
});
};

function addLanguages(router, middleware, controllers, callback) {
function addLanguages(params, callback) {
Plugins.customLanguages.forEach(function(lang) {
router.get('/language' + lang.route, function(req, res, next) {
params.router.get('/language' + lang.route, function(req, res, next) {
res.json(lang.file);
});

Expand Down

0 comments on commit 41ae8b6

Please sign in to comment.