mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-10 07:55:46 +01:00
merge
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
# <img alt="NodeBB" src="http://i.imgur.com/mYxPPtB.png" />
|
||||
[](https://travis-ci.org/nodebb/nodebb)
|
||||
[](https://travis-ci.org/NodeBB/NodeBB)
|
||||
[](https://david-dm.org/nodebb/nodebb)
|
||||
[](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,8 +21,10 @@ categoriesController.recent = function(req, res, next) {
|
||||
|
||||
data['feeds:disableRSS'] = parseInt(meta.config['feeds:disableRSS'], 10) === 1;
|
||||
|
||||
plugins.fireHook('filter:category.get', data, uid, function(err, data) {
|
||||
res.render('recent', data);
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
categoriesController.popular = function(req, res, next) {
|
||||
@@ -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,8 +53,10 @@ categoriesController.unread = function(req, res, next) {
|
||||
return next(err);
|
||||
}
|
||||
|
||||
plugins.fireHook('filter:category.get', data, uid, function(err, data) {
|
||||
res.render('unread', data);
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
categoriesController.unreadTotal = function(req, res, next) {
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user