From 22ad806a439e8163895ae029ce4c462dbf9e7d9d Mon Sep 17 00:00:00 2001
From: Jean-Philippe Lang
Date: Wed, 5 Sep 2007 20:51:11 +0000
Subject: [PATCH] Removed RedCloth checks since it's now supplied with the
application.
git-svn-id: http://redmine.rubyforge.org/svn/trunk@708 e93f8b46-1217-0410-a6f0-8f06a7374b81
---
app/controllers/admin_controller.rb | 1 -
app/controllers/settings_controller.rb | 1 -
app/helpers/application_helper.rb | 2 +-
app/views/admin/info.rhtml | 1 -
app/views/settings/edit.rhtml | 2 +-
5 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/app/controllers/admin_controller.rb b/app/controllers/admin_controller.rb
index 78fd1aa15..43dbb9964 100644
--- a/app/controllers/admin_controller.rb
+++ b/app/controllers/admin_controller.rb
@@ -67,6 +67,5 @@ class AdminController < ApplicationController
@flags = Hash.new
@flags[:default_admin_changed] = User.find(:first, :conditions => ["login=? and hashed_password=?", 'admin', User.hash_password('admin')]).nil?
@flags[:file_repository_writable] = File.writable?(Attachment.storage_path)
- @flags[:textile_available] = ActionView::Helpers::TextHelper.method_defined? "textilize"
end
end
diff --git a/app/controllers/settings_controller.rb b/app/controllers/settings_controller.rb
index fd094adb3..229a4ab3c 100644
--- a/app/controllers/settings_controller.rb
+++ b/app/controllers/settings_controller.rb
@@ -29,6 +29,5 @@ class SettingsController < ApplicationController
params[:settings].each { |name, value| Setting[name] = value }
redirect_to :action => 'edit' and return
end
- @textile_available = ActionView::Helpers::TextHelper.method_defined?("textilize")
end
end
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index a5af7e017..135d61627 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -101,7 +101,7 @@ module ApplicationHelper
html
end
- # textilize text according to system settings and RedCloth availability
+ # format text according to system settings
def textilizable(text, options = {})
return "" if text.blank?
diff --git a/app/views/admin/info.rhtml b/app/views/admin/info.rhtml
index a4b44965b..22d3148f0 100644
--- a/app/views/admin/info.rhtml
+++ b/app/views/admin/info.rhtml
@@ -5,5 +5,4 @@
File repository writable | <%= image_tag (@flags[:file_repository_writable] ? 'true.png' : 'false.png'), :style => "vertical-align:bottom;" %> |
Default administrator account changed | <%= image_tag (@flags[:default_admin_changed] ? 'true.png' : 'false.png'), :style => "vertical-align:bottom;" %> |
-Textile available | <%= image_tag (@flags[:textile_available] ? 'true.png' : 'false.png'), :style => "vertical-align:bottom;" %> |
diff --git a/app/views/settings/edit.rhtml b/app/views/settings/edit.rhtml
index 4678d0b1d..efe8ff640 100644
--- a/app/views/settings/edit.rhtml
+++ b/app/views/settings/edit.rhtml
@@ -35,7 +35,7 @@
<%= text_field_tag 'settings[host_name]', Setting.host_name, :size => 60 %>
-<%= select_tag 'settings[text_formatting]', options_for_select([[l(:label_none), 0], ["textile", "textile"]], (@textile_available ? Setting.text_formatting : 0)), :disabled => !@textile_available %>
+<%= select_tag 'settings[text_formatting]', options_for_select([[l(:label_none), "0"], ["textile", "textile"]], Setting.text_formatting) %>
<%= select_tag 'settings[wiki_compression]', options_for_select( [[l(:label_none), 0], ["gzip", "gzip"]], Setting.wiki_compression) %>