xforum 0.0.378 → 0.0.379

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: dae03aab9ce8e977a3e0f3bfb93302f79ae22c19
4
- data.tar.gz: 4aaef04977c9b85b089b2d97ec9edbb26ecd729b
3
+ metadata.gz: 0adcc543103cd2ecc60621a2a9562d60a17f3679
4
+ data.tar.gz: d5c9997eb2f6fbbdeee66601090624d2f175bc82
5
5
  SHA512:
6
- metadata.gz: a53991fdedd1e62337305e941e3ff82325040d9938ac4fb34fc87e3fd94f3eca4f5067e1c0b58235db3b97c64ead9d1a5b0cea85910a8fa82c817fc494841a81
7
- data.tar.gz: c1b5e4a2da97b07d458eedba08faa24813c62a46f98ff013770b4b0645df160f6583d47d0cf4e56753e5a3539b697cff68f453051d69b5448eb3d4bc3cb9e81f
6
+ metadata.gz: 51501c9774888f987bd8e8ca140d4d5890532b3c72eaaae26e3af917d49987bbd96683b98c59463ac0c68bcd0ab278bbbb82f686de9540cce6f98e2f9b7379a5
7
+ data.tar.gz: 0a3cce0442be303763cf4c64df3e66d913a8c4c4c6a9528cee5c8585958648eb7dc150846cbb670068a4059fa1682671cfd02c6714782a7f8c50dce11f860b5a
@@ -106,9 +106,10 @@ 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(blist, user, list_type)
110
- alist=blist.clone #so you can do list.each and delete items
111
- blist.each { |record|
109
+ def self.check_restrictions(alist, user, list_type)
110
+ blist=[]
111
+ byebug
112
+ alist.each { |record|
112
113
  skip=false
113
114
  case list_type
114
115
  when 'topic'
@@ -118,15 +119,14 @@ module Xforum
118
119
  end
119
120
  if !category.nil? && category.restricted
120
121
  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
- alist.delete(record) if record[:restricted] && PeopleList.check_invitation(record[:name],record[:id], user.id, list_type)
126
+ blist.push(record) unless record[:restricted] && PeopleList.check_invitation(record[:name],record[:id], user.id, list_type)
127
127
  end
128
128
  }
129
- alist
129
+ blist
130
130
  end
131
131
 
132
132
  def self.check_invitation(name,id,user_id,list_type)
@@ -1,3 +1,3 @@
1
1
  module Xforum
2
- VERSION = '0.0.378'
2
+ VERSION = '0.0.379'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: xforum
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.378
4
+ version: 0.0.379
5
5
  platform: ruby
6
6
  authors:
7
7
  - Robert D Blanton