fixes for failed cron maintenance tasks
* update rails scripts for 5.2 * system dmails should be scoped to system * fix broken url generator in forum notices
This commit is contained in:
@@ -110,9 +110,11 @@ class Dmail < ApplicationRecord
|
||||
end
|
||||
|
||||
def create_automated(params)
|
||||
dmail = Dmail.new(from: User.system, **params)
|
||||
dmail.owner = dmail.to
|
||||
dmail.save
|
||||
CurrentUser.as_system do
|
||||
dmail = Dmail.new(from: User.system, **params)
|
||||
dmail.owner = dmail.to
|
||||
dmail.save
|
||||
end
|
||||
dmail
|
||||
end
|
||||
end
|
||||
|
||||
@@ -10,4 +10,4 @@
|
||||
<br>
|
||||
<% end %>
|
||||
|
||||
<p><%= link_to "View topic", forum_topic_path(@forum_topic, :page => @forum_topic.last_page, :host => Danbooru.config.hostname, :only_path => false) %> | <%= link_to "Unsubscribe", maintenance_user_email_notification_url(:user_id => @user.id, :sig => email_sig(@user), :host => Danbooru.config.hostname, :only_path => false) %></p>
|
||||
<p><%= link_to "View topic", forum_topic_url(@forum_topic, :page => @forum_topic.last_page, :host => Danbooru.config.hostname, :only_path => false) %> | <%= link_to "Unsubscribe", maintenance_user_email_notification_url(:user_id => @user.id, :sig => email_sig(@user), :host => Danbooru.config.hostname, :only_path => false) %></p>
|
||||
|
||||
Reference in New Issue
Block a user