diff options
author | Robert Speicher <rspeicher@gmail.com> | 2016-08-01 16:59:44 -0700 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2016-08-01 16:59:44 -0700 |
commit | a70431f874112212cb44b7a104b2e32f440af941 (patch) | |
tree | 5e6753630aeaf0909e7ebc66e04334cc53690e9c /app/helpers/issues_helper.rb | |
parent | 957331bf45e33c5d1ca0331ca6acb56fc8ecdb92 (diff) | |
download | gitlab-ce-a70431f874112212cb44b7a104b2e32f440af941.tar.gz |
Redirect to external issue tracker from `/issues`
Prior, in order to display the correct link to "Issues" in the project
navigation, we were performing a check against the project to see if it
used an external issue tracker, and if so, we used that URL. This was
inefficient.
Now, we simply _always_ link to `namespace_project_issues_path`, and
then in the controller we redirect to the external tracker if it's
present.
This also removes the need for the url_for_issue helper. Bonus! :tada:
Diffstat (limited to 'app/helpers/issues_helper.rb')
-rw-r--r-- | app/helpers/issues_helper.rb | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/app/helpers/issues_helper.rb b/app/helpers/issues_helper.rb index 2b0defd1dda..5061ccb93a4 100644 --- a/app/helpers/issues_helper.rb +++ b/app/helpers/issues_helper.rb @@ -13,22 +13,6 @@ module IssuesHelper OpenStruct.new(id: 0, title: 'None (backlog)', name: 'Unassigned') end - def url_for_project_issues(project = @project, options = {}) - return '' if project.nil? - - url = - if options[:only_path] - project.issues_tracker.project_path - else - project.issues_tracker.project_url - end - - # Ensure we return a valid URL to prevent possible XSS. - URI.parse(url).to_s - rescue URI::InvalidURIError - '' - end - def url_for_new_issue(project = @project, options = {}) return '' if project.nil? |