Fix #4038: Attempting to create an IP-ban bans the creator.
* Rename comments.ip_addr to comments.creator_ip_addr. * Fix belongs_to_creator to not clobber ip_addr field.
This commit is contained in:
@@ -26,7 +26,7 @@ module Moderator
|
||||
add_row(sums, ArtistVersion.where(updater_ip_addr: ip_addrs).group(:updater).count)
|
||||
add_row(sums, NoteVersion.where(updater_ip_addr: ip_addrs).group(:updater).count)
|
||||
add_row(sums, WikiPageVersion.where(updater_ip_addr: ip_addrs).group(:updater).count)
|
||||
add_row(sums, Comment.where(ip_addr: ip_addrs).group(:creator).count)
|
||||
add_row(sums, Comment.where(creator_ip_addr: ip_addrs).group(:creator).count)
|
||||
add_row(sums, Dmail.where(creator_ip_addr: ip_addrs).group(:from).count)
|
||||
add_row(sums, PostAppeal.where(creator_ip_addr: ip_addrs).group(:creator).count)
|
||||
add_row(sums, PostFlag.where(creator_ip_addr: ip_addrs).group(:creator).count)
|
||||
@@ -55,7 +55,7 @@ module Moderator
|
||||
add_row(sums, PoolArchive.where(updater_id: users.map(&:id)).group(:updater_ip_addr).count) if PoolArchive.enabled?
|
||||
add_row(sums, PostArchive.where(updater_id: users.map(&:id)).group(:updater_ip_addr).count) if PostArchive.enabled?
|
||||
add_row(sums, WikiPageVersion.where(updater: users).group(:updater_ip_addr).count)
|
||||
add_row(sums, Comment.where(creator: users).group(:ip_addr).count)
|
||||
add_row(sums, Comment.where(creator: users).group(:creator_ip_addr).count)
|
||||
add_row(sums, Dmail.where(from: users).group(:creator_ip_addr).count)
|
||||
add_row(sums, PostAppeal.where(creator: users).where.not(creator_ip_addr: nil).group(:creator_ip_addr).count)
|
||||
add_row(sums, PostFlag.where(creator: users).group(:creator_ip_addr).count)
|
||||
|
||||
Reference in New Issue
Block a user