diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-06-10 19:19:22 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-06-10 19:19:22 +0000 |
commit | 9b63117856ca58a7eb117c345ab81aeea2bb1299 (patch) | |
tree | 9f2e954858b1755b4d3c7111373d12de3506b267 /lib/redmine/scm/adapters | |
parent | 888d2841367a32b924670f94bca024ebf4b28bee (diff) | |
download | redmine-9b63117856ca58a7eb117c345ab81aeea2bb1299.tar.gz redmine-9b63117856ca58a7eb117c345ab81aeea2bb1299.zip |
Extract code from view.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9809 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib/redmine/scm/adapters')
-rw-r--r-- | lib/redmine/scm/adapters/abstract_adapter.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/redmine/scm/adapters/abstract_adapter.rb b/lib/redmine/scm/adapters/abstract_adapter.rb index 345aeba20..feda1b345 100644 --- a/lib/redmine/scm/adapters/abstract_adapter.rb +++ b/lib/redmine/scm/adapters/abstract_adapter.rb @@ -322,6 +322,14 @@ module Redmine def is_text? Redmine::MimeType.is_type?('text', name) end + + def author + if changeset + changeset.author.to_s + elsif lastrev + Redmine::CodesetUtil.replace_invalid_utf8(lastrev.author.to_s.split('<').first) + end + end end class Revisions < Array |