diff --git a/app/models/mailer.rb b/app/models/mailer.rb index b404ea531..e1c538fd0 100644 --- a/app/models/mailer.rb +++ b/app/models/mailer.rb @@ -125,7 +125,7 @@ class Mailer < ActionMailer::Base end - + # 公共讨论区发帖、回帖添加邮件发送信息 def forum_message_added(memo) @memo = memo redmine_headers 'Memo' => memo.id @@ -134,9 +134,11 @@ class Mailer < ActionMailer::Base @forum_url = url_for(:controller => 'forums', :action => 'show', :id => @forum.id) @issue_author_url = url_for(user_activities_url(@author)) recipients ||= [] - if @forum.author.mail_notification != 'day' && @forum.author.mail_notification != 'week' + #将帖子创建者邮箱地址加入数组 + if @forum.creator.mail_notification != 'day' && @forum.creator.mail_notification != 'week' recipients << @forum.creator.mail end + #回复人邮箱地址加入数组 if @author.mail_notification != 'day' && @author.mail_notification != 'week' recipients << @author.mail end diff --git a/app/models/memo.rb b/app/models/memo.rb index 052ca03db..b4e30dabe 100644 --- a/app/models/memo.rb +++ b/app/models/memo.rb @@ -42,7 +42,7 @@ class Memo < ActiveRecord::Base "parent_id", "replies_count" - after_create :add_author_as_watcher, :reset_counters! #, :sendmail#,:be_user_score -- 公共区发帖暂不计入得分 + after_create :add_author_as_watcher, :reset_counters!, :sendmail # after_update :update_memos_forum after_destroy :reset_counters!#,:down_user_score -- 公共区发帖暂不计入得分 # after_create :send_notification diff --git a/app/views/layouts/_base_feedback.html.erb b/app/views/layouts/_base_feedback.html.erb index 2172af8de..d964b788f 100644 --- a/app/views/layouts/_base_feedback.html.erb +++ b/app/views/layouts/_base_feedback.html.erb @@ -121,15 +121,15 @@ function cookiesave(n, v, mins, dn, path) { if(n) { - + if(!mins) mins = 365 * 24 * 60; if(!path) path = "/"; var date = new Date(); - + date.setTime(date.getTime() + (mins * 60 * 1000)); - + var expires = "; expires=" + date.toGMTString(); - + if(dn) dn = "domain=" + dn + "; "; document.cookie = n + "=" + v + expires + "; " + dn + "path=" + path; @@ -170,8 +170,8 @@ function cookieget(n) <%= f.hidden_field :content, :required => true , :value => l(:label_feedback_value) %> <%#= f.submit :value => l(:label_memo_create), :class => "opnionButton", :id => "button1" %> <%= l(:label_submit)%> - <% end %> - + <% end %> +