diff options
author | francis <francis> | 2009-09-07 17:31:36 +0000 |
---|---|---|
committer | francis <francis> | 2009-09-07 17:31:36 +0000 |
commit | a5869799758e4e79094778cd7df21a013d5fb3ba (patch) | |
tree | 4338316f601a170c349f3d7e044db90e1f7778ca /app/models/info_request.rb | |
parent | cd3baa5e71a1ef17d3e43b839e8e68b08533799e (diff) |
Don't allow numeric only URL names.
Test the URL name code a bit.
Diffstat (limited to 'app/models/info_request.rb')
-rw-r--r-- | app/models/info_request.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/info_request.rb b/app/models/info_request.rb index da5270c40..2cf3a08b4 100644 --- a/app/models/info_request.rb +++ b/app/models/info_request.rb @@ -24,7 +24,7 @@ # Copyright (c) 2007 UK Citizens Online Democracy. All rights reserved. # Email: francis@mysociety.org; WWW: http://www.mysociety.org/ # -# $Id: info_request.rb,v 1.202 2009-09-07 16:35:06 francis Exp $ +# $Id: info_request.rb,v 1.203 2009-09-07 17:31:38 francis Exp $ require 'digest/sha1' require File.join(File.dirname(__FILE__),'../../vendor/plugins/acts_as_xapian/lib/acts_as_xapian') @@ -154,7 +154,7 @@ public self.update_url_title end def update_url_title - url_title = MySociety::Format.simplify_url_part(self.title, 32) + url_title = MySociety::Format.simplify_url_part(self.title, 'request', 32) # For request with same title as others, add on arbitary numeric identifier unique_url_title = url_title suffix_num = 2 # as there's already one without numeric suffix |