Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYorick Peterse <yorickpeterse@gmail.com>2016-07-20 13:59:42 +0300
committerYorick Peterse <yorickpeterse@gmail.com>2016-07-20 13:59:42 +0300
commitc1f0b7fcf0a28110ed4465a8afed254a4e33d5ee (patch)
treeb7940a5eb8d2c901f6915c1f3a30eb8eb2bd5ad6 /app/helpers
parent982d27d1df7beb33e3c50261b4192d29c83eff7d (diff)
parent13e74543f9d0f91b7b3ef14279fd78d83f442750 (diff)
Merge branch 'external-wiki-helper-speedup' into 'master'
speed up ExternalWikiService#get_project_wiki_path ## What does this MR do? Speed up ExternalWikiHelper#get_project_wiki_path ## Are there points in the code the reviewer needs to double check? ## Why was this MR needed? See issue #19886 ## What are the relevant issue numbers? #19886 ## Screenshots (if relevant) ## Does this MR meet the acceptance criteria? - [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added - [ ] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md) - [ ] API support added - Tests - [ ] Added for this feature/bug - [ ] All builds are passing - [ ] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides) - [ ] Branch has no merge conflicts with `master` (if you do - rebase it please) - [ ] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits) See merge request !5305
Diffstat (limited to 'app/helpers')
-rw-r--r--app/helpers/external_wiki_helper.rb5
1 files changed, 2 insertions, 3 deletions
diff --git a/app/helpers/external_wiki_helper.rb b/app/helpers/external_wiki_helper.rb
index 1f3401f2906..defd87d6bbe 100644
--- a/app/helpers/external_wiki_helper.rb
+++ b/app/helpers/external_wiki_helper.rb
@@ -1,8 +1,7 @@
module ExternalWikiHelper
def get_project_wiki_path(project)
- external_wiki_service = project.services.
- find { |service| service.to_param == 'external_wiki' }
- if external_wiki_service.present? && external_wiki_service.active?
+ external_wiki_service = project.external_wiki
+ if external_wiki_service
external_wiki_service.properties['external_wiki_url']
else
namespace_project_wiki_path(project.namespace, project, :home)