missing nconf require

v1.18.x
barisusakli 10 years ago
parent 9852809c2c
commit c458a7f7b2

@ -1,5 +1,6 @@
'use strict'; 'use strict';
var nconf = require('nconf');
var helpers = {}; var helpers = {};

@ -234,8 +234,7 @@ Controllers.outgoing = function(req, res, next) {
if (url) { if (url) {
res.render('outgoing', data); res.render('outgoing', data);
} else { } else {
res.status(404); res.status(404).redirect(nconf.get('relative_path') + '/404');
res.redirect(nconf.get('relative_path') + '/404');
} }
}; };

@ -18,7 +18,7 @@ tagsController.getTag = function(req, res, next) {
if (Array.isArray(tids) && !tids.length) { if (Array.isArray(tids) && !tids.length) {
topics.deleteTag(tag); topics.deleteTag(tag);
return res.render('tag', {topics: [], tag:tag}); return res.render('tag', {topics: [], tag: tag});
} }
topics.getTopics('tag:' + tag + ':topics', uid, tids, function(err, data) { topics.getTopics('tag:' + tag + ':topics', uid, tids, function(err, data) {
@ -28,7 +28,7 @@ tagsController.getTag = function(req, res, next) {
res.locals.metaTags = [ res.locals.metaTags = [
{ {
name: "title", name: 'title',
content: tag content: tag
}, },
{ {
@ -36,7 +36,7 @@ tagsController.getTag = function(req, res, next) {
content: tag content: tag
}, },
{ {
property: "og:url", property: 'og:url',
content: nconf.get('url') + '/tags/' + tag content: nconf.get('url') + '/tags/' + tag
} }
]; ];

Loading…
Cancel
Save