summaryrefslogtreecommitdiffstats
path: root/app/controllers/my_controller.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2010-12-12 14:19:24 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2010-12-12 14:19:24 +0000
commit9e2d401f43d9136e887cb099a72ecc33d9dd88f5 (patch)
tree1f4b82a81336dfd01acd678aa569f3dda0314ea1 /app/controllers/my_controller.rb
parent1d4f28a54dec696e34f1477f440471c97d521963 (diff)
downloadredmine-9e2d401f43d9136e887cb099a72ecc33d9dd88f5.tar.gz
redmine-9e2d401f43d9136e887cb099a72ecc33d9dd88f5.zip
Moves mail_notification param to user hash param so that it can be set using the User API.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4496 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/controllers/my_controller.rb')
-rw-r--r--app/controllers/my_controller.rb4
1 files changed, 1 insertions, 3 deletions
diff --git a/app/controllers/my_controller.rb b/app/controllers/my_controller.rb
index e552caa16..26641b527 100644
--- a/app/controllers/my_controller.rb
+++ b/app/controllers/my_controller.rb
@@ -54,12 +54,11 @@ class MyController < ApplicationController
@pref = @user.pref
if request.post?
@user.safe_attributes = params[:user]
- @user.mail_notification = params[:notification_option] || 'only_my_events'
@user.pref.attributes = params[:pref]
@user.pref[:no_self_notified] = (params[:no_self_notified] == '1')
if @user.save
@user.pref.save
- @user.notified_project_ids = (params[:notification_option] == 'selected' ? params[:notified_project_ids] : [])
+ @user.notified_project_ids = (@user.mail_notification == 'selected' ? params[:notified_project_ids] : [])
set_language_if_valid @user.language
flash[:notice] = l(:notice_account_updated)
redirect_to :action => 'account'
@@ -67,7 +66,6 @@ class MyController < ApplicationController
end
end
@notification_options = @user.valid_notification_options
- @notification_option = @user.mail_notification #? ? 'all' : (@user.notified_projects_ids.empty? ? 'none' : 'selected')
end
# Manage user's password