Make WordPress Core

Opened 11 years ago

Closed 9 years ago

Last modified 9 years ago

#23800 closed enhancement (fixed)

Filter Comment Blacklist, to delete duplicated terms

Reported by: shadowhck's profile shadowhck Owned by: sergeybiryukov's profile SergeyBiryukov
Milestone: 4.0 Priority: normal
Severity: normal Version:
Component: Comments Keywords: good-first-bug has-patch
Focuses: Cc:



In Comment Blacklist, when I save terms, duplicates are not eliminated.

Would be good if the function array_unique would remove these duplicate terms.

Attachments (1)

23800.diff (566 bytes) - added by GaVrA 9 years ago.

Download all attachments as: .zip

Change History (7)

#1 @helen
9 years ago

  • Keywords good-first-bug needs-patch added

#2 @vancoder
9 years ago

The comment blacklist is currently saved as a string, not an array, so this would be somewhat more involved than might first appear.

#3 @SergeyBiryukov
9 years ago

The solution might be similar to [22255] (explode(), array_filter() & array_unique(), implode()).

This should be applied to "Comment Moderation" list as well for consistency.

9 years ago

#4 @GaVrA
9 years ago

  • Keywords has-patch added; needs-patch removed

I added 23800.diff patch that should take care of this by explode(), array_filter(), array_unique() and finally implode() so pretty much the same way it was done in [22255].

Last edited 9 years ago by GaVrA (previous) (diff)

#5 @SergeyBiryukov
9 years ago

  • Owner set to SergeyBiryukov
  • Resolution set to fixed
  • Status changed from new to closed

In 28444:

Filter out empty and duplicate values in Comment Moderation and Comment Blacklist settings.

props GaVrA.
fixes #23800.

#6 @SergeyBiryukov
9 years ago

  • Milestone changed from Awaiting Review to 4.0
Note: See TracTickets for help on using tickets.