back_url.v.0.1.patch

Oleg Volkov, 2010-04-13 14:40

Download (1.06 KB)

View differences:

redmine/app/controllers/account_controller.rb 2010-04-13 16:27:28.218550906 +0400
150 153

  
151 154
  
152 155
  def open_id_authenticate(openid_url)
156
    cookies[:back_url] = { :value => CGI.unescape(params[:back_url].to_s) } unless params[:open_id_complete]
153 157
    authenticate_with_open_id(openid_url, :required => [:nickname, :fullname, :email], :return_to => signin_url) do |result, identity_url, registration|
154 158
      if result.successful?
155 159
        user = User.find_or_initialize_by_identity_url(identity_url)
156
-- redmine-0.9.3/app/controllers/application_controller.rb	2010-02-28 13:28:06.000000000 +0300
160
++ redmine/app/controllers/application_controller.rb	2010-04-12 00:33:05.696050003 +0400
......
177 177

  
178 178
  def redirect_back_or_default(default)
179 179
    back_url = CGI.unescape(params[:back_url].to_s)
180
    if back_url.blank?
181
      back_url = cookies[:back_url]
182
      cookies.delete :back_url
183
    end
180 184
    if !back_url.blank?
181 185
      begin
182 186
        uri = URI.parse(back_url)