mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-10 16:05:49 +01:00
merge
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
# <img alt="NodeBB" src="http://i.imgur.com/mYxPPtB.png" />
|
# <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://david-dm.org/nodebb/nodebb)
|
||||||
[](https://codeclimate.com/github/designcreateplay/NodeBB)
|
[](https://codeclimate.com/github/designcreateplay/NodeBB)
|
||||||
|
|
||||||
|
|||||||
@@ -67,7 +67,7 @@
|
|||||||
"url": "https://github.com/NodeBB/NodeBB/issues"
|
"url": "https://github.com/NodeBB/NodeBB/issues"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=0.8"
|
"node": ">=0.10"
|
||||||
},
|
},
|
||||||
"maintainers": [
|
"maintainers": [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ var categoriesController = {},
|
|||||||
categories = require('../categories'),
|
categories = require('../categories'),
|
||||||
topics = require('../topics'),
|
topics = require('../topics'),
|
||||||
meta = require('../meta');
|
meta = require('../meta');
|
||||||
|
plugins = require('../plugins');
|
||||||
|
|
||||||
categoriesController.recent = function(req, res, next) {
|
categoriesController.recent = function(req, res, next) {
|
||||||
var uid = req.user ? req.user.uid : 0;
|
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;
|
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;
|
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);
|
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.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 + '/api/admin/*', middleware.admin.isAdmin, middleware.prepareAPI);
|
||||||
app.all(relativePath + '/admin/*', middleware.admin.isAdmin);
|
app.all(relativePath + '/admin/*', middleware.admin.isAdmin);
|
||||||
app.get(relativePath + '/admin', middleware.admin.isAdmin);
|
app.get(relativePath + '/admin', middleware.admin.isAdmin);
|
||||||
@@ -247,4 +247,4 @@ function catch404(req, res, next) {
|
|||||||
} else {
|
} else {
|
||||||
res.type('txt').send('Not found');
|
res.type('txt').send('Not found');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user