Add min_private_message_title_length site setting so private messages can have short titles

This commit is contained in:
Neil Lalonde
2013-06-04 17:58:25 -04:00
parent 89ef726bb3
commit 2465c9c724
9 changed files with 131 additions and 9 deletions

View File

@@ -39,8 +39,7 @@ class Topic < ActiveRecord::Base
before_validation :sanitize_title
validates :title, :presence => true,
:length => { :in => SiteSetting.topic_title_length,
:allow_blank => true },
:topic_title_length => true,
:quality_title => { :unless => :private_message? },
:unique_among => { :unless => Proc.new { |t| (SiteSetting.allow_duplicate_topic_titles? || t.private_message?) },
:message => :has_already_been_used,