Don't use && return.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11221 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
b07a27b028
commit
e355a55e3c
|
@ -44,7 +44,7 @@ class AccountController < ApplicationController
|
||||||
|
|
||||||
# Lets user choose a new password
|
# Lets user choose a new password
|
||||||
def lost_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]
|
if params[:token]
|
||||||
@token = Token.find_by_action_and_value("recovery", params[:token].to_s)
|
@token = Token.find_by_action_and_value("recovery", params[:token].to_s)
|
||||||
if @token.nil? || @token.expired?
|
if @token.nil? || @token.expired?
|
||||||
|
@ -94,7 +94,7 @@ class AccountController < ApplicationController
|
||||||
|
|
||||||
# User self-registration
|
# User self-registration
|
||||||
def register
|
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?
|
if request.get?
|
||||||
session[:auth_source_registration] = nil
|
session[:auth_source_registration] = nil
|
||||||
@user = User.new(:language => current_language.to_s)
|
@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)
|
user = User.find_or_initialize_by_identity_url(identity_url)
|
||||||
if user.new_record?
|
if user.new_record?
|
||||||
# Self-registration off
|
# 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
|
# Create on the fly
|
||||||
user.login = registration['nickname'] unless registration['nickname'].nil?
|
user.login = registration['nickname'] unless registration['nickname'].nil?
|
||||||
|
|
|
@ -141,7 +141,8 @@ class ProjectsController < ApplicationController
|
||||||
def show
|
def show
|
||||||
if params[:jump]
|
if params[:jump]
|
||||||
# try to redirect to the requested menu item
|
# 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
|
end
|
||||||
|
|
||||||
@users_by_role = @project.users_by_role
|
@users_by_role = @project.users_by_role
|
||||||
|
|
Loading…
Reference in New Issue