mirror of
https://github.com/neocities/neocities.git
synced 2025-04-30 03:58:00 +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
|
session[:captcha_valid] = nil
|
||||||
|
|
||||||
EmailWorker.perform_async({
|
@site.send_email(
|
||||||
from: 'web@neocities.org',
|
|
||||||
reply_to: 'contact@neocities.org',
|
|
||||||
to: @site.email,
|
|
||||||
subject: "[Neocities] Welcome to Neocities!",
|
subject: "[Neocities] Welcome to Neocities!",
|
||||||
body: Tilt.new('./views/templates/email_welcome.erb', pretty: true).render(self)
|
body: Tilt.new('./views/templates/email_welcome.erb', pretty: true).render(self)
|
||||||
})
|
)
|
||||||
|
|
||||||
send_confirmation_email @site
|
send_confirmation_email @site
|
||||||
|
|
||||||
|
|
|
@ -1029,7 +1029,7 @@ class Site < Sequel::Model
|
||||||
end
|
end
|
||||||
|
|
||||||
def suggestions(limit=SUGGESTIONS_LIMIT, offset=0)
|
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
|
suggestions = suggestions_dataset.where(tags: tags).limit(limit, offset).all
|
||||||
|
|
||||||
return suggestions if suggestions.length == limit
|
return suggestions if suggestions.length == limit
|
||||||
|
|
Loading…
Add table
Reference in a new issue