summaryrefslogtreecommitdiffstats
path: root/lib/redmine/hook.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2012-04-25 17:17:49 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2012-04-25 17:17:49 +0000
commit5e57a1a9d9478162ac4f27ae96b2ccaf55a1aba7 (patch)
tree93e57765139714bd82dede475725516c448c0d55 /lib/redmine/hook.rb
parent34e20c4373b7f5a20ab3a132feae3f70f21ec477 (diff)
downloadredmine-5e57a1a9d9478162ac4f27ae96b2ccaf55a1aba7.tar.gz
redmine-5e57a1a9d9478162ac4f27ae96b2ccaf55a1aba7.zip
Merged rails-3.2 branch.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9528 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib/redmine/hook.rb')
-rw-r--r--lib/redmine/hook.rb16
1 files changed, 12 insertions, 4 deletions
diff --git a/lib/redmine/hook.rb b/lib/redmine/hook.rb
index dba36a91a..f0a95f020 100644
--- a/lib/redmine/hook.rb
+++ b/lib/redmine/hook.rb
@@ -17,7 +17,7 @@
module Redmine
module Hook
- include ActionController::UrlWriter
+ #include ActionController::UrlWriter
@@listener_classes = []
@@listeners = nil
@@ -88,12 +88,12 @@ module Redmine
include ActionView::Helpers::FormTagHelper
include ActionView::Helpers::FormOptionsHelper
include ActionView::Helpers::JavaScriptHelper
- include ActionView::Helpers::PrototypeHelper
+ #include ActionView::Helpers::PrototypeHelper
include ActionView::Helpers::NumberHelper
include ActionView::Helpers::UrlHelper
include ActionView::Helpers::AssetTagHelper
include ActionView::Helpers::TextHelper
- include ActionController::UrlWriter
+ include Rails.application.routes.url_helpers
include ApplicationHelper
# Default to creating links using only the path. Subclasses can
@@ -113,6 +113,14 @@ module Redmine
context[:controller].send(:render_to_string, {:locals => context}.merge(options))
end
end
+
+ def controller
+ nil
+ end
+
+ def config
+ ActionController::Base.config
+ end
end
# Helper module included in ApplicationHelper and ActionController so that
@@ -143,7 +151,7 @@ module Redmine
default_context = { :project => @project }
default_context[:controller] = controller if respond_to?(:controller)
default_context[:request] = request if respond_to?(:request)
- Redmine::Hook.call_hook(hook, default_context.merge(context)).join(' ')
+ Redmine::Hook.call_hook(hook, default_context.merge(context)).join(' ').html_safe
end
end
end