From 603ca8d9860c2768a941bee5744cb3d1b87c3f82 Mon Sep 17 00:00:00 2001 From: Magnus Bergmark Date: Fri, 8 May 2009 11:50:01 +0200 Subject: [PATCH] Fixed problem with URL linking outside Request-cycle This seems to happen on some versions of Rails and/or some configuration combinations on the server. It is a simple fix to make all links relative instead of absolute in all cases. --- lib/issues_sidebar_graph_hook.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/issues_sidebar_graph_hook.rb b/lib/issues_sidebar_graph_hook.rb index 9c61cf9..0b8bed2 100644 --- a/lib/issues_sidebar_graph_hook.rb +++ b/lib/issues_sidebar_graph_hook.rb @@ -2,11 +2,11 @@ class IssuesSidebarGraphHook < Redmine::Hook::ViewListener def view_issues_sidebar_issues_bottom(context = { }) output = "

#{l(:label_graphs)}

" - output << link_to(l(:label_graphs_old_issues), {:controller => 'graphs', :action => 'old_issues'}) if context[:project].nil? - output << link_to(l(:label_graphs_old_issues), {:controller => 'graphs', :action => 'old_issues', :project_id => context[:project]}) unless context[:project].nil? + output << link_to(l(:label_graphs_old_issues), {:controller => 'graphs', :action => 'old_issues', :only_path => true}) if context[:project].nil? + output << link_to(l(:label_graphs_old_issues), {:controller => 'graphs', :action => 'old_issues', :project_id => context[:project], :only_path => true}) unless context[:project].nil? output << "
" - output << link_to(l(:label_graphs_issue_growth), {:controller => 'graphs', :action => 'issue_growth'}) if context[:project].nil? - output << link_to(l(:label_graphs_issue_growth), {:controller => 'graphs', :action => 'issue_growth', :project_id => context[:project]}) unless context[:project].nil? + output << link_to(l(:label_graphs_issue_growth), {:controller => 'graphs', :action => 'issue_growth', :only_path => true}) if context[:project].nil? + output << link_to(l(:label_graphs_issue_growth), {:controller => 'graphs', :action => 'issue_growth', :project_id => context[:project], :only_path => true}) unless context[:project].nil? output << "
" return output end