diff options
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/public_body_controller.rb | 6 | ||||
-rw-r--r-- | app/controllers/user_controller.rb | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/app/controllers/public_body_controller.rb b/app/controllers/public_body_controller.rb index 19bb22f67..21ef45677 100644 --- a/app/controllers/public_body_controller.rb +++ b/app/controllers/public_body_controller.rb @@ -4,13 +4,13 @@ # Copyright (c) 2007 UK Citizens Online Democracy. All rights reserved. # Email: francis@mysociety.org; WWW: http://www.mysociety.org/ # -# $Id: public_body_controller.rb,v 1.5 2009-09-02 14:10:37 francis Exp $ +# $Id: public_body_controller.rb,v 1.6 2009-09-07 17:31:36 francis Exp $ class PublicBodyController < ApplicationController # XXX tidy this up with better error messages, and a more standard infrastructure for the redirect to canonical URL def show - if MySociety::Format.simplify_url_part(params[:url_name]) != params[:url_name] - redirect_to :url_name => MySociety::Format.simplify_url_part(params[:url_name]), :status => :moved_permanently + if MySociety::Format.simplify_url_part(params[:url_name], 'body') != params[:url_name] + redirect_to :url_name => MySociety::Format.simplify_url_part(params[:url_name], 'body'), :status => :moved_permanently return end diff --git a/app/controllers/user_controller.rb b/app/controllers/user_controller.rb index c3b2efc03..4b4846ff1 100644 --- a/app/controllers/user_controller.rb +++ b/app/controllers/user_controller.rb @@ -4,13 +4,13 @@ # Copyright (c) 2007 UK Citizens Online Democracy. All rights reserved. # Email: francis@mysociety.org; WWW: http://www.mysociety.org/ # -# $Id: user_controller.rb,v 1.69 2009-09-02 14:10:38 francis Exp $ +# $Id: user_controller.rb,v 1.70 2009-09-07 17:31:38 francis Exp $ class UserController < ApplicationController # Show page about a user def show - if MySociety::Format.simplify_url_part(params[:url_name], 32) != params[:url_name] - redirect_to :url_name => MySociety::Format.simplify_url_part(params[:url_name], 32), :status => :moved_permanently + if MySociety::Format.simplify_url_part(params[:url_name], 'user', 32) != params[:url_name] + redirect_to :url_name => MySociety::Format.simplify_url_part(params[:url_name], 'user', 32), :status => :moved_permanently return end |