small fix for top bulletins if not approved

This commit is contained in:
Harry Bomrah 2016-09-12 14:11:21 +08:00
parent e4766f3ac3
commit 7c3f590b6b
1 changed files with 1 additions and 1 deletions

View File

@ -170,7 +170,7 @@ class AnnouncementsController < ApplicationController
uid = OrbitHelper.params[:uid] rescue "" uid = OrbitHelper.params[:uid] rescue ""
tags = OrbitHelper.widget_tags tags = OrbitHelper.widget_tags
announcements = Bulletin.where(:title.ne => "",:is_preview.in=>[false,nil],:uid.ne => uid).and(:title.ne => nil, :is_top.ne => true).can_display.is_approved.filter_by_widget_categories([],false).filter_by_tags(tags).to_a announcements = Bulletin.where(:title.ne => "",:is_preview.in=>[false,nil],:uid.ne => uid).and(:title.ne => nil, :is_top.ne => true).can_display.is_approved.filter_by_widget_categories([],false).filter_by_tags(tags).to_a
top_anns = Bulletin.where(:title.ne => "",:is_preview.in=>[false,nil], :is_top => true, :uid.ne => uid).and(:title.ne => nil).can_display.filter_by_widget_categories([],false).filter_by_tags(tags).to_a top_anns = Bulletin.where(:title.ne => "",:is_preview.in=>[false,nil], :is_top => true, :uid.ne => uid).and(:title.ne => nil).can_display.is_approved.filter_by_widget_categories([],false).filter_by_tags(tags).to_a
pack_data(announcements, top_anns) pack_data(announcements, top_anns)
end end