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: 81f9f7e3ca4c8bdfc291d5e53c27f602f5023b6d
4
- data.tar.gz: c35fb58614dd1bf75170b626df663a359f6e5b36
3
+ metadata.gz: eec57a96d65caf18e79aafe5e709bf5c5329422d
4
+ data.tar.gz: bcf4d88f50c8ba6863f4a2c9f0c7deda8faca650
5
5
  SHA512:
6
- metadata.gz: e820b8589722f67d278cf6a5821fb5f184a9ac5ab384f66bff63672214a34f5ce5ecad25e7cbc5ee922723a79d5476783cd0f00dd22e60a654a24ad6e18702f0
7
- data.tar.gz: 4c38f98ecf6fdc739b0ec517dab58cc7562f7f38ae1abce7ebe3f2eb9adb71850b2274ac11a54ae7edd8102585806c8b582221610e5b600c8933b90f768bd083
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
@@ -5,6 +5,9 @@ module MyForum
5
5
  end
6
6
 
7
7
  def format_bbcode(text)
8
+ # Line Breask
9
+ text.gsub!(/\r\n/, '<br />')
10
+
8
11
  # Images
9
12
  text.gsub!(/\[img\]/i, '<img src="')
10
13
  text.gsub!(/\[\/img\]/i, '" />')
@@ -1,3 +1,3 @@
1
1
  module MyForum
2
- VERSION = "0.0.1.beta29"
2
+ VERSION = "0.0.1.beta30"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: my_forum
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1.beta29
4
+ version: 0.0.1.beta30
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vitaly Omelchenko