]> source.dussan.org Git - redmine.git/commitdiff
Perf: don't load parent message for generating a link.
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Wed, 4 Jul 2012 17:34:37 +0000 (17:34 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Wed, 4 Jul 2012 17:34:37 +0000 (17:34 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9904 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/helpers/application_helper.rb

index 7772035d3e7bc02fd3d36a4883edf8086f2a8d83..eaf89da8a612bf73287036cbb15156f51c505064 100644 (file)
@@ -128,7 +128,7 @@ module ApplicationHelper
       h(truncate(message.subject, :length => 60)),
       { :controller => 'messages', :action => 'show',
         :board_id => message.board_id,
-        :id => message.root,
+        :id => (message.parent_id || message.id),
         :r => (message.parent_id && message.id),
         :anchor => (message.parent_id ? "message-#{message.id}" : nil)
       }.merge(options),