]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-admin/comment.php
Wordpress 2.6.2-scripts
[autoinstalls/wordpress.git] / wp-admin / comment.php
index 72d014703a98b8e838909aeac144762bd5cdea1b..d1e394ea9a3d7f6d77ba8f481b43a89026e6ab7e 100644 (file)
@@ -21,7 +21,7 @@ case 'editcomment' :
        $title = __('Edit Comment');
 
        wp_enqueue_script('comment');
-       //wp_enqueue_script('thickbox');
+
        require_once('admin-header.php');
 
        $comment_id = absint( $_GET['c'] );
@@ -78,7 +78,7 @@ if ( 'spam' == $_GET['dt'] ) {
 
 <table width="100%">
 <tr>
-<td><input type='button' class="button" value='<?php _e('No'); ?>' onclick="self.location='<?php echo get_option('siteurl'); ?>/wp-admin/edit-comments.php';" /></td>
+<td><input type='button' class="button" value='<?php _e('No'); ?>' onclick="self.location='<?php echo admin_url('edit-comments.php'); ?>" /></td>
 <td class="textright"><input type='submit' class="button" value='<?php echo $button; ?>' /></td>
 </tr>
 </table>
@@ -146,7 +146,7 @@ case 'deletecomment' :
        else if ( '' != wp_get_original_referer() && false == $noredir )
                wp_redirect( wp_get_original_referer() );
        else
-               wp_redirect( get_option('siteurl') . '/wp-admin/edit-comments.php' );
+               wp_redirect( admin_url('edit-comments.php') );
 
        die;
        break;
@@ -171,7 +171,7 @@ case 'unapprovecomment' :
        if ( '' != wp_get_referer() && false == $noredir )
                wp_redirect( wp_get_referer() );
        else
-               wp_redirect( get_option('siteurl') . '/wp-admin/edit.php?p=' . absint( $comment->comment_post_ID ) . '#comments' );
+               wp_redirect( admin_url('edit.php?p=' . absint( $comment->comment_post_ID ) . '#comments') );
 
        exit();
        break;
@@ -193,14 +193,10 @@ case 'approvecomment' :
 
        wp_set_comment_status( $comment->comment_ID, 'approve' );
 
-       if ( true == get_option('comments_notify') )
-               wp_notify_postauthor( $comment->comment_ID );
-
-
        if ( '' != wp_get_referer() && false == $noredir )
                wp_redirect( wp_get_referer() );
        else
-               wp_redirect( get_option('siteurl') . '/wp-admin/edit.php?p=' . absint( $comment->comment_post_ID ) . '#comments' );
+               wp_redirect( admin_url('edit.php?p=' . absint( $comment->comment_post_ID ) . '#comments') );
 
        exit();
        break;
@@ -229,4 +225,4 @@ default:
 
 include('admin-footer.php');
 
-?>
\ No newline at end of file
+?>