Check that controller and request methods are available.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8276 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
3717ff34af
commit
cf5dba2beb
|
@ -140,7 +140,9 @@ module Redmine
|
|||
default_context = {:controller => self, :project => @project, :request => request}
|
||||
Redmine::Hook.call_hook(hook, default_context.merge(context))
|
||||
else
|
||||
default_context = {:controller => controller, :project => @project, :request => request}
|
||||
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(' ')
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue