Project

General

Profile

Patch #1404 » D1071_enlarge_wiki_content_take2.patch

Patch updated against r1736 - Thomas Lecavelier, 2008-08-12 21:38

View differences:

test/unit/wiki_content_test.rb (copie de travail)
40 40
    assert_equal User.find(1), content.author
41 41
    assert_equal content.text, content.versions.last.text
42 42
  end
43
  
44
  def test_very_big_create
45
    page = WikiPage.new(:wiki => @wiki, :title => "Big big page")
46
    big_text = "X" * 1024 * 64
47
    bt_l = big_text.length
48
    puts "text length: #{bt_l}"
49
    page.content = WikiContent.new(:text => big_text, :author => User.find(1), :comments => "Eat that, MySQL")
50
    page.save
51
    assert_equal bt_l, WikiPage.find(page.id).content.text.length, "Wiki content lost!" 
52
  end
43 53

  
44 54
  def test_update
45 55
    content = @page.content
test/functional/issues_controller_test.rb (copie de travail)
448 448
         :attachments => {'1' => {'file' => test_uploaded_file('testfile.txt', 'text/plain')}}
449 449
    assert_redirected_to 'issues/show/1'
450 450
    j = Issue.find(1).journals.find(:first, :order => 'id DESC')
451
    puts j.notes
451 452
    assert j.notes.blank?
452 453
    assert_equal 1, j.details.size
453 454
    assert_equal 'testfile.txt', j.details.first.value
app/controllers/wiki_controller.rb (copie de travail)
72 72
      @content.attributes = params[:content]
73 73
      @content.author = User.current
74 74
      # if page is new @page.save will also save content, but not if page isn't a new record
75
      if (@page.new_record? ? @page.save : @content.save)
75
      if (@page.new_record? ? @page.save! : @content.save!)
76 76
        redirect_to :action => 'index', :id => @project, :page => @page.title
77 77
      end
78 78
    end
79
  rescue ActiveRecord::StatementInvalid
80
    # Content too long for database
81
    flash[:error] = l(:text_wiki_content_too_large)
79 82
  rescue ActiveRecord::StaleObjectError
80 83
    # Optimistic locking exception
81 84
    flash[:error] = l(:notice_locking_conflict)
