Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions js/TopicList.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ class TopicList extends Class
topic_creator_content.directory AS topic_creator_address,
topic.topic_id || '_' || topic_creator_content.directory AS row_topic_uri,
NULL AS row_topic_sub_uri, NULL AS row_topic_sub_title,
(SELECT COUNT(*) FROM topic_vote WHERE topic_vote.topic_uri = topic.topic_id || '_' || topic_creator_content.directory)+1 AS votes,
(SELECT COUNT(*) FROM topic_vote WHERE topic_vote.topic_uri = topic.topic_id || '_' || topic_creator_content.directory) AS votes,
CASE topic.topic_id || '_' || topic_creator_content.directory #{sql_sticky} ELSE 0 END AS sticky
FROM topic
LEFT JOIN json AS topic_creator_json ON (topic_creator_json.json_id = topic.json_id)
Expand All @@ -159,7 +159,7 @@ class TopicList extends Class
topic.topic_id || '_' || topic_creator_content.directory AS row_topic_uri,
topic_sub.topic_id || '_' || topic_sub_creator_content.directory AS row_topic_sub_uri,
topic_sub.title AS topic_sub_title,
(SELECT COUNT(*) FROM topic_vote WHERE topic_vote.topic_uri = topic.topic_id || '_' || topic_creator_content.directory)+1 AS votes,
(SELECT COUNT(*) FROM topic_vote WHERE topic_vote.topic_uri = topic.topic_id || '_' || topic_creator_content.directory) AS votes,
CASE topic.topic_id || '_' || topic_creator_content.directory #{sql_sticky} ELSE 0 END AS sticky
FROM topic
LEFT JOIN json AS topic_creator_json ON (topic_creator_json.json_id = topic.json_id)
Expand Down Expand Up @@ -401,4 +401,4 @@ class TopicList extends Class
return false


window.TopicList = new TopicList()
window.TopicList = new TopicList()
4 changes: 2 additions & 2 deletions js/TopicShow.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ class TopicShow extends Class
topic_creator_user.value AS topic_creator_user_name,
topic_creator_content.directory AS topic_creator_address,
topic.topic_id || '_' || topic_creator_content.directory AS row_topic_uri,
(SELECT COUNT(*) FROM topic_vote WHERE topic_vote.topic_uri = topic.topic_id || '_' || topic_creator_content.directory)+1 AS votes
(SELECT COUNT(*) FROM topic_vote WHERE topic_vote.topic_uri = topic.topic_id || '_' || topic_creator_content.directory) AS votes
FROM topic
LEFT JOIN json AS topic_creator_json ON (topic_creator_json.json_id = topic.json_id)
LEFT JOIN json AS topic_creator_content ON (topic_creator_content.directory = topic_creator_json.directory AND topic_creator_content.file_name = 'content.json')
Expand Down Expand Up @@ -111,7 +111,7 @@ class TopicShow extends Class
comment.*,
user.value AS user_name,
user_json_content.directory AS user_address,
(SELECT COUNT(*) FROM comment_vote WHERE comment_vote.comment_uri = comment.comment_id || '_' || user_json_content.directory)+1 AS votes
(SELECT COUNT(*) FROM comment_vote WHERE comment_vote.comment_uri = comment.comment_id || '_' || user_json_content.directory) AS votes
FROM comment
LEFT JOIN json AS user_json_data ON (user_json_data.json_id = comment.json_id)
LEFT JOIN json AS user_json_content ON (user_json_content.directory = user_json_data.directory AND user_json_content.file_name = 'content.json')
Expand Down