forked from e621ng/e621ng
add back redirect to main comment search page (#1578)
Now it's more inelegant...
This commit is contained in:
parent
20588a7848
commit
6c5c2ee65c
@ -239,7 +239,13 @@ Danbooru::Application.routes.draw do
|
||||
match "/comment/index" => redirect {|params, req| "/comments?page=#{req.params[:page]}"}
|
||||
match "/comment/show/:id" => redirect("/comments/%{id}")
|
||||
match "/comment/new" => redirect("/comments")
|
||||
match "/comment/search" => redirect {|params, req| "/comments?group_by=comment&search[creator_name]=#{CGI::escape(req.params[:query].to_s).sub!(/^user(%3A|%253A|:)/, '')}"}
|
||||
match("/comment/search" => redirect do |params, req|
|
||||
if req.params[:query] =~ /^user:(.+)/i
|
||||
"/comments?group_by=comment&search[creator_name]=#{CGI::escape($1)}"
|
||||
else
|
||||
"/comments/search"
|
||||
end
|
||||
end)
|
||||
|
||||
match "/favorite" => redirect {|params, req| "/favorites?page=#{req.params[:page]}"}
|
||||
match "/favorite/index" => redirect {|params, req| "/favorites?page=#{req.params[:page]}"}
|
||||
|
Loading…
Reference in New Issue
Block a user