Fixed undefined var notice when user can't edit the post

git-svn-id: https://develop.svn.wordpress.org/trunk@10148 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2008-12-09 17:44:04 +00:00
parent 5bdb2d79b1
commit a5ee9b2803
1 changed files with 1 additions and 1 deletions

View File

@ -464,6 +464,7 @@ function _wp_dashboard_recent_comments_row( &$comment, $show_date = true ) {
$actions = array(); $actions = array();
$actions_string = '';
if ( current_user_can('edit_post', $comment->comment_post_ID) ) { if ( current_user_can('edit_post', $comment->comment_post_ID) ) {
$actions['approve'] = "<a href='$approve_url' class='dim:the-comment-list:comment-$comment->comment_ID:unapproved:e7e7d3:e7e7d3:new=approved vim-a' title='" . __( 'Approve this comment' ) . "'>" . __( 'Approve' ) . '</a>'; $actions['approve'] = "<a href='$approve_url' class='dim:the-comment-list:comment-$comment->comment_ID:unapproved:e7e7d3:e7e7d3:new=approved vim-a' title='" . __( 'Approve this comment' ) . "'>" . __( 'Approve' ) . '</a>';
$actions['unapprove'] = "<a href='$unapprove_url' class='dim:the-comment-list:comment-$comment->comment_ID:unapproved:e7e7d3:e7e7d3:new=unapproved vim-u' title='" . __( 'Unapprove this comment' ) . "'>" . __( 'Unapprove' ) . '</a>'; $actions['unapprove'] = "<a href='$unapprove_url' class='dim:the-comment-list:comment-$comment->comment_ID:unapproved:e7e7d3:e7e7d3:new=unapproved vim-u' title='" . __( 'Unapprove this comment' ) . "'>" . __( 'Unapprove' ) . '</a>';
@ -476,7 +477,6 @@ function _wp_dashboard_recent_comments_row( &$comment, $show_date = true ) {
$actions = apply_filters( 'comment_row_actions', $actions, $comment ); $actions = apply_filters( 'comment_row_actions', $actions, $comment );
$i = 0; $i = 0;
$actions_string = '';
foreach ( $actions as $action => $link ) { foreach ( $actions as $action => $link ) {
++$i; ++$i;
( ( ('approve' == $action || 'unapprove' == $action) && 2 === $i ) || 1 === $i ) ? $sep = '' : $sep = ' | '; ( ( ('approve' == $action || 'unapprove' == $action) && 2 === $i ) || 1 === $i ) ? $sep = '' : $sep = ' | ';