lang/lt.yml (copie de travail)
637 637
text_email_delivery_not_configured: "Email delivery is not configured, and notifications are disabled.\nConfigure your SMTP server in config/email.yml and restart the application to enable them."
638 638
field_parent_title: Parent page
639 639
label_issue_watchers: Watchers
640
text_wiki_content_too_large: Wiki content is too large for your database. Please truncate it.
lang/uk.yml (copie de travail)
636 636
text_email_delivery_not_configured: "Email delivery is not configured, and notifications are disabled.\nConfigure your SMTP server in config/email.yml and restart the application to enable them."
637 637
field_parent_title: Parent page
638 638
label_issue_watchers: Watchers
639
text_wiki_content_too_large: Wiki content is too large for your database. Please truncate it.
lang/ro.yml (copie de travail)
634 634
text_email_delivery_not_configured: "Email delivery is not configured, and notifications are disabled.\nConfigure your SMTP server in config/email.yml and restart the application to enable them."
635 635
field_parent_title: Parent page
636 636
label_issue_watchers: Watchers
637
text_wiki_content_too_large: Wiki content is too large for your database. Please truncate it.
lang/zh.yml (copie de travail)
635 635
text_email_delivery_not_configured: "Email delivery is not configured, and notifications are disabled.\nConfigure your SMTP server in config/email.yml and restart the application to enable them."
636 636
field_parent_title: Parent page
637 637
label_issue_watchers: Watchers
638
text_wiki_content_too_large: Wiki content is too large for your database. Please truncate it.
lang/pt.yml (copie de travail)
634 634
text_email_delivery_not_configured: "Email delivery is not configured, and notifications are disabled.\nConfigure your SMTP server in config/email.yml and restart the application to enable them."
635 635
field_parent_title: Parent page
636 636
label_issue_watchers: Watchers
637
text_wiki_content_too_large: Wiki content is too large for your database. Please truncate it.
lang/da.yml (copie de travail)
636 636
text_email_delivery_not_configured: "Email delivery is not configured, and notifications are disabled.\nConfigure your SMTP server in config/email.yml and restart the application to enable them."
637 637
field_parent_title: Parent page
638 638
label_issue_watchers: Watchers
639
text_wiki_content_too_large: Wiki content is too large for your database. Please truncate it.
lang/sr.yml (copie de travail)
635 635
text_email_delivery_not_configured: "Email delivery is not configured, and notifications are disabled.\nConfigure your SMTP server in config/email.yml and restart the application to enable them."
636 636
field_parent_title: Parent page
637 637
label_issue_watchers: Watchers
638
text_wiki_content_too_large: Wiki content is too large for your database. Please truncate it.
lang/ru.yml (copie de travail)
638 638
text_email_delivery_not_configured: "Параметры работы с почтовым сервером не настроены и функция уведомления по email не активна.\nНастроить параметры для вашего SMTP сервера вы можете в файле config/email.yml. Для применения изменений перезапустите приложение."
639 639
field_parent_title: Parent page
640 640
label_issue_watchers: Watchers
641
text_wiki_content_too_large: Wiki content is too large for your database. Please truncate it.
lang/de.yml (copie de travail)
635 635
text_email_delivery_not_configured: "Email delivery is not configured, and notifications are disabled.\nConfigure your SMTP server in config/email.yml and restart the application to enable them."
636 636
field_parent_title: Parent page
637 637
label_issue_watchers: Watchers
638
text_wiki_content_too_large: Wiki content is too large for your database. Please truncate it.
lang/bg.yml (copie de travail)
634 634
text_email_delivery_not_configured: "Email delivery is not configured, and notifications are disabled.\nConfigure your SMTP server in config/email.yml and restart the application to enable them."
635 635
field_parent_title: Parent page
636 636
label_issue_watchers: Watchers
637
text_wiki_content_too_large: Wiki content is too large for your database. Please truncate it.
lang/sv.yml (copie de travail)
635 635
text_email_delivery_not_configured: "Email delivery is not configured, and notifications are disabled.\nConfigure your SMTP server in config/email.yml and restart the application to enable them."
636 636
field_parent_title: Parent page
637 637
label_issue_watchers: Watchers
638
text_wiki_content_too_large: Wiki content is too large for your database. Please truncate it.
lang/ja.yml (copie de travail)
635 635
text_email_delivery_not_configured: "Email delivery is not configured, and notifications are disabled.\nConfigure your SMTP server in config/email.yml and restart the application to enable them."
636 636
field_parent_title: Parent page
637 637
label_issue_watchers: Watchers
638
text_wiki_content_too_large: Wiki content is too large for your database. Please truncate it.
lang/he.yml (copie de travail)
634 634
text_email_delivery_not_configured: "Email delivery is not configured, and notifications are disabled.\nConfigure your SMTP server in config/email.yml and restart the application to enable them."
635 635
field_parent_title: Parent page
636 636
label_issue_watchers: Watchers
637
text_wiki_content_too_large: Wiki content is too large for your database. Please truncate it.
lang/fi.yml (copie de travail)
634 634
text_email_delivery_not_configured: "Email delivery is not configured, and notifications are disabled.\nConfigure your SMTP server in config/email.yml and restart the application to enable them."
635 635
field_parent_title: Parent page
636 636
label_issue_watchers: Watchers
637
text_wiki_content_too_large: Wiki content is too large for your database. Please truncate it.
lang/en.yml (copie de travail)
635 635
enumeration_issue_priorities: Issue priorities
636 636
enumeration_doc_categories: Document categories
637 637
enumeration_activities: Activities (time tracking)
638
text_wiki_content_too_large: Wiki content is too large for your database. Please truncate it.
lang/cs.yml (copie de travail)
639 639
text_email_delivery_not_configured: "Email delivery is not configured, and notifications are disabled.\nConfigure your SMTP server in config/email.yml and restart the application to enable them."
640 640
field_parent_title: Parent page
641 641
label_issue_watchers: Watchers
642
text_wiki_content_too_large: Wiki content is too large for your database. Please truncate it.
lang/fr.yml (copie de travail)
609 609
text_enumeration_destroy_question: 'Cette valeur est affectée à %d objets.'
610 610
text_enumeration_category_reassign_to: 'Réaffecter les objets à cette valeur:'
611 611
text_email_delivery_not_configured: "L'envoi de mail n'est pas configuré, les notifications sont désactivées.\nConfigurez votre serveur SMTP dans config/email.yml et redémarrez l'application pour les activer."
612
text_wiki_content_too_large: Le contenu du wiki est trop grand pour votre base de données. Merci de tronquer ce contenu.
612 613

  
613 614
default_role_manager: Manager
614 615
default_role_developper: Développeur
lang/es.yml (copie de travail)
637 637
text_email_delivery_not_configured: "Email delivery is not configured, and notifications are disabled.\nConfigure your SMTP server in config/email.yml and restart the application to enable them."
638 638
field_parent_title: Parent page
639 639
label_issue_watchers: Watchers
640
text_wiki_content_too_large: Wiki content is too large for your database. Please truncate it.
lang/nl.yml (copie de travail)
635 635
text_email_delivery_not_configured: "Email delivery is not configured, and notifications are disabled.\nConfigure your SMTP server in config/email.yml and restart the application to enable them."
636 636
field_parent_title: Parent page
637 637
label_issue_watchers: Watchers
638
text_wiki_content_too_large: Wiki content is too large for your database. Please truncate it.
lang/ko.yml (copie de travail)
634 634
text_email_delivery_not_configured: "Email delivery is not configured, and notifications are disabled.\nConfigure your SMTP server in config/email.yml and restart the application to enable them."
635 635
field_parent_title: Parent page
636 636
label_issue_watchers: Watchers
637
text_wiki_content_too_large: Wiki content is too large for your database. Please truncate it.
lang/zh-tw.yml (copie de travail)
635 635
enumeration_activities: 活動 (時間追蹤)
636 636
field_parent_title: Parent page
637 637
label_issue_watchers: Watchers
638
text_wiki_content_too_large: Wiki content is too large for your database. Please truncate it.
lang/pl.yml (copie de travail)
634 634
text_email_delivery_not_configured: "Email delivery is not configured, and notifications are disabled.\nConfigure your SMTP server in config/email.yml and restart the application to enable them."
635 635
field_parent_title: Parent page
636 636
label_issue_watchers: Watchers
637
text_wiki_content_too_large: Wiki content is too large for your database. Please truncate it.
lang/th.yml (copie de travail)
637 637
text_email_delivery_not_configured: "Email delivery is not configured, and notifications are disabled.\nConfigure your SMTP server in config/email.yml and restart the application to enable them."
638 638
field_parent_title: Parent page
639 639
label_issue_watchers: Watchers
640
text_wiki_content_too_large: Wiki content is too large for your database. Please truncate it.
lang/no.yml (copie de travail)
600 600
text_assign_time_entries_to_project: Overfør førte timer til prosjektet
601 601
text_reassign_time_entries: 'Overfør førte timer til denne saken:'
602 602
text_user_wrote: '%s skrev:'
603
text_wiki_content_too_large: Wiki content is too large for your database. Please truncate it.
603 604

  
604 605
default_role_manager: Leder
605 606
default_role_developper: Utvikler
......
635 636
text_email_delivery_not_configured: "Email delivery is not configured, and notifications are disabled.\nConfigure your SMTP server in config/email.yml and restart the application to enable them."
636 637
field_parent_title: Parent page
637 638
label_issue_watchers: Watchers
639
text_wiki_content_too_large: Wiki content is too large for your database. Please truncate it.
lang/it.yml (copie de travail)
634 634
text_email_delivery_not_configured: "La consegna via e-mail non è configurata e le notifiche sono disabilitate.\nConfigura il tuo server SMTP in config/email.yml e riavvia l'applicazione per abilitarle."
635 635
field_parent_title: Parent page
636 636
label_issue_watchers: Watchers
637
text_wiki_content_too_large: Wiki content is too large for your database. Please truncate it.
lang/hu.yml (copie de travail)
635 635
text_email_delivery_not_configured: "Az E-mail küldés nincs konfigurálva, és az értesítések ki vannak kapcsolva.\nÁllítsd be az SMTP szervert a config/email.yml fájlban és indítsd újra az alkalmazást, hogy érvénybe lépjen."
636 636
field_parent_title: Parent page
637 637
label_issue_watchers: Watchers
638
text_wiki_content_too_large: Wiki content is too large for your database. Please truncate it.
(2-2/4)