Compare commits
No commits in common. "3627bdc4b215d6412fb21b4f7d6532571d9052c9" and "f952165f34fc5f69aff0ae509b00a7cf31bc0924" have entirely different histories.
3627bdc4b2
...
f952165f34
|
@ -781,5 +781,10 @@ class SeminarsController < ApplicationController
|
||||||
mail_subject: email_set[0].title[I18n.locale],
|
mail_subject: email_set[0].title[I18n.locale],
|
||||||
template_data:{'seminar_id'=>seminar_id,'locale'=>I18n.locale,'extra_text'=> extra_text})
|
template_data:{'seminar_id'=>seminar_id,'locale'=>I18n.locale,'extra_text'=> extra_text})
|
||||||
end
|
end
|
||||||
|
begin
|
||||||
|
mail.deliver
|
||||||
|
rescue => e
|
||||||
|
puts ["email can't deliver",e]
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -6,10 +6,7 @@ Rails.application.routes.draw do
|
||||||
Thread.new do
|
Thread.new do
|
||||||
if Page.fields.include?('all_pageids')
|
if Page.fields.include?('all_pageids')
|
||||||
s = Site.first
|
s = Site.first
|
||||||
update_flag = s.respond_to?(:tmp_flags)
|
if s.respond_to?(:tmp_flags) && !(s.tmp_flags.include?('fix_sr'))
|
||||||
need_update1 = update_flag && !(s.tmp_flags.include?('fix_sr'))
|
|
||||||
need_update2 = !update_flag || !(s.tmp_flags.include?('sm1'))
|
|
||||||
if need_update1
|
|
||||||
Page.where(:bind_model=>"SeminarMain",:all_pageids=>nil).each do |p|
|
Page.where(:bind_model=>"SeminarMain",:all_pageids=>nil).each do |p|
|
||||||
p.save
|
p.save
|
||||||
end
|
end
|
||||||
|
@ -17,16 +14,6 @@ Rails.application.routes.draw do
|
||||||
tmp_flags << 'fix_sr'
|
tmp_flags << 'fix_sr'
|
||||||
Site.update_all(:tmp_flags => tmp_flags)
|
Site.update_all(:tmp_flags => tmp_flags)
|
||||||
end
|
end
|
||||||
if need_update2
|
|
||||||
SeminarMain.where(:enable_recaptcha=>nil).each do |seminar_main|
|
|
||||||
seminar_main.update_enable_recaptcha
|
|
||||||
end
|
|
||||||
if update_flag
|
|
||||||
s = Site.first
|
|
||||||
s.tmp_flags << 'sm1'
|
|
||||||
s.save
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
locales = Site.first.in_use_locales rescue I18n.available_locales
|
locales = Site.first.in_use_locales rescue I18n.available_locales
|
||||||
|
|
Loading…
Reference in New Issue