From 91e991e9517fdeecf7b495957e90af7536486547 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Wed, 1 Jun 2016 19:27:09 +0000 Subject: Limits the schemes that custom field URL patterns can use (#22925). git-svn-id: http://svn.redmine.org/redmine/trunk@15435 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/models/custom_field.rb | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'app/models') diff --git a/app/models/custom_field.rb b/app/models/custom_field.rb index 511299523..370ce7090 100644 --- a/app/models/custom_field.rb +++ b/app/models/custom_field.rb @@ -262,6 +262,14 @@ class CustomField < ActiveRecord::Base args.include?(field_format) end + def self.human_attribute_name(attribute_key_name, *args) + attr_name = attribute_key_name.to_s + if attr_name == 'url_pattern' + attr_name = "url" + end + super(attr_name, *args) + end + protected # Removes multiple values for the custom field after setting the multiple attribute to false -- cgit v1.2.3