Make WordPress Core

Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#11260 closed feature request (fixed)

Should be able to undo "Marking [comment] as Spam"

Reported by: lloydbudd's profile lloydbudd Owned by:
Milestone: 2.9 Priority: normal
Severity: normal Version: 2.9
Component: Trash Keywords: has-patch
Focuses: Cc:


Should be able to undo "Marking [comment] as Spam"

ENV: 2.9-beta-1 (TRUNK r12273)

With WP 2.9 can undo "Moving to Trash", but can't undo "Marking as Spam".

Attachments (3)

11260-first-run.diff (7.4 KB) - added by caesarsgrunt 14 years ago.
First attempt at implementing undo for spam.
11260.diff (28.2 KB) - added by caesarsgrunt 14 years ago.
Full implementation of undo for spam.
11260.2.diff (29.1 KB) - added by caesarsgrunt 14 years ago.

Download all attachments as: .zip

Change History (9)

#1 @caesarsgrunt
14 years ago

  • Milestone changed from 3.0 to 2.9
  • Type changed from defect (bug) to feature request

Yes, I agree that this feature should be added, and I have always intended to do so when the Undo for comments has been finished. I will do so in the end. It won't be difficult, but I would rather finalise the interface for comments first so that this can be the same.

I can easily do this before the release of 2.9, and I think that would be better than waiting until 3.0, since undo for comments is already implemented in 2.9.

14 years ago

First attempt at implementing undo for spam.

#2 @caesarsgrunt
14 years ago

The patch implements undo in the ajax comment interface, but not without js or for bulk.

One problem is that unlike with trash, the previous status of a spam comment isn't stored. Rather than making undo always approve the comment, which would be really confusing and annoying, I have made the js interface check whether the comment is currently approved or not when spamming the comment, and create a custom undo link based on this.

Even like this, I've had to modify admin-ajax.php and comment.php too, and it feels a bit hacky. Furthermore, it will be difficult to extend to non-js, and really difficult to extend to bulk.

I think I'll start again and just store the previous status for spam like we do for trash.

But feel free to look at and comment on the interface of the current patch...

14 years ago

Full implementation of undo for spam.

#3 @caesarsgrunt
14 years ago

  • Keywords has-patch added; Spam Trash Comments removed

Latest patch fully implements undo for spam by storing the previous status, as described above.

The _wp_trash_meta_status is renamed to _wp_previous_status, and extended to work with spam too, enabling full undo for spam.

Undo for spam has the same interface as undo for trash, with minor differences.

#4 @nacin
14 years ago

See also #11258.

#5 @azaozz
14 years ago

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

(In [12286]) Undo for setting a comment as spam, props caesarsgrunt, fixes #11260, see #4529

#6 @lloydbudd
14 years ago

ENV: 2.9-beta-1 (trunk r12287)

Verified fix.

Note: See TracTickets for help on using tickets.