X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/091473602b61f013c5daa369fb63143802a630c5..c798fe416a60eb25f8390ca8a5ab22126dfc7155:/app/controllers/user_controller.rb diff --git a/app/controllers/user_controller.rb b/app/controllers/user_controller.rb index d89d483f2..a7822e47f 100644 --- a/app/controllers/user_controller.rb +++ b/app/controllers/user_controller.rb @@ -86,13 +86,20 @@ class UserController < ApplicationController @user.openid_url = nil if @user.openid_url and @user.openid_url.empty? if @user.save - flash[:piwik_goal] = PIWIK_SIGNUP_GOAL if defined?(PIWIK_SIGNUP_GOAL) + flash[:piwik_goal] = PIWIK["goals"]["signup"] if defined?(PIWIK) + + referer = welcome_path begin - referer_params = Rack::Utils.parse_query(URI(session[:referer]).query) - referer = welcome_path(referer_params.slice(:lat, :lon, :zoom, :editor)) + uri = URI(session[:referer]) + /map=(.*)\/(.*)\/(.*)/.match(uri.fragment) do |m| + editor = Rack::Utils.parse_query(uri.query).slice('editor') + referer = welcome_path({'zoom' => m[1], + 'lat' => m[2], + 'lon' => m[3]}.merge(editor)) + end rescue - referer = welcome_path + # Use default end if @user.status == "active"