added first to query for the module timing
This commit is contained in:
parent
9455e14ebf
commit
d305c5b6df
|
@ -125,16 +125,16 @@ class Admin::AdminModulesController < OrbitAdminController
|
|||
registered_sites = []
|
||||
times = []
|
||||
if !rm.nil?
|
||||
rss = RegisteredSite.active
|
||||
rss.each do |rs|
|
||||
if access.nil?
|
||||
im = InstalledModule.where(:r_module => rm.id, :registered_site_id => rs.id)
|
||||
else
|
||||
im = InstalledModule.where(:r_module => rm.id, :registered_site_id => rs.id,:permission_granted => access)
|
||||
end
|
||||
if im.count > 0
|
||||
rss = RegisteredSite.active
|
||||
rss.each do |rs|
|
||||
if access.nil?
|
||||
im = InstalledModule.where(:r_module => rm.id, :registered_site_id => rs.id)
|
||||
else
|
||||
im = InstalledModule.where(:r_module => rm.id, :registered_site_id => rs.id,:permission_granted => access)
|
||||
end
|
||||
if im.count > 0
|
||||
registered_sites << rs
|
||||
times << im.created_at.strftime("%Y-%m-%d %H:%M") rescue ""
|
||||
times << im.first.created_at.strftime("%Y-%m-%d %H:%M") rescue ""
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue