This commit is contained in:
albert
2013-01-05 23:00:21 -05:00
parent ef64950afd
commit 6a2f80619d

View File

@@ -1,6 +1,6 @@
module AdvertisementsHelper module AdvertisementsHelper
def render_advertisement(ad_type) def render_advertisement(ad_type)
if Danbooru.config.can_user_see_ads?(CurrentUser.user) if Danbooru.config.can_see_ads?(CurrentUser.user)
@advertisement = Advertisement.find(:first, :conditions => ["ad_type = ? AND status = 'active'", ad_type], :order => "random()") @advertisement = Advertisement.find(:first, :conditions => ["ad_type = ? AND status = 'active'", ad_type], :order => "random()")
content_tag( content_tag(
"div", "div",
@@ -21,7 +21,7 @@ module AdvertisementsHelper
end end
def render_rss_advertisement(short_or_long, safe) def render_rss_advertisement(short_or_long, safe)
if Danbooru.config.can_user_see_ads?(CurrentUser.user) if Danbooru.config.can_see_ads?(CurrentUser.user)
if safe if safe
render "advertisements/jlist_rss_ads_explicit_#{short_or_long}" render "advertisements/jlist_rss_ads_explicit_#{short_or_long}"
else else