From 915ea066d6f5a01135034a7ed71673cf02f16f21 Mon Sep 17 00:00:00 2001 From: "Matthew K. Fu JuYuan" Date: Mon, 2 Sep 2013 17:24:28 +0800 Subject: [PATCH] fixing bulletin default widget --- lib/orbit_app/module/widget.rb | 2 +- vendor/built_in_modules/announcement/init.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/orbit_app/module/widget.rb b/lib/orbit_app/module/widget.rb index 99cb6de7b..a518d302f 100644 --- a/lib/orbit_app/module/widget.rb +++ b/lib/orbit_app/module/widget.rb @@ -102,7 +102,7 @@ module OrbitApp def initialize(&block) @query = nil @image = nil - @sorting_query = nil + @sorting_query = 'desc(:created_at)' @more_link = {} @fields = [] @enabled_styles = STYLE diff --git a/vendor/built_in_modules/announcement/init.rb b/vendor/built_in_modules/announcement/init.rb index 7c8396816..7c98b65ac 100644 --- a/vendor/built_in_modules/announcement/init.rb +++ b/vendor/built_in_modules/announcement/init.rb @@ -29,7 +29,7 @@ module Announcement widgets do default_widget do - sorting 'desc(:created_at)' + sorting 'desc(:postdate)' query 'Bulletin.any_of( {deadline: nil,:postdate.lte => Time.now} , {:deadline.gte => Time.now,:postdate.lte => Time.now} )' enable ["typeA","typeB_style3","typeC"] image :image