mirror of
https://github.com/neocities/neocities.git
synced 2025-04-28 03:02:35 +02:00
Merge branch 'master' of github.com:neocities/neocities
This commit is contained in:
commit
d3c5e0f765
2 changed files with 3 additions and 6 deletions
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue