FIX: post gutter links are broken when using a subfolder
This commit is contained in:
parent
32606f82f6
commit
4451c8802a
|
@ -133,7 +133,7 @@ class TopicLink < ActiveRecord::Base
|
||||||
topic_id = nil unless topic
|
topic_id = nil unless topic
|
||||||
|
|
||||||
if topic.present?
|
if topic.present?
|
||||||
url = "#{Discourse.base_url}#{topic.relative_url}"
|
url = "#{Discourse.base_url_no_prefix}#{topic.relative_url}"
|
||||||
url << "/#{post_number}" if post_number.to_i > 1
|
url << "/#{post_number}" if post_number.to_i > 1
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -168,7 +168,7 @@ class TopicLink < ActiveRecord::Base
|
||||||
|
|
||||||
if topic && post.topic && post.topic.archetype != 'private_message' && topic.archetype != 'private_message'
|
if topic && post.topic && post.topic.archetype != 'private_message' && topic.archetype != 'private_message'
|
||||||
|
|
||||||
prefix = Discourse.base_url
|
prefix = Discourse.base_url_no_prefix
|
||||||
|
|
||||||
reflected_url = "#{prefix}#{post.topic.relative_url(post.post_number)}"
|
reflected_url = "#{prefix}#{post.topic.relative_url(post.post_number)}"
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue