Remove redundant current_user_can() check. props jeremyfelt. fixes #26057.

Built from https://develop.svn.wordpress.org/trunk@26236


git-svn-id: http://core.svn.wordpress.org/trunk@26143 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2013-11-16 17:38:11 +00:00
parent c7a96bbf29
commit 53d47bf514

View File

@ -33,11 +33,9 @@ get_current_screen()->set_help_sidebar(
if ( isset($_REQUEST['action']) && 'add-site' == $_REQUEST['action'] ) {
check_admin_referer( 'add-blog', '_wpnonce_add-blog' );
if ( ! current_user_can( 'manage_sites' ) )
wp_die( __( 'You do not have permission to access this page.' ) );
if ( ! is_array( $_POST['blog'] ) )
wp_die( __( 'Can’t create an empty site.' ) );
$blog = $_POST['blog'];
$domain = '';
if ( preg_match( '|^([a-zA-Z0-9-])+$|', $blog['domain'] ) )