diff --git a/dump.rdb b/dump.rdb new file mode 100644 index 0000000000..d9e536776d Binary files /dev/null and b/dump.rdb differ diff --git a/src/controllers/category.js b/src/controllers/category.js index 487ea21cce..dc5d111425 100644 --- a/src/controllers/category.js +++ b/src/controllers/category.js @@ -5,11 +5,15 @@ const nconf = require('nconf'); const validator = require('validator'); const qs = require('querystring'); + const db = require('../database'); const privileges = require('../privileges'); const user = require('../user'); const categories = require('../categories'); const meta = require('../meta'); + +const isRssEnabled = !meta.config['feeds:disableRSS']; + const pagination = require('../pagination'); const helpers = require('./helpers'); const utils = require('../utils'); @@ -136,7 +140,7 @@ categoryController.get = async function (req, res, next) { categoryData.selectedTags = tagData.selectedTags; categoryData.sortOptionLabel = `[[topic:${validator.escape(String(sort)).replace(/_/g, '-')}]]`; - if (!meta.config['feeds:disableRSS']) { + if (isRssEnabled) { categoryData.rssFeedUrl = `${url}/category/${categoryData.cid}.rss`; if (req.loggedIn) { categoryData.rssFeedUrl += `?uid=${req.uid}&token=${rssToken}`; @@ -158,6 +162,7 @@ categoryController.get = async function (req, res, next) { res.render('category', categoryData); }; + async function buildBreadcrumbs(req, categoryData) { const breadcrumbs = [ {