diff --git a/app/controllers/account_controller.rb b/app/controllers/account_controller.rb index cf39898fe..38afb7a28 100644 --- a/app/controllers/account_controller.rb +++ b/app/controllers/account_controller.rb @@ -277,9 +277,18 @@ class AccountController < ApplicationController end call_hook(:controller_account_success_authentication_after, {:user => user }) #by young -# redirect_back_or_default my_page_path - redirect_back_or_default User.current -# redirect_to User.current + code = // + #根据home_url生产正则表达式 + class_eval("code = " + "/" + home_url.gsub(/\//,"\\\/") + "\\\/*(welcome)?\\\/*(\\\/index)?\/") + if code.match(params[:back_url]) + redirect_to user_activities_path(user) + else + #redirect_back_or_default my_page_path + redirect_back_or_default User.current + #redirect_to User.current + end + + end def set_autologin_cookie(user) diff --git a/app/views/memos/show.html.erb b/app/views/memos/show.html.erb index a40ee631a..642d71649 100644 --- a/app/views/memos/show.html.erb +++ b/app/views/memos/show.html.erb @@ -65,7 +65,7 @@ <% pages_count = @reply_pages.offset %> <% @replies.each do |reply| %>
"> -

<%= pages_count += 1 %>楼 :

+

+ <%= link_to image_tag(url_to_avatar(message.author), :class => "avatar"), user_path(message.author) %>
<%= link_to( @@ -150,7 +151,7 @@
- <%= link_to image_tag(url_to_avatar(message.author), :class => "avatar"), user_path(message.author) %> +
<%= textilizable message, :content, :attachments => message.attachments %>