v1.18.x
barisusakli 11 years ago
commit 06119510b7

@ -1,5 +1,5 @@
# <img alt="NodeBB" src="http://i.imgur.com/mYxPPtB.png" />
[![Build Status](https://travis-ci.org/NodeBB/NodeBB.svg?branch=master)](https://travis-ci.org/nodebb/nodebb)
[![Build Status](https://travis-ci.org/NodeBB/NodeBB.svg?branch=master)](https://travis-ci.org/NodeBB/NodeBB)
[![Dependency Status](https://david-dm.org/nodebb/nodebb.svg)](https://david-dm.org/nodebb/nodebb)
[![Code Climate](https://codeclimate.com/github/designcreateplay/NodeBB.png)](https://codeclimate.com/github/designcreateplay/NodeBB)

@ -67,7 +67,7 @@
"url": "https://github.com/NodeBB/NodeBB/issues"
},
"engines": {
"node": ">=0.8"
"node": ">=0.10"
},
"maintainers": [
{

@ -9,6 +9,7 @@ var categoriesController = {},
categories = require('../categories'),
topics = require('../topics'),
meta = require('../meta');
plugins = require('../plugins');
categoriesController.recent = function(req, res, next) {
var uid = req.user ? req.user.uid : 0;
@ -20,7 +21,9 @@ categoriesController.recent = function(req, res, next) {
data['feeds:disableRSS'] = parseInt(meta.config['feeds:disableRSS'], 10) === 1;
res.render('recent', data);
plugins.fireHook('filter:category.get', data, uid, function(err, data) {
res.render('recent', data);
});
});
};
@ -36,7 +39,9 @@ categoriesController.popular = function(req, res, next) {
data['feeds:disableRSS'] = parseInt(meta.config['feeds:disableRSS'], 10) === 1;
res.render('popular', {topics: data});
plugins.fireHook('filter:category.get', {topics: data}, uid, function(err, data) {
res.render('popular', data);
});
});
};
@ -48,7 +53,9 @@ categoriesController.unread = function(req, res, next) {
return next(err);
}
res.render('unread', data);
plugins.fireHook('filter:category.get', data, uid, function(err, data) {
res.render('unread', data);
});
});
};

@ -160,7 +160,7 @@ module.exports = function(app, middleware) {
app.render.apply(app, arguments);
};
app.all(relativePath + '/api/*', middleware.updateLastOnlineTime, middleware.prepareAPI);
app.all(relativePath + '/api/?*', middleware.updateLastOnlineTime, middleware.prepareAPI);
app.all(relativePath + '/api/admin/*', middleware.admin.isAdmin, middleware.prepareAPI);
app.all(relativePath + '/admin/*', middleware.admin.isAdmin);
app.get(relativePath + '/admin', middleware.admin.isAdmin);
@ -247,4 +247,4 @@ function catch404(req, res, next) {
} else {
res.type('txt').send('Not found');
}
}
}

Loading…
Cancel
Save