Merge branch 'master' of github.com:neocities/neocities

This commit is contained in:
Kyle Drake 2017-03-27 12:11:10 -07:00
commit e37d25894b

View file

@ -1324,7 +1324,7 @@ class Site < Sequel::Model
end
def screenshot_url(path, resolution)
"#{SCREENSHOTS_URL_ROOT}/#{values[:username]}/#{path}.#{resolution}.jpg"
"#{SCREENSHOTS_URL_ROOT}/#{self.class.sharding_dir(values[:username])}/#{values[:username]}/#{path}.#{resolution}.jpg"
end
def base_thumbnails_path
@ -1346,7 +1346,7 @@ class Site < Sequel::Model
def thumbnail_url(path, resolution)
ext = File.extname(path).gsub('.', '').match(LOSSY_IMAGE_REGEX) ? 'jpg' : 'png'
"#{THUMBNAILS_URL_ROOT}/#{values[:username]}/#{path}.#{resolution}.#{ext}"
"#{THUMBNAILS_URL_ROOT}/#{self.class.sharding_dir(values[:username])}/#{values[:username]}/#{path}.#{resolution}.#{ext}"
end
def ssl_installed?