mirror of
https://github.com/redmine/redmine.git
synced 2026-03-04 03:21:24 +01:00
added setting option for wiki history compression (none or gzip)
git-svn-id: http://redmine.rubyforge.org/svn/branches/work@292 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -28,11 +28,18 @@ class WikiContent < ActiveRecord::Base
|
||||
attr_protected :data
|
||||
|
||||
def text=(plain)
|
||||
gz = Zlib::GzipWriter.new(compressed = StringIO.new)
|
||||
gz.write(plain)
|
||||
gz.close
|
||||
self.data = compressed.string
|
||||
self.compression = 'gzip'
|
||||
case Setting.wiki_compression
|
||||
when 'gzip'
|
||||
gz = Zlib::GzipWriter.new(compressed = StringIO.new)
|
||||
gz.write(plain)
|
||||
gz.close
|
||||
self.data = compressed.string
|
||||
self.compression = 'gzip'
|
||||
else
|
||||
self.data = plain
|
||||
self.compression = ''
|
||||
end
|
||||
plain
|
||||
end
|
||||
|
||||
def text
|
||||
|
||||
@@ -38,6 +38,9 @@
|
||||
<p><label><%= l(:setting_text_formatting) %></label>
|
||||
<%= select_tag 'settings[text_formatting]', options_for_select( [[l(:label_none), 0], ["textile", "textile"]], Setting.text_formatting) %></p>
|
||||
|
||||
<p><label><%= l(:setting_wiki_compression) %></label>
|
||||
<%= select_tag 'settings[wiki_compression]', options_for_select( [[l(:label_none), 0], ["gzip", "gzip"]], Setting.wiki_compression) %></p>
|
||||
|
||||
</div>
|
||||
<%= submit_tag l(:button_save) %>
|
||||
<% end %>
|
||||
@@ -41,6 +41,8 @@ mail_from:
|
||||
default: redmine@somenet.foo
|
||||
text_formatting:
|
||||
default: textile
|
||||
wiki_compression:
|
||||
default: gzip
|
||||
default_language:
|
||||
default: en
|
||||
host_name:
|
||||
|
||||
@@ -152,6 +152,7 @@ setting_issues_export_limit: Limite export demandes
|
||||
setting_mail_from: Adresse d'émission
|
||||
setting_host_name: Nom d'hôte
|
||||
setting_text_formatting: Formatage du texte
|
||||
setting_wiki_compression: Compression de l'historique wiki
|
||||
|
||||
label_user: Utilisateur
|
||||
label_user_plural: Utilisateurs
|
||||
|
||||
Reference in New Issue
Block a user