From 6d555a408a48c7d38dac29015bb525a6593a13e5 Mon Sep 17 00:00:00 2001 From: albert Date: Mon, 25 Mar 2013 22:32:24 -0400 Subject: [PATCH] fixes #1079 --- config/routes.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/config/routes.rb b/config/routes.rb index 6aa8b5981..faeb79bba 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -217,12 +217,12 @@ Danbooru::Application.routes.draw do resources :fposts, :controller => "forum_posts" # legacy aliases - match "/artist" => redirect {|params, req| "/artists?page=#{req.params[:page]}&search[name]=#{CGI::escape(req.params[:name])}"} + match "/artist" => redirect {|params, req| "/artists?page=#{req.params[:page]}&search[name]=#{CGI::escape(req.params[:name].to_s)}"} match "/artist/index.xml", :controller => "legacy", :action => "artists", :format => "xml" match "/artist/index.json", :controller => "legacy", :action => "artists", :format => "json" match "/artist/index" => redirect {|params, req| "/artists?page=#{req.params[:page]}"} match "/artist/show/:id" => redirect("/artists/%{id}") - match "/artist/show" => redirect {|params, req| "/artists?name=#{CGI::escape(req.params[:name])}"} + match "/artist/show" => redirect {|params, req| "/artists?name=#{CGI::escape(req.params[:name].to_s)}"} match "/artist/history/:id" => redirect("/artist_versions?search[artist_id]=%{id}") match "/artist/update/:id" => redirect("/artists/%{id}") match "/artist/destroy/:id" => redirect("/artists/%{id}") @@ -282,10 +282,10 @@ Danbooru::Application.routes.draw do match "/tag/index.xml", :controller => "legacy", :action => "tags", :format => "xml" match "/tag/index.json", :controller => "legacy", :action => "tags", :format => "json" - match "/tag" => redirect {|params, req| "/tags?page=#{req.params[:page]}&search[name_matches]=#{CGI::escape(req.params[:name])}&search[order]=#{req.params[:order]}"} - match "/tag/index" => redirect {|params, req| "/tags?page=#{req.params[:page]}&search[name_matches]=#{CGI::escape(req.params[:name])}&search[order]=#{req.params[:order]}"} + match "/tag" => redirect {|params, req| "/tags?page=#{req.params[:page]}&search[name_matches]=#{CGI::escape(req.params[:name].to_s)}&search[order]=#{req.params[:order]}"} + match "/tag/index" => redirect {|params, req| "/tags?page=#{req.params[:page]}&search[name_matches]=#{CGI::escape(req.params[:name].to_s)}&search[order]=#{req.params[:order]}"} - match "/tag_implication" => redirect {|params, req| "/tag_implications?search[name_matches]=#{CGI::escape(req.params[:query])}"} + match "/tag_implication" => redirect {|params, req| "/tag_implications?search[name_matches]=#{CGI::escape(req.params[:query].to_s)}"} match "/user/index.xml", :controller => "legacy", :action => "users", :format => "xml" match "/user/index.json", :controller => "legacy", :action => "users", :format => "json"