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

This commit is contained in:
Kyle Drake 2020-04-30 02:27:58 -07:00
commit a546c88bad
2 changed files with 8 additions and 4 deletions

View file

@ -62,9 +62,8 @@ def browse_sites_dataset
when 'followers'
ds = ds.order :follow_count.desc, :updated_at.desc
when 'supporters'
ds = ds.exclude plan_type: nil
ds = ds.exclude plan_type: 'free'
ds = ds.order :views.desc, :site_updated_at.desc
ds = ds.where id: Site.supporter_ids
ds = ds.order :follow_count.desc, :views.desc, :site_updated_at.desc
when 'featured'
ds = ds.exclude featured_at: nil
ds = ds.order :featured_at.desc

View file

@ -717,7 +717,12 @@ class Site < Sequel::Model
expected_outcodes: [0, 1]
)
begin
output = line.run path: uploaded_file[:tempfile].path
rescue Terrapin::ExitStatusError => e
puts "WARNING: CLAMAV FAILED #{username} #{uploaded_file[:tempfile].path} #{e.message}"
return true
end
return true if output == ''