Fix notice on edit posts page when logged in as a user without the 'edit_others_posts' capability.

git-svn-id: http://svn.automattic.com/wordpress/trunk@12390 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
westi 2009-12-13 13:01:30 +00:00
parent a43c737a0d
commit 4bece20e85
1 changed files with 1 additions and 1 deletions

View File

@ -193,7 +193,7 @@ $class = '';
$allposts = '';
if ( $user_posts ) {
if ( $_GET['author'] == $current_user->ID )
if ( isset( $_GET['author'] ) && ( $_GET['author'] == $current_user->ID ) )
$class = ' class="current"';
$status_links[] = "<li><a href='edit.php?author=$current_user->ID'$class>" . sprintf( _nx( 'My Posts <span class="count">(%s)</span>', 'My Posts <span class="count">(%s)</span>', $user_posts_count, 'posts' ), number_format_i18n( $user_posts_count ) ) . '</a>';
$allposts = '?all_posts=1';