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

This commit is contained in:
Victoria Wang 2015-01-20 23:52:00 -06:00
commit d3c5e0f765
2 changed files with 3 additions and 6 deletions

View file

@ -76,13 +76,10 @@ post '/create' do
session[:captcha_valid] = nil
EmailWorker.perform_async({
from: 'web@neocities.org',
reply_to: 'contact@neocities.org',
to: @site.email,
@site.send_email(
subject: "[Neocities] Welcome to Neocities!",
body: Tilt.new('./views/templates/email_welcome.erb', pretty: true).render(self)
})
)
send_confirmation_email @site

View file

@ -1029,7 +1029,7 @@ class Site < Sequel::Model
end
def suggestions(limit=SUGGESTIONS_LIMIT, offset=0)
suggestions_dataset = Site.exclude(id: id).order(:views.desc, :updated_at.desc)
suggestions_dataset = Site.exclude(id: id).exclude(is_banned: true).exclude(is_nsfw: true).order(:views.desc, :updated_at.desc)
suggestions = suggestions_dataset.where(tags: tags).limit(limit, offset).all
return suggestions if suggestions.length == limit