diff -r 346c88efed21 -r 5e2f62d02dcd wp/wp-admin/network/site-settings.php --- a/wp/wp-admin/network/site-settings.php Mon Jun 08 16:11:51 2015 +0000 +++ b/wp/wp-admin/network/site-settings.php Tue Jun 09 03:35:32 2015 +0200 @@ -29,8 +29,8 @@ get_current_screen()->set_help_sidebar( '

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

' . - '

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

' . - '

' . __('Support Forums') . '

' + '

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

' . + '

' . __('Support Forums') . '

' ); $id = isset( $_REQUEST['id'] ) ? intval( $_REQUEST['id'] ) : 0; @@ -40,7 +40,7 @@ $details = get_blog_details( $id ); 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 ); @@ -58,6 +58,11 @@ update_option( $key, $val ); } +/** + * Fires after the site options are updated. + * + * @since 3.0.0 + */ do_action( 'wpmu_update_blog_options' ); restore_current_blog(); wp_redirect( add_query_arg( array( 'update' => 'updated', 'id' => $id ), 'site-settings.php') ); @@ -71,8 +76,8 @@ } $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_site_url_linked = sprintf( __( 'Edit Site: %s' ), '' . $site_url_no_http . '' ); +$title = sprintf( __( 'Edit Site: %s' ), $site_url_no_http ); $parent_file = 'sites.php'; $submenu_file = 'sites.php'; @@ -82,7 +87,6 @@ ?>
-

'; + echo '

' . $msg . '

'; } ?>
@@ -109,7 +113,14 @@ 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; @@ -127,14 +138,14 @@ if ( strpos( $option->option_value, "\n" ) !== false ) { ?> - + - + option_name, array( 'siteurl', 'home' ) ) ) { ?> @@ -144,6 +155,13 @@
option_name ) ) ?>
option_name ) ) ); ?> option_value ) ?>