more cleanup and changes to topics

This commit is contained in:
Baris Soner Usakli
2014-02-26 16:43:21 -05:00
parent d149622f0b
commit ea6cf3bbd5
12 changed files with 119 additions and 148 deletions

View File

@@ -596,7 +596,7 @@ process.on('uncaughtException', function(err) {
var start = (page - 1) * settings.topicsPerPage,
end = start + settings.topicsPerPage - 1;
topics.getTopicWithPosts(tid, uid, start, end, true, function (err, topicData) {
topics.getTopicWithPosts(tid, uid, start, end, function (err, topicData) {
if (topicData) {
if (parseInt(topicData.deleted, 10) === 1 && parseInt(topicData.expose_tools, 10) === 0) {
return next(new Error('Topic deleted'), null);
@@ -642,7 +642,7 @@ process.on('uncaughtException', function(err) {
metaTags: [
{
name: "title",
content: topicData.topic_name
content: topicData.title
},
{
name: "description",
@@ -650,7 +650,7 @@ process.on('uncaughtException', function(err) {
},
{
property: 'og:title',
content: topicData.topic_name
content: topicData.title
},
{
property: 'og:description',
@@ -682,7 +682,7 @@ process.on('uncaughtException', function(err) {
},
{
property: 'article:section',
content: topicData.category_name
content: topicData.category.name
}
],
linkTags: [
@@ -693,7 +693,7 @@ process.on('uncaughtException', function(err) {
},
{
rel: 'up',
href: nconf.get('url') + '/category/' + topicData.category_slug
href: nconf.get('url') + '/category/' + topicData.category.slug
}
]
}, function (err, header) {
@@ -783,15 +783,15 @@ process.on('uncaughtException', function(err) {
metaTags: [
{
name: 'title',
content: categoryData.category_name
content: categoryData.name
},
{
property: 'og:title',
content: categoryData.category_name
content: categoryData.name
},
{
name: 'description',
content: categoryData.category_description
content: categoryData.description
},
{
property: "og:type",