diff --git a/app/models/memo.rb b/app/models/memo.rb index 94ff5cee2..7c4fbdcf1 100644 --- a/app/models/memo.rb +++ b/app/models/memo.rb @@ -9,7 +9,7 @@ class Memo < ActiveRecord::Base # 若是主题帖,则内容可以是空 #validates :content, presence: true, if: Proc.new{|o| !o.parent_id.nil? } validates_length_of :subject, maximum: 50 - validates_length_of :content, maximum: 20000 + validates_length_of :content, maximum: 30000 validate :cannot_reply_to_locked_topic, :on => :create acts_as_tree :counter_cache => :replies_count, :order => "#{Memo.table_name}.created_at ASC" diff --git a/app/views/forums/show.html.erb b/app/views/forums/show.html.erb index 8e5a6b8e0..523ab1300 100644 --- a/app/views/forums/show.html.erb +++ b/app/views/forums/show.html.erb @@ -76,8 +76,8 @@ $("#error").html("主题 过长(最长为 50 个字符)").show(); return false; } - if(memo_content.html().length > 20000){ - $("#error").html("内容 过长(最长为 20000 个字符)").show(); + if(memo_content.html().length > 30000){ + $("#error").html("内容 过长(最长为 30000 个字符)").show(); return false; } return true;