fix feed annc error
This commit is contained in:
parent
4fbb66d19d
commit
c939216c6d
|
@ -63,7 +63,7 @@ module AnnouncementsHelper
|
|||
def get_feed_annc(type,site_source,locale)
|
||||
ma_key = 'announcement'
|
||||
if type == "index"
|
||||
categories = Array(OrbitHelper.widget_categories)
|
||||
categories = Array(OrbitHelper.page_categories)
|
||||
elsif type == "widget"
|
||||
categories = Array(OrbitHelper.widget_categories)
|
||||
else
|
||||
|
@ -169,7 +169,7 @@ module AnnouncementsHelper
|
|||
rest_anns = rest_all_anns.sort{|v1,v2| v2["postdate"]<=>v1["postdate"]}
|
||||
all_sorted = top_anns.sort{|v1,v2| v2["postdate"]<=>v1["postdate"]} + rest_anns
|
||||
else
|
||||
all_sorted = feeds_anns.sort{|v1,v2| [v2['is_top'],v2["postdate"]]<=>[v1['is_top'],v1["postdate"]]}
|
||||
all_sorted = feeds_anns.select{|v| v['is_top']}.sort{|v1,v2| v2["postdate"]<=>v1["postdate"]} + feeds_anns.select{|v| v['is_top'] != true}.sort{|v1,v2| v2["postdate"]<=>v1["postdate"]}
|
||||
end
|
||||
all_filter = filter_by_keywords(all_sorted,params[:keywords])
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue