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:
1 parent
74bfe8b9e5
commit
0f419dd028
4 files changed
+18
-5
No files matched your search
@@ -28,11 +28,18 @@ class WikiContent < ActiveRecord::Base
|
|||||||
attr_protected :data
|
attr_protected :data
|
||||||
|
|
||||||
def text=(plain)
|
def text=(plain)
|
||||||
gz = Zlib::GzipWriter.new(compressed = StringIO.new)
|
case Setting.wiki_compression
|
||||||
gz.write(plain)
|
when 'gzip'
|
||||||
gz.close
|
gz = Zlib::GzipWriter.new(compressed = StringIO.new)
|
||||||
self.data = compressed.string
|
gz.write(plain)
|
||||||
self.compression = 'gzip'
|
gz.close
|
||||||
|
self.data = compressed.string
|
||||||
|
self.compression = 'gzip'
|
||||||
|
else
|
||||||
|
self.data = plain
|
||||||
|
self.compression = ''
|
||||||
|
end
|
||||||
|
plain
|
||||||
end
|
end
|
||||||
|
|
||||||
def text
|
def text
|
||||||
|
|||||||
@@ -38,6 +38,9 @@
|
|||||||
<p><label><%= l(:setting_text_formatting) %></label>
|
<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>
|
<%= 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>
|
</div>
|
||||||
<%= submit_tag l(:button_save) %>
|
<%= submit_tag l(:button_save) %>
|
||||||
<% end %>
|
<% end %>
|
||||||
@@ -41,6 +41,8 @@ mail_from:
|
|||||||
default: redmine@somenet.foo
|
default: redmine@somenet.foo
|
||||||
text_formatting:
|
text_formatting:
|
||||||
default: textile
|
default: textile
|
||||||
|
wiki_compression:
|
||||||
|
default: gzip
|
||||||
default_language:
|
default_language:
|
||||||
default: en
|
default: en
|
||||||
host_name:
|
host_name:
|
||||||
|
|||||||
@@ -152,6 +152,7 @@ setting_issues_export_limit: Limite export demandes
|
|||||||
setting_mail_from: Adresse d'émission
|
setting_mail_from: Adresse d'émission
|
||||||
setting_host_name: Nom d'hôte
|
setting_host_name: Nom d'hôte
|
||||||
setting_text_formatting: Formatage du texte
|
setting_text_formatting: Formatage du texte
|
||||||
|
setting_wiki_compression: Compression de l'historique wiki
|
||||||
|
|
||||||
label_user: Utilisateur
|
label_user: Utilisateur
|
||||||
label_user_plural: Utilisateurs
|
label_user_plural: Utilisateurs
|
||||||
|
|||||||
Reference in new issue
Block a user