mirror of
https://github.com/meineerde/redmine.git
synced 2025-12-19 15:01:14 +00:00
Raises wiki edits comments limit to 1024 (#19886).
git-svn-id: http://svn.redmine.org/redmine/trunk@14622 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
5882629e26
commit
7b12145ed9
@ -22,7 +22,7 @@ class WikiContent < ActiveRecord::Base
|
||||
belongs_to :page, :class_name => 'WikiPage'
|
||||
belongs_to :author, :class_name => 'User'
|
||||
validates_presence_of :text
|
||||
validates_length_of :comments, :maximum => 255, :allow_nil => true
|
||||
validates_length_of :comments, :maximum => 1024, :allow_nil => true
|
||||
attr_protected :id
|
||||
|
||||
acts_as_versioned
|
||||
|
||||
@ -29,7 +29,7 @@
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<p><label><%= l(:field_comments) %></label><%= f.text_field :comments, :size => 120 %></p>
|
||||
<p><label><%= l(:field_comments) %></label><%= f.text_field :comments, :size => 120, :maxlength => 1024 %></p>
|
||||
<p><label><%=l(:label_attachment_plural)%></label><%= render :partial => 'attachments/form' %></p>
|
||||
</div>
|
||||
|
||||
|
||||
@ -0,0 +1,11 @@
|
||||
class ChangeWikiContentsCommentsLimitTo1024 < ActiveRecord::Migration
|
||||
def self.up
|
||||
change_column :wiki_content_versions, :comments, :string, :limit => 1024, :default => ''
|
||||
change_column :wiki_contents, :comments, :string, :limit => 1024, :default => ''
|
||||
end
|
||||
|
||||
def self.down
|
||||
change_column :wiki_content_versions, :comments, :string, :limit => 255, :default => ''
|
||||
change_column :wiki_contents, :comments, :string, :limit => 255, :default => ''
|
||||
end
|
||||
end
|
||||
@ -319,7 +319,7 @@ class WikiControllerTest < ActionController::TestCase
|
||||
put :update, :project_id => 1,
|
||||
:id => 'Another_page',
|
||||
:content => {
|
||||
:comments => 'a' * 300, # failure here, comment is too long
|
||||
:comments => 'a' * 1300, # failure here, comment is too long
|
||||
:text => 'edited'
|
||||
},
|
||||
:wiki_page => {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user