mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-23 23:58:31 -05:00
Merge pull request #4138 from NickIvanter/internal-links-issue
FIX: internal links in subfolder installs
This commit is contained in:
commit
7899c2d86e
1 changed files with 3 additions and 1 deletions
|
@ -123,9 +123,11 @@ class TopicLink < ActiveRecord::Base
|
|||
|
||||
if Discourse.store.has_been_uploaded?(url)
|
||||
internal = Discourse.store.internal?
|
||||
elsif parsed.host == Discourse.current_hostname || !parsed.host
|
||||
elsif (parsed.host == Discourse.current_hostname && parsed.path.start_with?(Discourse.base_uri)) || !parsed.host
|
||||
internal = true
|
||||
|
||||
parsed.path.slice!(Discourse.base_uri)
|
||||
|
||||
route = Rails.application.routes.recognize_path(parsed.path)
|
||||
|
||||
# We aren't interested in tracking internal links to users
|
||||
|
|
Loading…
Reference in a new issue