X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/41578db67d72562346e4dbb2a14889b23d522813..refs/tags/wordpress-4.3:/wp-admin/network/site-settings.php diff --git a/wp-admin/network/site-settings.php b/wp-admin/network/site-settings.php index aeca875e..cdb031f5 100644 --- a/wp-admin/network/site-settings.php +++ b/wp-admin/network/site-settings.php @@ -29,7 +29,7 @@ get_current_screen()->add_help_tab( array( get_current_screen()->set_help_sidebar( '

' . __('For more information:') . '

' . - '

' . __('Documentation on Site Management') . '

' . + '

' . __('Documentation on Site Management') . '

' . '

' . __('Support Forums') . '

' ); @@ -39,8 +39,12 @@ if ( ! $id ) wp_die( __('Invalid site ID.') ); $details = get_blog_details( $id ); +if ( ! $details ) { + wp_die( __( 'The requested site does not exist.' ) ); +} + if ( !can_edit_network( $details->site_id ) ) - wp_die( __( 'You do not have permission to access this page.' ) ); + wp_die( __( 'You do not have permission to access this page.' ), 403 ); $is_main_site = is_main_site( $id ); @@ -75,9 +79,7 @@ if ( isset($_GET['update']) ) { $messages[] = __('Site options updated.'); } -$site_url_no_http = preg_replace( '#^http(s)?://#', '', get_blogaddress_by_id( $id ) ); -$title_site_url_linked = sprintf( __('Edit Site: %2$s'), get_blogaddress_by_id( $id ), $site_url_no_http ); -$title = sprintf( __('Edit Site: %s'), $site_url_no_http ); +$title = sprintf( __( 'Edit Site: %s' ), esc_html( $details->blogname ) ); $parent_file = 'sites.php'; $submenu_file = 'sites.php'; @@ -87,7 +89,8 @@ require( ABSPATH . 'wp-admin/admin-header.php' ); ?>
-

+

+

|

'; + echo '

' . $msg . '

'; } ?>
@@ -113,7 +116,14 @@ if ( ! empty( $messages ) ) { get_blog_prefix( $id ); - $options = $wpdb->get_results( "SELECT * FROM {$blog_prefix}options WHERE option_name NOT LIKE '\_%' AND option_name NOT LIKE '%user_roles'" ); + $sql = "SELECT * FROM {$blog_prefix}options + WHERE option_name NOT LIKE %s + AND option_name NOT LIKE %s"; + $query = $wpdb->prepare( $sql, + $wpdb->esc_like( '_' ) . '%', + '%' . $wpdb->esc_like( 'user_roles' ) + ); + $options = $wpdb->get_results( $query ); foreach ( $options as $option ) { if ( $option->option_name == 'default_role' ) $editblog_default_role = $option->option_value; @@ -131,14 +141,14 @@ if ( ! empty( $messages ) ) { if ( strpos( $option->option_value, "\n" ) !== false ) { ?> - + - + option_name, array( 'siteurl', 'home' ) ) ) { ?>
option_name ) ) ?>
option_name ) ) ); ?> option_value ) ?>