my_forum 0.0.1.beta29 → 0.0.1.beta30
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: eec57a96d65caf18e79aafe5e709bf5c5329422d
|
4
|
+
data.tar.gz: bcf4d88f50c8ba6863f4a2c9f0c7deda8faca650
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d7c20f37f6970b61257aa1bd524a5da2105c5df5fd14f8455480fac76328998e5d24ff557384812d46424d82f7cd6cfbe4c01d9754058828e0eda19b8e604dd6
|
7
|
+
data.tar.gz: 9719a7e531db8d6db16b8cc75b570e076127dc4f49cc556bc7ed4122a61b3e8d7ec1fb3be91f725cfc223ec6565b9168ebf26a79afd84ce354b0f822b6c0923f
|
@@ -17,10 +17,10 @@ module MyForum
|
|
17
17
|
[]
|
18
18
|
else
|
19
19
|
Topic.find_by_sql("
|
20
|
-
SELECT posts.id, posts.user_id, posts.text, posts.topic_id, posts.updated_at, topics.name as topic_name, topics.forum_id FROM my_forum_posts AS posts
|
20
|
+
SELECT posts.id, posts.user_id, posts.text, posts.topic_id, posts.updated_at, topics.name as topic_name, topics.forum_id, topics.deleted FROM my_forum_posts AS posts
|
21
21
|
LEFT JOIN my_forum_topics AS topics ON posts.topic_id = topics.id
|
22
22
|
LEFT JOIN my_forum_forums AS forums ON forums.id = topics.forum_id
|
23
|
-
WHERE posts.id IN (SELECT MAX(id) FROM my_forum_posts GROUP BY topic_id) AND posts.is_deleted IS FALSE
|
23
|
+
WHERE posts.id IN (SELECT MAX(id) FROM my_forum_posts GROUP BY topic_id) AND posts.is_deleted IS FALSE AND topics.deleted IS FALSE
|
24
24
|
ORDER BY posts.id DESC LIMIT 10
|
25
25
|
")
|
26
26
|
end
|
data/lib/my_forum/version.rb
CHANGED