fix issue where unstripped title is displayed in browse

This commit is contained in:
Kyle Drake 2017-07-06 10:26:45 -07:00
parent 0bd8557620
commit d559dc8b99

View file

@ -1260,11 +1260,15 @@ class Site < Sequel::Model
end
def title
if values[:title].nil? || values[:title].empty?
!domain.nil? && !domain.empty? ? domain : "#{username}.neocities.org"
begin
if values[:title].blank? || values[:title].strip.empty?
!domain.nil? && !domain.empty? ? domain : host
else
values[:title]
end
rescue
host
end
end
def screenshots_delete(path)