xforum 0.0.379 → 0.0.381
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/models/xforum/forum.rb +3 -3
- data/app/models/xforum/people_list.rb +6 -6
- data/lib/xforum/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 16d11219db1b75ff631adc09c42f09a6cf1c4cf7
|
4
|
+
data.tar.gz: 28207bcf3dc34899a741edb41fd70f0f01541675
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5049d0f28b790c30ad084a6e99c1ee9094cce9270f64b40d15ff987684b211c2067c9b73012dce45d15b53ca806bd24b44b125b01f148a06023ec0ce40efd528
|
7
|
+
data.tar.gz: c2be7d2c4b3dae53dc1b8814d395858b5b06f60fa007a358d8547b689519a4a565bab10dab0a3ef153fc4bc18507512fadfe717bc54743ac294d061d3a99ef4f
|
data/app/models/xforum/forum.rb
CHANGED
@@ -45,14 +45,14 @@ module Xforum
|
|
45
45
|
if params[:topic]== 'select topic'
|
46
46
|
return
|
47
47
|
end
|
48
|
-
topic=Topic.
|
49
|
-
category=Category.find_by(
|
48
|
+
topic=Topic.find_by(name:params[:topic])
|
49
|
+
category=Category.find_by(id:topic.category_id)
|
50
50
|
if (category.private || !user.forum_admin?) && PeopleList.check_invitation(category.name,category.id, user.id, 'category')
|
51
51
|
{to_do:'nothing'}
|
52
52
|
elsif (topic.restricted && !user.forum_admin?) && PeopleList.check_invitation(topic.name,topic.id, user.id, 'topic')
|
53
53
|
{to_do:'nothing'}
|
54
54
|
else
|
55
|
-
index=Forum.clear_user_topic(user.id,
|
55
|
+
index=Forum.clear_user_topic(user.id,topic.id)
|
56
56
|
the_list=[]
|
57
57
|
plucking= [:id, :parent, :content, :user_id,:owner_name,:state,:restricted,:tag,:has_photo]
|
58
58
|
plucking_names= [:id, :parent, :content,:owner,:owner_name,:comment_state,:restricted,:tag,:has_photo,:needs_translation,:empty_list] #we're going to append empty list to the reply
|
@@ -106,10 +106,9 @@ module Xforum
|
|
106
106
|
{list_data: ForumAssist.named_array(alist, [:value, :item]), name: params[:list]}
|
107
107
|
end
|
108
108
|
|
109
|
-
def self.check_restrictions(
|
110
|
-
blist
|
111
|
-
|
112
|
-
alist.each { |record|
|
109
|
+
def self.check_restrictions(blist, user, list_type)
|
110
|
+
alist=blist.clone #so you can do list.each and delete items
|
111
|
+
blist.each { |record|
|
113
112
|
skip=false
|
114
113
|
case list_type
|
115
114
|
when 'topic'
|
@@ -119,14 +118,15 @@ module Xforum
|
|
119
118
|
end
|
120
119
|
if !category.nil? && category.restricted
|
121
120
|
if PeopleList.check_invitation(record[:name],category.id, user.id, 'category')
|
121
|
+
alist.delete(record)
|
122
122
|
skip=true
|
123
123
|
end
|
124
124
|
end
|
125
125
|
unless skip
|
126
|
-
|
126
|
+
alist.delete(record) if record[:restricted] && PeopleList.check_invitation(record[:name],record[:id], user.id, list_type)
|
127
127
|
end
|
128
128
|
}
|
129
|
-
|
129
|
+
alist
|
130
130
|
end
|
131
131
|
|
132
132
|
def self.check_invitation(name,id,user_id,list_type)
|
data/lib/xforum/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: xforum
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.381
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Robert D Blanton
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-08-
|
11
|
+
date: 2014-08-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sqlite3
|