diff options
| author | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2007-10-12 16:21:15 +0000 |
|---|---|---|
| committer | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2007-10-12 16:21:15 +0000 |
| commit | 3a4570b0fc8b3d6339bef71d17d7701554e0bbf7 (patch) | |
| tree | 2a06e5261263c68d8afd95a6328879dc289cb909 /wp-admin/edit-comments.php | |
| parent | b83c34a7010faee0223f6037025c350da12e05e6 (diff) | |
| download | wordpress-mu-3a4570b0fc8b3d6339bef71d17d7701554e0bbf7.tar.gz wordpress-mu-3a4570b0fc8b3d6339bef71d17d7701554e0bbf7.tar.xz wordpress-mu-3a4570b0fc8b3d6339bef71d17d7701554e0bbf7.zip | |
Merge with WP 2.3 - testing use only!
Move pluggable functions out of wpmu-functions and into pluggable.php, fixes #439
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@1069 7be80a69-a1ef-0310-a953-fb0f7c49ff36
Diffstat (limited to 'wp-admin/edit-comments.php')
| -rw-r--r-- | wp-admin/edit-comments.php | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/wp-admin/edit-comments.php b/wp-admin/edit-comments.php index ea718b9..ab1bdbc 100644 --- a/wp-admin/edit-comments.php +++ b/wp-admin/edit-comments.php @@ -39,14 +39,14 @@ function getNumChecked(form) </script> <div class="wrap"> <h2><?php _e('Comments'); ?></h2> -<form name="searchform" action="" method="get" id="editcomments"> - <fieldset> - <legend><?php _e('Show Comments That Contain...') ?></legend> - <input type="text" name="s" value="<?php if (isset($_GET['s'])) echo attribute_escape($_GET['s']); ?>" size="17" /> - <input type="submit" name="submit" value="<?php _e('Search') ?>" /> +<form name="searchform" action="" method="get" id="editcomments"> + <fieldset> + <legend><?php _e('Show Comments That Contain...') ?></legend> + <input type="text" name="s" value="<?php if (isset($_GET['s'])) echo attribute_escape($_GET['s']); ?>" size="17" /> + <input type="submit" name="submit" value="<?php _e('Search') ?>" /> <input type="hidden" name="mode" value="<?php echo $mode; ?>" /> <?php _e('(Searches within comment text, e-mail, URL, and IP address.)') ?> - </fieldset> + </fieldset> </form> <p><a href="?mode=view"><?php _e('View Mode') ?></a> | <a href="?mode=edit"><?php _e('Mass Edit Mode') ?></a></p> <?php @@ -88,7 +88,7 @@ $comments = array_slice($_comments, 0, 20); $extra_comments = array_slice($_comments, 20); $page_links = paginate_links( array( - 'base' => add_query_arg( 'apage', '%#%' ), + 'base' => add_query_arg( 'apage', '%#%' ), 'format' => '', 'total' => ceil($total / 20), 'current' => $page @@ -151,21 +151,22 @@ if ( $extra_comments ) : ?> </tr> </thead>'; 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' : ''; ?> <tr id="comment-<?php echo $comment->comment_ID; ?>" class='<?php echo $class; ?>'> - <td><?php if ( current_user_can('edit_post', $comment->comment_post_ID) ) { ?><input type="checkbox" name="delete_comments[]" value="<?php echo $comment->comment_ID; ?>" /><?php } ?></td> + <td style="text-align: center"><?php if ( current_user_can('edit_post', $comment->comment_post_ID) ) { ?><input type="checkbox" name="delete_comments[]" value="<?php echo $comment->comment_ID; ?>" /><?php } ?></td> <td><?php comment_author_link() ?></td> <td><?php comment_author_email_link() ?></td> - <td><a href="http://ws.arin.net/cgi-bin/whois.pl?queryinput=<?php comment_author_IP() ?>"><?php comment_author_IP() ?></a></td> + <td><a href="edit-comments.php?s=<?php comment_author_IP() ?>&mode=edit"><?php comment_author_IP() ?></a></td> <td><?php comment_excerpt(); ?></td> <td> - <?php if ('unapproved' == $comment_status) { ?> - (Unapproved) - <?php } else { ?> + <?php if ('unapproved' == $comment_status) { + _e('Unapproved'); + } else { ?> <a href="<?php echo get_permalink($comment->comment_post_ID); ?>#comment-<?php comment_ID() ?>" class="edit"><?php _e('View') ?></a> <?php } ?> </td> @@ -175,7 +176,7 @@ if ( $extra_comments ) : ?> echo "<a href=\"comment.php?action=deletecomment&p=".$comment->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') . "</a> "; } ?></td> </tr> - <?php + <?php } // end foreach ?></table> <p class="submit"><input type="submit" name="delete_button" class="delete" value="<?php _e('Delete Checked Comments »') ?>" onclick="var numchecked = getNumChecked(document.getElementById('deletecomments')); if(numchecked < 1) { alert('<?php echo js_escape(__("Please select some comments to delete")); ?>'); return false } return confirm('<?php echo sprintf(js_escape(__("You are about to delete %s comments permanently \n 'Cancel' to stop, 'OK' to delete.")), "' + numchecked + '"); ?>')" /> |
