2019-05-02 18:17:27 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2013-05-01 11:48:42 -04:00
|
|
|
module ConfigurableUrls
|
2013-06-27 12:10:43 -04:00
|
|
|
def faq_path
|
2020-10-09 07:51:24 -04:00
|
|
|
SiteSetting.faq_url.blank? ? "#{Discourse.base_path}/faq" : SiteSetting.faq_url
|
2013-06-27 12:10:43 -04:00
|
|
|
end
|
|
|
|
|
2013-05-01 11:48:42 -04:00
|
|
|
def tos_path
|
2023-05-30 10:38:14 -04:00
|
|
|
if SiteSetting.tos_url.present?
|
|
|
|
SiteSetting.tos_url
|
|
|
|
elsif SiteSetting.tos_topic_id > 0 && Topic.exists?(id: SiteSetting.tos_topic_id)
|
|
|
|
"#{Discourse.base_path}/tos"
|
|
|
|
end
|
2013-05-01 11:48:42 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
def privacy_path
|
2023-05-30 10:38:14 -04:00
|
|
|
if SiteSetting.privacy_policy_url.present?
|
2020-10-09 07:51:24 -04:00
|
|
|
SiteSetting.privacy_policy_url
|
2023-05-30 10:38:14 -04:00
|
|
|
elsif SiteSetting.privacy_topic_id > 0 && Topic.exists?(id: SiteSetting.privacy_topic_id)
|
|
|
|
"#{Discourse.base_path}/privacy"
|
2023-01-09 07:10:19 -05:00
|
|
|
end
|
2013-05-01 11:48:42 -04:00
|
|
|
end
|
2015-04-24 13:10:43 -04:00
|
|
|
end
|