mirror of
https://github.com/discourse/discourse.git
synced 2025-06-06 03:06:53 +08:00
Revert "FIX: Partial reply key search in email sent logs."
This reverts commit e9b2018bc8bc1254075bec597ce30a84f38b456e.
This commit is contained in:
@ -30,10 +30,16 @@ class Admin::EmailController < Admin::AdminController
|
||||
|
||||
email_logs = filter_logs(email_logs, params)
|
||||
|
||||
if params[:reply_key].present?
|
||||
email_logs = email_logs.where(
|
||||
"post_reply_keys.reply_key::TEXT ILIKE ?", "%#{params[:reply_key]}%"
|
||||
)
|
||||
if (reply_key = params[:reply_key]).present?
|
||||
email_logs =
|
||||
if reply_key.length == 32
|
||||
email_logs.where("post_reply_keys.reply_key = ?", reply_key)
|
||||
else
|
||||
email_logs.where(
|
||||
"replace(post_reply_keys.reply_key::VARCHAR, '-', '') ILIKE ?",
|
||||
"%#{reply_key}%"
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
email_logs = email_logs.to_a
|
||||
|
Reference in New Issue
Block a user