diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2013-01-20 13:54:42 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2013-01-20 13:54:42 +0000 |
commit | e355a55e3c691399cf120e3e21815c8ea623dae9 (patch) | |
tree | 8fa8bbe51e05f61f3d1de742872e1fa93be065f6 /app | |
parent | b07a27b028350b352485a7547877947781baa302 (diff) | |
download | redmine-e355a55e3c691399cf120e3e21815c8ea623dae9.tar.gz redmine-e355a55e3c691399cf120e3e21815c8ea623dae9.zip |
Don't use && return.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11221 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app')
-rw-r--r-- | app/controllers/account_controller.rb | 6 | ||||
-rw-r--r-- | app/controllers/projects_controller.rb | 3 |
2 files changed, 5 insertions, 4 deletions
diff --git a/app/controllers/account_controller.rb b/app/controllers/account_controller.rb index 3c4b7b7cf..281e44b82 100644 --- a/app/controllers/account_controller.rb +++ b/app/controllers/account_controller.rb @@ -44,7 +44,7 @@ class AccountController < ApplicationController # Lets user choose a new password def lost_password - redirect_to(home_url) && return unless Setting.lost_password? + (redirect_to(home_url); return) unless Setting.lost_password? if params[:token] @token = Token.find_by_action_and_value("recovery", params[:token].to_s) if @token.nil? || @token.expired? @@ -94,7 +94,7 @@ class AccountController < ApplicationController # User self-registration def register - redirect_to(home_url) && return unless Setting.self_registration? || session[:auth_source_registration] + (redirect_to(home_url); return) unless Setting.self_registration? || session[:auth_source_registration] if request.get? session[:auth_source_registration] = nil @user = User.new(:language => current_language.to_s) @@ -176,7 +176,7 @@ class AccountController < ApplicationController user = User.find_or_initialize_by_identity_url(identity_url) if user.new_record? # Self-registration off - redirect_to(home_url) && return unless Setting.self_registration? + (redirect_to(home_url); return) unless Setting.self_registration? # Create on the fly user.login = registration['nickname'] unless registration['nickname'].nil? diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index a3527a550..df1d63776 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -141,7 +141,8 @@ class ProjectsController < ApplicationController def show if params[:jump] # try to redirect to the requested menu item - redirect_to_project_menu_item(@project, params[:jump]) && return + redirect_to_project_menu_item(@project, params[:jump]) + return end @users_by_role = @project.users_by_role |