#1774 closed defect (bug) (fixed)
removing redundant line in source:trunk/wp-admin/edit-comments.php#2832
| Reported by: | johnjosephbachir | Owned by: | markjaquith |
|---|---|---|---|
| Priority: | low | Milestone: | |
| Component: | Optimization | Version: | 1.6 |
| Severity: | minor | Keywords: | bg|has-patch bg|commit bg|squashed |
| Cc: | Focuses: |
Description
Unless my tired eyes are missing something obvious, i think this extra permissions check is completely redundant (maybe there used to be a discrepency between the two cases?).
diff for source:trunk/wp-admin/edit-comments.php :
Index: edit-comments.php
===================================================================
--- edit-comments.php (revision 2955)
+++ edit-comments.php (working copy)
@@ -95,8 +95,6 @@
<p><?php _e('Posted'); echo ' '; comment_date('M j, g:i A');
if ( current_user_can('edit_post', $comment->comment_post_ID) ) {
echo " | <a href=\"post.php?action=editcomment&comment=".$comment->comment_ID."\">" . __('Edit Comment') . "</a>";
- }
- if ( current_user_can('edit_post', $comment->comment_post_ID) ) {
echo " | <a href=\"post.php?action=deletecomment&p=".$comment->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') . "</a> — ";
} // end if any comments to show
// Get post title
Attachments (1)
Change History (6)
#1
@
21 years ago
- Summary removing redundant line in source:trunk/wp-admin/edit-comments.php → removing redundant line in source:trunk/wp-admin/edit-comments.php#2832
#2
@
21 years ago
- Keywords bg|has-patch bg|commit added
- Owner changed from to
- Status new → assigned
Nah, that wouldn't have changed after the first echo. Nice catch.
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
diff for source:trunk/wp-admin/edit-comments.php#2832