[#540] compatibility layer to reenable API from Chili 1.x

This commit is contained in:
Gregor Schmidt 2011-07-26 17:17:22 +02:00 committed by Holger Just
parent 06076e5ac1
commit e2d16e1397
2 changed files with 10 additions and 1 deletions

View File

@ -0,0 +1,9 @@
class JournalDetail
attr_reader :prop_key, :value, :old_value
def initialize(prop_key, old_value, value)
@prop_key = prop_key
@old_value = old_value
@value = value
end
end

View File

@ -171,7 +171,7 @@ module JournalFormatter
end
label, old_value, value = attr_detail || cv_detail || attachment_detail
Redmine::Hook.call_hook :helper_issues_show_detail_after_setting, {:detail => detail,
Redmine::Hook.call_hook :helper_issues_show_detail_after_setting, {:detail => JournalDetail.new(label, old_value, value),
:label => label, :value => value, :old_value => old_value }
return nil unless label || old_value || value # print nothing if there are no values
label, old_value, value = [label, old_value, value].collect(&:to_s)