Make WordPress Core

Ticket #14530: 14530.2.diff

File 14530.2.diff, 755 bytes (added by ericlewis, 10 years ago)
  • wp-admin/edit-comments.php

    diff --git wp-admin/edit-comments.php wp-admin/edit-comments.php
    index d1bf2b5..e6b8506 100644
     
    88
    99/** WordPress Administration Bootstrap */
    1010require_once( dirname( __FILE__ ) . '/admin.php' );
    11 if ( !current_user_can('edit_posts') )
    12         wp_die( __( 'Cheatin’ uh?' ), 403 );
     11if ( !current_user_can('edit_posts') ) {
     12        $user = wp_get_current_user();
     13        wp_die( sprintf( __( 'User <code>%s</code> does not have the required capability <code>%s</code>
     14                to perform this action in <code>%s:%s</code>.' ), $user->user_login, 'edit_posts', __FILE__, __LINE__ ), 403 );
     15}
    1316
    1417$wp_list_table = _get_list_table('WP_Comments_List_Table');
    1518$pagenum = $wp_list_table->get_pagenum();