From 704d81fe53d9c7ff6ddfbddd0db15d90b5d3f249 Mon Sep 17 00:00:00 2001 From: psychobunny Date: Thu, 17 Jul 2014 01:34:01 -0400 Subject: [PATCH] disable category RSS --- src/controllers/categories.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/controllers/categories.js b/src/controllers/categories.js index c127efed69..19e5165c3f 100644 --- a/src/controllers/categories.js +++ b/src/controllers/categories.js @@ -7,7 +7,8 @@ var categoriesController = {}, privileges = require('../privileges'), user = require('./../user'), categories = require('./../categories'), - topics = require('./../topics'); + topics = require('./../topics'), + meta = require('./../meta'); categoriesController.recent = function(req, res, next) { var uid = req.user ? req.user.uid : 0; @@ -16,6 +17,8 @@ categoriesController.recent = function(req, res, next) { return next(err); } + data['feeds:disableRSS'] = meta.config['feeds:disableRSS'] === '1' ? true : false; + res.render('recent', data); }); }; @@ -30,6 +33,8 @@ categoriesController.popular = function(req, res, next) { return next(err); } + data['feeds:disableRSS'] = meta.config['feeds:disableRSS'] === '1' ? true : false; + res.render('popular', {topics: data}); }); }; @@ -176,6 +181,7 @@ categoriesController.get = function(req, res, next) { } data.currentPage = page; + data['feeds:disableRSS'] = meta.config['feeds:disableRSS'] === '1' ? true : false; // Paginator for noscript data.pages = [];