diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2011-03-12 18:09:46 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2011-03-12 18:09:46 +0000 |
commit | b8b35ab05f70e6edd524397d2fb0dca3630fa840 (patch) | |
tree | 47b6925e19f643969a019a5ca094f4a197777bad /app/helpers | |
parent | f7127e9466861af2a8ea11624e619e6567890a36 (diff) | |
download | redmine-b8b35ab05f70e6edd524397d2fb0dca3630fa840.tar.gz redmine-b8b35ab05f70e6edd524397d2fb0dca3630fa840.zip |
Moved wiki page updated_on eager load to a scope and fixed timestamp titles on wiki page index (#7818).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5098 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/helpers')
-rw-r--r-- | app/helpers/application_helper.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index be0ebaec1..03f40e2bf 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -1,5 +1,5 @@ # Redmine - project management software -# Copyright (C) 2006-2010 Jean-Philippe Lang +# Copyright (C) 2006-2011 Jean-Philippe Lang # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License @@ -194,7 +194,7 @@ module ApplicationHelper pages[node].each do |page| content << "<li>" content << link_to(h(page.pretty_title), {:controller => 'wiki', :action => 'show', :project_id => page.project, :id => page.title}, - :title => (page.respond_to?(:updated_on) ? l(:label_updated_time, distance_of_time_in_words(Time.now, page.updated_on)) : nil)) + :title => (page.updated_on ? l(:label_updated_time, distance_of_time_in_words(Time.now, page.updated_on)) : nil)) content << "\n" + render_page_hierarchy(pages, page.id) if pages[page.id] content << "</li>\n" end |