X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/ff81ee6e8304a1982a3ec4f5b134764a29d502cf..69ac90aac5f1f0c980444b182c6d03659fbc7e7a:/wp-admin/edit-comments.php?mode=edit;s=%3C%3Fphp%20comment_author_IP%28%29%20%3F%3E diff --git a/wp-admin/edit-comments.php b/wp-admin/edit-comments.php index e74ebb49..ab1bdbce 100644 --- a/wp-admin/edit-comments.php +++ b/wp-admin/edit-comments.php @@ -2,12 +2,12 @@ require_once('admin.php'); $title = __('Edit Comments'); -$parent_file = 'edit.php'; -$list_js = true; +$parent_file = 'edit-comments.php'; +wp_enqueue_script( 'admin-comments' ); require_once('admin-header.php'); if (empty($_GET['mode'])) $mode = 'view'; -else $mode = wp_specialchars($_GET['mode'], 1); +else $mode = attribute_escape($_GET['mode']); ?>
" . sprintf(__('%s comments deleted.'), $i) . "
'; + if ( !empty( $_POST['spam_button'] ) ) { + printf(__ngettext('%s comment marked as spam', '%s comments marked as spam.', $i), $i); + } else { + printf(__ngettext('%s comment deleted.', '%s comments deleted.', $i), $i); + } + echo '
$page_links
"; + if ('view' == $mode) { if ($comments) { - if ($offset) - $start = " start='$offset'"; - else - $start = ''; + $offset = $offset + 1; + $start = " start='$offset'"; - echo "-
- + + -* | +' . __('Name') . ' | ' . __('E-mail') . ' | ' . __('IP') . ' | ' . __('Comment Excerpt') . ' | -' . __('Actions') . ' | -' . __('Actions') . ' | + +'; foreach ($comments as $comment) { - $authordata = get_userdata($wpdb->get_var("SELECT post_author FROM $wpdb->posts WHERE ID = $comment->comment_post_ID")); + $post = get_post($comment->comment_post_ID); + $authordata = get_userdata($post->post_author); + $comment_status = wp_get_comment_status($comment->comment_ID); $class = ('alternate' == $class) ? '' : 'alternate'; + $class .= ('unapproved' == $comment_status) ? ' unapproved' : ''; ?> -|||
---|---|---|---|---|---|---|---|---|---|
comment_post_ID) ) { ?> | +|||||||||
comment_post_ID) ) { ?> | - | + | - | + | + + + + | comment_post_ID) ) { - echo "" . __('Edit') . ""; } ?> | + echo "" . __('Edit') . ""; } ?>comment_post_ID) ) { - echo "comment_post_ID."&comment=".$comment->comment_ID."\" onclick=\"return confirm('" . sprintf(__("You are about to delete this comment by \'%s\'\\n \'Cancel\' to stop, \'OK\' to delete."), $comment->comment_author) . "')\" class='delete'>" . __('Delete') . ""; } ?> | + echo "comment_post_ID."&c=".$comment->comment_ID."\" onclick=\"return deleteSomething( 'comment', $comment->comment_ID, '" . js_escape(sprintf(__("You are about to delete this comment by '%s'. \n 'Cancel' to stop, 'OK' to delete."), $comment->comment_author )) . "', theCommentList );\" class='delete'>" . __('Delete') . " "; + } ?>
')" />
+'); return false } return confirm('')" /> + '); return false } return confirm('')" />
$page_links
"; + +?>
comment_author_email) { ?>| comment_author_url && 'http://' != $comment->comment_author_url ) { ?> | |
- - - -comment_post_ID) ) { - echo " | comment_ID."\">" . __('Edit Comment') . ""; - echo " | comment_post_ID."&comment=".$comment->comment_ID."\" onclick=\"return deleteSomething( 'comment', $comment->comment_ID, '" . sprintf(__("You are about to delete this comment by "%s".\\n"Cancel" to stop, "OK" to delete."), wp_specialchars( $comment->comment_author, 1 )) . "' );\">" . __('Delete Comment') . " — "; - } // end if any comments to show - // Get post title - if ( current_user_can('edit_post', $comment->comment_post_ID) ) { - $post_title = $wpdb->get_var("SELECT post_title FROM $wpdb->posts WHERE ID = $comment->comment_post_ID"); - $post_title = ('' == $post_title) ? "# $comment->comment_post_ID" : $post_title; - ?> - - |
-