Make WordPress Core


Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/comment.php

    r12113 r12286  
    169169case 'trashcomment' :
    170170case 'untrashcomment' :
     171case 'spamcomment' :
     172case 'unspamcomment' :
    171173    $comment_id = absint( $_REQUEST['c'] );
    172174    $noredir = isset($_REQUEST['noredir']);
     
    186188        $redir = admin_url('edit-comments.php');
    187189
    188     if ( $action == 'trashcomment' ) {
    189         wp_trash_comment($comment_id);
    190         $redir = add_query_arg( array('trashed' => '1', 'ids' => $comment_id), $redir );
    191     } else {
    192         wp_untrash_comment($comment_id);
    193         $redir = add_query_arg( array('untrashed' => '1'), $redir );
     190    $redir = remove_query_arg( array('spammed', 'unspammed', 'trashed', 'untrashed', 'deleted', 'ids'), $redir );
     191
     192    switch ( $action ) {
     193        case 'trashcomment' :
     194            wp_trash_comment($comment_id);
     195            $redir = add_query_arg( array('trashed' => '1', 'ids' => $comment_id), $redir );
     196            break;
     197        case 'untrashcomment' :
     198            wp_untrash_comment($comment_id);
     199            $redir = add_query_arg( array('untrashed' => '1'), $redir );
     200            break;
     201        case 'spamcomment' :
     202            wp_spam_comment($comment_id);
     203            $redir = add_query_arg( array('spammed' => '1', 'ids' => $comment_id), $redir );
     204            break;
     205        case 'unspamcomment' :
     206            wp_unspam_comment($comment_id);
     207            $redir = add_query_arg( array('unspammed' => '1'), $redir );
     208            break;
    194209    }
    195210
Note: See TracChangeset for help on using the changeset viewer.