blogid; $is_main_blog = foxypress_FixPostVar('foxypress_main_blog'); if($is_main_blog != foxypress_FixPostVar('foxypress_main_blog_previous')) { //if we mark this as the main site and it wasn't already marked, we need to update in this database //and then update the other db's if it's now a 1 update_option("foxypress_main_blog", $is_main_blog); if($is_main_blog == "1") { $blogids = $wpdb->get_col($wpdb->prepare("SELECT blog_id FROM $wpdb->blogs WHERE blog_id != '" . $wpdb->blogid . "'")); foreach ($blogids as $blog_id) { switch_to_blog($blog_id); update_option("foxypress_main_blog", "0"); } switch_to_blog($OriginalBlog); } } $enable_sso = foxypress_FixPostVar('foxycart_enable_sso'); if($enable_sso != foxypress_FixPostVar("foxycart_enable_sso_previous")) { //this needs to be updated in all the db's update_option("foxycart_enable_sso", $enable_sso); $blogids = $wpdb->get_col($wpdb->prepare("SELECT blog_id FROM $wpdb->blogs WHERE blog_id != '" . $wpdb->blogid . "'")); foreach ($blogids as $blog_id) { switch_to_blog($blog_id); update_option("foxycart_enable_sso", $enable_sso); } switch_to_blog($OriginalBlog); } } header("location: " . foxypress_GetCurrentPageURL(false) . "?post_type=" . FOXYPRESS_CUSTOM_POST_TYPE . "&page=foxypress-settings"); } } function foxypress_settings_page_load() { global $wpdb; if(get_option("foxypress_skip_settings_wizard") == "1") { ?>