fixed infinite loop problem and also changed some engine settings
This commit is contained in:
parent
91ef557cf2
commit
6ec8f6a5c0
|
@ -34,6 +34,8 @@ class GalleriesController < ApplicationController
|
||||||
params = OrbitHelper.params
|
params = OrbitHelper.params
|
||||||
|
|
||||||
images = []
|
images = []
|
||||||
|
|
||||||
|
if !albums.blank?
|
||||||
while images.count < 9 and images.count < AlbumImage.count
|
while images.count < 9 and images.count < AlbumImage.count
|
||||||
albums.each do |album|
|
albums.each do |album|
|
||||||
img = album.album_images.sample
|
img = album.album_images.sample
|
||||||
|
@ -42,6 +44,7 @@ class GalleriesController < ApplicationController
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
images = images.collect do |a|
|
images = images.collect do |a|
|
||||||
{
|
{
|
||||||
"link_to_show" => OrbitHelper.widget_more_url + "/-" + a.id.to_s + "?method=theater",
|
"link_to_show" => OrbitHelper.widget_more_url + "/-" + a.id.to_s + "?method=theater",
|
||||||
|
|
|
@ -5,7 +5,7 @@ module Gallery
|
||||||
module_label "gallery.gallery"
|
module_label "gallery.gallery"
|
||||||
base_url File.expand_path File.dirname(__FILE__)
|
base_url File.expand_path File.dirname(__FILE__)
|
||||||
widget_methods ["widget"]
|
widget_methods ["widget"]
|
||||||
widget_settings [{"data_count"=>10}]
|
widget_settings []
|
||||||
categorizable
|
categorizable
|
||||||
authorizable
|
authorizable
|
||||||
frontend_enabled
|
frontend_enabled
|
||||||
|
|
Loading…
Reference in New Issue