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:
authorRémy Coutable <remy@rymai.me>2016-05-10 11:56:58 +0300
committerRémy Coutable <remy@rymai.me>2016-05-10 11:57:48 +0300
commitf52a15e022fb451fa9074495897cdd10dbeeceb3 (patch)
tree0fa663a7c2a93fb129cf55fd069e6f7e20bf82e1
parent3dc64764ad4c004f1b72aa4e80f0095e7a9a6571 (diff)
Revert "Merge branch 'wiki-fix' into 'master' "
This reverts commit 4cc85a58e8ca00f5a4ecbd2bca40a0cad867b817, reversing changes made to 90ae445ba930068d04adc5a009dbdeabe4cb3e34. Signed-off-by: Rémy Coutable <remy@rymai.me>
-rw-r--r--CHANGELOG1
-rw-r--r--app/models/project_wiki.rb2
-rw-r--r--lib/gitlab/url_builder.rb2
-rw-r--r--spec/lib/gitlab/url_builder_spec.rb2
-rw-r--r--spec/models/project_wiki_spec.rb4
5 files changed, 4 insertions, 7 deletions
diff --git a/CHANGELOG b/CHANGELOG
index 1c6e24bc10f..6a5b1dce5c7 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -39,7 +39,6 @@ v 8.8.0 (unreleased)
v 8.7.4
- Fix always showing build notification message when switching between merge requests
- - Fix links on wiki pages for relative url setups. !4026 (Artem Sidorenko)
- Links for Redmine issue references are generated correctly again (Benedikt Huss)
v 8.7.3
diff --git a/app/models/project_wiki.rb b/app/models/project_wiki.rb
index c91cb70ae25..7c1a61bb0bf 100644
--- a/app/models/project_wiki.rb
+++ b/app/models/project_wiki.rb
@@ -40,7 +40,7 @@ class ProjectWiki
end
def wiki_base_path
- [Gitlab.config.gitlab.url, "/", @project.path_with_namespace, "/wikis"].join('')
+ ["/", @project.path_with_namespace, "/wikis"].join('')
end
# Returns the Gollum::Wiki object.
diff --git a/lib/gitlab/url_builder.rb b/lib/gitlab/url_builder.rb
index 67a09d5abf5..2bbbd3074e8 100644
--- a/lib/gitlab/url_builder.rb
+++ b/lib/gitlab/url_builder.rb
@@ -62,7 +62,7 @@ module Gitlab
end
def wiki_page_url
- "#{object.wiki.wiki_base_path}/#{object.slug}"
+ "#{Gitlab.config.gitlab.url}#{object.wiki.wiki_base_path}/#{object.slug}"
end
end
end
diff --git a/spec/lib/gitlab/url_builder_spec.rb b/spec/lib/gitlab/url_builder_spec.rb
index c8d3bc01395..bf11472407a 100644
--- a/spec/lib/gitlab/url_builder_spec.rb
+++ b/spec/lib/gitlab/url_builder_spec.rb
@@ -112,7 +112,7 @@ describe Gitlab::UrlBuilder, lib: true do
wiki_page = build(:wiki_page)
url = described_class.build(wiki_page)
- expect(url).to eq "#{Gitlab.config.gitlab.url}/#{wiki_page.wiki.project.path_with_namespace}/wikis/#{wiki_page.slug}"
+ expect(url).to eq "#{Gitlab.config.gitlab.url}#{wiki_page.wiki.wiki_base_path}/#{wiki_page.slug}"
end
end
end
diff --git a/spec/models/project_wiki_spec.rb b/spec/models/project_wiki_spec.rb
index ea659f417f2..532e3f013fd 100644
--- a/spec/models/project_wiki_spec.rb
+++ b/spec/models/project_wiki_spec.rb
@@ -38,9 +38,7 @@ describe ProjectWiki, models: true do
describe "#wiki_base_path" do
it "returns the wiki base path" do
- gitlab_url = Gitlab.config.gitlab.url
- wiki_base_path = "#{gitlab_url}/#{project.path_with_namespace}/wikis"
-
+ wiki_base_path = "/#{project.path_with_namespace}/wikis"
expect(subject.wiki_base_path).to eq(wiki_base_path)
end
end