Ticket #18117: 18117.diff
| File 18117.diff, 1.3 KB (added by , 13 years ago) |
|---|
-
src/wp-admin/network/site-info.php
48 48 check_admin_referer( 'edit-site' ); 49 49 50 50 switch_to_blog( $id ); 51 $blog_data = wp_unslash( $_POST['blog'] ); 51 52 53 // remove forward slashes from front and back of the site domain 54 $blog_data['domain'] = trim( $blog_data['domain'], '/' ); 55 // ensure one forward slash is present in the front and back of the site path 56 $blog_data['path'] = trailingslashit( '/' . trim( $blog_data['path'], '/' ) ); 57 52 58 if ( isset( $_POST['update_home_url'] ) && $_POST['update_home_url'] == 'update' ) { 53 $blog_address = esc_url_raw( $ _POST['blog']['domain'] . $_POST['blog']['path'] );59 $blog_address = esc_url_raw( $blog_data['domain'] . $blog_data['path'] ); 54 60 if ( get_option( 'siteurl' ) != $blog_address ) 55 61 update_option( 'siteurl', $blog_address ); 56 62 … … 62 68 delete_option( 'rewrite_rules' ); 63 69 64 70 // update blogs table 65 $blog_data = wp_unslash( $_POST['blog'] );66 71 $existing_details = get_blog_details( $id, false ); 67 72 $blog_data_checkboxes = array( 'public', 'archived', 'spam', 'mature', 'deleted' ); 68 73 foreach ( $blog_data_checkboxes as $c ) {