Fix date bugs
This commit is contained in:
parent
71d4241a2f
commit
75b67dddf5
|
@ -135,7 +135,7 @@ class Panel::Announcement::BackEnd::BulletinsController < OrbitBackendController
|
|||
else
|
||||
|
||||
@bulletin = Bulletin.new(params[:bulletin])
|
||||
@bulletin.deadline = nil if @bulletin.deadline < @bulletin.postdate
|
||||
@bulletin.deadline = nil if (@bulletin.deadline < @bulletin.postdate rescue nil)
|
||||
|
||||
@bulletin.create_user_id = current_user.id
|
||||
@bulletin.update_user_id = current_user.id
|
||||
|
@ -244,7 +244,7 @@ class Panel::Announcement::BackEnd::BulletinsController < OrbitBackendController
|
|||
else
|
||||
|
||||
@bulletin = Bulletin.find(params[:id])
|
||||
@bulletin.deadline = nil if @bulletin.deadline < @bulletin.postdate
|
||||
@bulletin.deadline = nil if (@bulletin.deadline < @bulletin.postdate rescue nil)
|
||||
|
||||
@bulletin.update_user_id = current_user.id
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@ class Panel::News::BackEnd::NewsBulletinsController < OrbitBackendController
|
|||
|
||||
|
||||
# @news_bulletins = (params[:sort] || @filter) ? get_sorted_and_filtered_news_bulletins : NewsBulletin.all.page(params[:page]).per(10)
|
||||
@news_bulletins = (params[:sort] || @filter) ? get_sorted_and_filtered("news_bulletin") : NewsBulletin.all.page(params[:page]).per(10)
|
||||
@news_bulletins = (params[:sort] || @filter) ? get_sorted_and_filtered("news_bulletin") : get_viewable("news_bulletin")
|
||||
@news_bulletin_categories = NewsBulletinCategory.all
|
||||
|
||||
@news_bulletin_link = NewsBulletinLink.new
|
||||
|
@ -136,7 +136,7 @@ class Panel::News::BackEnd::NewsBulletinsController < OrbitBackendController
|
|||
else
|
||||
|
||||
@news_bulletin = NewsBulletin.new(params[:news_bulletin])
|
||||
@news_bulletin.deadline = nil if @news_bulletin.deadline < @news_bulletin.postdate
|
||||
@news_bulletin.deadline = nil if (@news_bulletin.deadline < @news_bulletin.postdate rescue nil)
|
||||
|
||||
@news_bulletin.create_user_id = current_user.id
|
||||
@news_bulletin.update_user_id = current_user.id
|
||||
|
@ -245,7 +245,7 @@ class Panel::News::BackEnd::NewsBulletinsController < OrbitBackendController
|
|||
else
|
||||
|
||||
@news_bulletin = NewsBulletin.find(params[:id])
|
||||
@news_bulletin.deadline = nil if @news_bulletin.deadline < @news_bulletin.postdate
|
||||
@news_bulletin.deadline = nil if (@news_bulletin.deadline < @news_bulletin.postdate rescue nil)
|
||||
|
||||
@news_bulletin.update_user_id = current_user.id
|
||||
|
||||
|
|
Reference in New Issue