FIX: Relative links in translations should work with subfolder

This commit is contained in:
Gerhard Schlager
2018-11-07 17:59:42 +01:00
parent 5c845c5877
commit 24e5be3f0c
32 changed files with 217 additions and 116 deletions

View File

@ -952,7 +952,7 @@ class User < ActiveRecord::Base
.where.not(post_id: disagreed_flag_post_ids)
.each do |tl|
begin
message = I18n.t('flag_reason.spam_hosts', domain: tl.domain)
message = I18n.t('flag_reason.spam_hosts', domain: tl.domain, base_path: Discourse.base_path)
PostAction.act(Discourse.system_user, tl.post, PostActionType.types[:spam], message: message)
rescue PostAction::AlreadyActed
# If the user has already acted, just ignore it