Make WordPress Core


Ignore:
Timestamp:
04/21/2008 04:46:15 PM (17 years ago)
Author:
ryan
Message:

Redirect back to original referer when deleting a comment from the edit comment page. fixes #6458 for 2.5

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.5/wp-admin/edit-form-comment.php

    r7530 r7756  
    4747<input type="submit" name="save" value="<?php _e('Save'); ?>" tabindex="4" class="button button-highlighted" />
    4848<?php
    49 echo "<a class='submitdelete' href='" . wp_nonce_url("comment.php?action=deletecomment&amp;c=$comment->comment_ID", 'delete-comment_' . $comment->comment_ID) . "' onclick=\"if ( confirm('" . js_escape(__("You are about to delete this comment. \n  'Cancel' to stop, 'OK' to delete.")) . "') ) { return true;}return false;\">" . __('Delete comment') . "</a>";
     49echo "<a class='submitdelete' href='" . wp_nonce_url("comment.php?action=deletecomment&amp;c=$comment->comment_ID&amp;_wp_original_http_referer=" . wp_get_referer(), 'delete-comment_' . $comment->comment_ID) . "' onclick=\"if ( confirm('" . js_escape(__("You are about to delete this comment. \n  'Cancel' to stop, 'OK' to delete.")) . "') ) { return true;}return false;\">" . __('Delete comment') . "</a>";
    5050?>
    5151</p>
     
    9696<input type="hidden" name="p" value="<?php echo $comment->comment_post_ID ?>" />
    9797<input name="referredby" type="hidden" id="referredby" value="<?php echo wp_get_referer(); ?>" />
     98<?php wp_original_referer_field(true, 'previous'); ?>
    9899<input type="hidden" name="noredir" value="1" />
    99100</div>
Note: See TracChangeset for help on using the changeset viewer.