diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2009-12-18 14:22:18 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2009-12-18 14:22:18 +0000 |
commit | 488c192286ead874fcdfe04b6acf52e52e5cf9fc (patch) | |
tree | 1f72837b55d8da5ff89ee6cdbfc2d0a2ba514153 /app/controllers/my_controller.rb | |
parent | 0e4525d76caf5d8228b01deb417f9ba67a831b93 (diff) | |
download | redmine-488c192286ead874fcdfe04b6acf52e52e5cf9fc.tar.gz redmine-488c192286ead874fcdfe04b6acf52e52e5cf9fc.zip |
Removes "xxx and return" calls (#4446).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3185 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/controllers/my_controller.rb')
-rw-r--r-- | app/controllers/my_controller.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/app/controllers/my_controller.rb b/app/controllers/my_controller.rb index fdf509544..8d1405b87 100644 --- a/app/controllers/my_controller.rb +++ b/app/controllers/my_controller.rb @@ -78,7 +78,11 @@ class MyController < ApplicationController # Manage user's password def password @user = User.current - flash[:error] = l(:notice_can_t_change_password) and redirect_to :action => 'account' and return if @user.auth_source_id + if @user.auth_source_id + flash[:error] = l(:notice_can_t_change_password) + redirect_to :action => 'account' + return + end if request.post? if @user.check_password?(params[:password]) @user.password, @user.password_confirmation = params[:new_password], params[:new_password_confirmation] @@ -116,7 +120,7 @@ class MyController < ApplicationController # params[:block] : id of the block to add def add_block block = params[:block].to_s.underscore - render(:nothing => true) and return unless block && (BLOCKS.keys.include? block) + (render :nothing => true; return) unless block && (BLOCKS.keys.include? block) @user = User.current # remove if already present in a group %w(top left right).each {|f| (session[:page_layout][f] ||= []).delete block } |