Replace base_uri with base_path (#10879)

DEV: Replace instances of Discourse.base_uri with Discourse.base_path

This is clearer because the base_uri is actually just a path prefix. This continues the work started in 555f467.
This commit is contained in:
Daniel Waterworth
2020-10-09 12:51:24 +01:00
committed by GitHub
parent 5e3130ac26
commit 721ee36425
34 changed files with 74 additions and 70 deletions

View File

@ -38,7 +38,7 @@ class UrlHelper
def self.is_local(url)
url.present? && (
Discourse.store.has_been_uploaded?(url) ||
!!(url =~ Regexp.new("^#{Discourse.base_uri}/(assets|plugins|images)/")) ||
!!(url =~ Regexp.new("^#{Discourse.base_path}/(assets|plugins|images)/")) ||
url.start_with?(Discourse.asset_host || Discourse.base_url_no_prefix)
)
end