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 = []
|
registered_sites = []
|
||||||
times = []
|
times = []
|
||||||
if !rm.nil?
|
if !rm.nil?
|
||||||
rss = RegisteredSite.active
|
rss = RegisteredSite.active
|
||||||
rss.each do |rs|
|
rss.each do |rs|
|
||||||
if access.nil?
|
if access.nil?
|
||||||
im = InstalledModule.where(:r_module => rm.id, :registered_site_id => rs.id)
|
im = InstalledModule.where(:r_module => rm.id, :registered_site_id => rs.id)
|
||||||
else
|
else
|
||||||
im = InstalledModule.where(:r_module => rm.id, :registered_site_id => rs.id,:permission_granted => access)
|
im = InstalledModule.where(:r_module => rm.id, :registered_site_id => rs.id,:permission_granted => access)
|
||||||
end
|
end
|
||||||
if im.count > 0
|
if im.count > 0
|
||||||
registered_sites << rs
|
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
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue