app/controllers/fiona7/sessions_controller.rb in infopark_fiona7-1.2.0.2.1 vs app/controllers/fiona7/sessions_controller.rb in infopark_fiona7-1.2.0.2.2

- old
+ new

@@ -5,11 +5,11 @@ def create login, password = params[:login], params[:password] if valid_credentials?(login, password) rsession.user_name = login - redirect_to true_root_path + redirect_to login_redirect else flash[:error] = I18n.t(:"fiona7.invalid_credentails") begin redirect_to :back rescue ActionController::RedirectBackError @@ -24,9 +24,13 @@ end protected def load_login_page @login_page = Fiona7LoginPage.instance || Scrivito::BasicObj.root + end + + def login_redirect + session[:login_redirect].presence || true_root_path end def true_root_path if Fiona7.mode == :standalone '/'