Commit e53e6321 authored by 神楽坂玲奈's avatar 神楽坂玲奈

redirect_to :back 加入容错,可以通过直接访问/theme/lotus指定风格不报错

git-svn-id: http://glupx.googlecode.com/svn/trunk/Reliz@77 189f022a-1064-8ae2-3e6f-c4a67275c50b
parent 08ef59a8
......@@ -59,10 +59,18 @@ class ApplicationController < ActionController::Base
#p @site[:themes]
end
#def redirect_to_thc
#p 'WARNING: '+params[:anything]+"?"+env['QUERY_STRING']
#redirect_to("http://www.touhou.cc/bbs/"+params[:anything]+"?"+env['QUERY_STRING'])
#respond_to do |format|
#format.html { render :error => "404" }
#end
#p 'WARNING: '+params[:anything]+"?"+env['QUERY_STRING']
#redirect_to("http://www.touhou.cc/bbs/"+params[:anything]+"?"+env['QUERY_STRING'])
#respond_to do |format|
#format.html { render :error => "404" }
#end
#end
alias old_redirect_to redirect_to
def redirect_to(*args)
if args.first == :back and env['HTTP_REFERER'].blank?
old_redirect_to(:root)
else
old_redirect_to *args
end
end
end
\ No newline at end of file
......@@ -41,4 +41,4 @@ module Reliz
config.i18n.default_locale = 'zh-CN'
end
end
\ No newline at end of file
end
This diff is collapsed.
7668
\ No newline at end of file
6596
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment