site_id != $wpdb->siteid ) wp_die( __( 'You do not have permission to access this page.' ) ); $is_main_site = is_main_site( $id ); if ( isset($_REQUEST['action']) && 'update-site' == $_REQUEST['action'] ) { check_admin_referer( 'edit-site' ); switch_to_blog( $id ); if ( isset( $_POST['update_home_url'] ) && $_POST['update_home_url'] == 'update' ) { $blog_address = get_blogaddress_by_domain( $_POST['blog']['domain'], $_POST['blog']['path'] ); if ( get_option( 'siteurl' ) != $blog_address ) update_option( 'siteurl', $blog_address ); if ( get_option( 'home' ) != $blog_address ) update_option( 'home', $blog_address ); } // rewrite rules can't be flushed during switch to blog delete_option( 'rewrite_rules' ); // update blogs table $blog_data = stripslashes_deep( $_POST['blog'] ); $existing_details = get_blog_details( $id, false ); $blog_data_checkboxes = array( 'public', 'archived', 'spam', 'mature', 'deleted' ); foreach ( $blog_data_checkboxes as $c ) { if ( ! in_array( $existing_details->$c, array( 0, 1 ) ) ) $blog_data[ $c ] = $existing_details->$c; else $blog_data[ $c ] = isset( $_POST['blog'][ $c ] ) ? 1 : 0; } update_blog_details( $id, $blog_data ); do_action( 'wpmu_update_blog_options' ); restore_current_blog(); wp_redirect( add_query_arg( array( 'update' => 'updated', 'id' => $id ), 'site-info.php') ); } if ( isset($_GET['update']) ) { $messages = array(); if ( 'updated' == $_GET['update'] ) $messages[] = __('Site info updated.'); } $title = sprintf( __('Edit Site: %s'), get_blogaddress_by_id($id)); $parent_file = 'sites.php'; $submenu_file = 'sites.php'; require('../admin-header.php'); ?>
' . $msg . '