From 8e9e1f16090b32c84427ef1b471ef2bef7dcedd7 Mon Sep 17 00:00:00 2001 From: Harry Bomrah Date: Wed, 27 Apr 2016 19:05:10 +0800 Subject: [PATCH] small fix --- app/controllers/announcements_controller.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/controllers/announcements_controller.rb b/app/controllers/announcements_controller.rb index 02230fb..d0880ec 100644 --- a/app/controllers/announcements_controller.rb +++ b/app/controllers/announcements_controller.rb @@ -18,8 +18,10 @@ class AnnouncementsController < ApplicationController end end - if (OrbitHelper.page_number == 1 or OrbitHelper.page_number.nil?) && !params["source"].present? - top_anns = Bulletin.where(:title.ne => "",:is_preview.in=>[false,nil], :is_top => true).and(:title.ne => nil).can_display.filter_by_categories([],false).to_a + if !params["source"].present? + if (OrbitHelper.page_number == 1 or OrbitHelper.page_number.nil?) + top_anns = Bulletin.where(:title.ne => "",:is_preview.in=>[false,nil], :is_top => true).and(:title.ne => nil).can_display.filter_by_categories([],false).to_a + end end if !feeds_anns.blank? announcements = announcements.concat(feeds_anns)