more consistent behavior of CurrentUser.root_url
This commit is contained in:
@@ -176,7 +176,7 @@ class ApplicationController < ActionController::Base
|
||||
def reset_current_user
|
||||
CurrentUser.user = nil
|
||||
CurrentUser.ip_addr = nil
|
||||
CurrentUser.root_url = root_url
|
||||
CurrentUser.root_url = root_url.chomp("/")
|
||||
end
|
||||
|
||||
def set_started_at_session
|
||||
|
||||
@@ -59,7 +59,7 @@ class CurrentUser
|
||||
end
|
||||
|
||||
def self.root_url
|
||||
Thread.current[:current_root_url] || "https://#{Danbooru.config.hostname}/"
|
||||
Thread.current[:current_root_url] || "https://#{Danbooru.config.hostname}"
|
||||
end
|
||||
|
||||
def self.root_url=(root_url)
|
||||
|
||||
@@ -14,7 +14,7 @@ class StorageManager
|
||||
end
|
||||
|
||||
def default_base_url
|
||||
CurrentUser.root_url + "data"
|
||||
"#{CurrentUser.root_url}/data"
|
||||
end
|
||||
|
||||
# Store the given file at the given path. If a file already exists at that
|
||||
|
||||
Reference in New Issue
Block a user