From f465b2f23e5db5ca6cd6dcba337f5df0a302bc89 Mon Sep 17 00:00:00 2001 From: wpmuguru Date: Tue, 26 Jan 2010 23:02:49 +0000 Subject: [PATCH] Change options-permalinks to use is_main_site(), fix /blog offset display, See #11644 git-svn-id: http://svn.automattic.com/wordpress/trunk@12860 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/options-permalink.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/wp-admin/options-permalink.php b/wp-admin/options-permalink.php index 79374936c..0b490071a 100644 --- a/wp-admin/options-permalink.php +++ b/wp-admin/options-permalink.php @@ -82,7 +82,7 @@ if ( isset($_POST['permalink_structure']) || isset($_POST['category_base']) ) { $permalink_structure = $_POST['permalink_structure']; if (! empty($permalink_structure) ) $permalink_structure = preg_replace('#/+#', '/', '/' . $_POST['permalink_structure']); - if ( is_multisite() && !is_subdomain_install() && $permalink_structure != '' && $current_site->domain.$current_site->path == $current_blog->domain.$current_blog->path ) { + if ( is_multisite() && !is_subdomain_install() && $permalink_structure != '' && is_main_site() ) { $permalink_structure = '/blog' . $permalink_structure; } $wp_rewrite->set_permalink_structure($permalink_structure); @@ -92,7 +92,7 @@ if ( isset($_POST['permalink_structure']) || isset($_POST['category_base']) ) { $category_base = $_POST['category_base']; if (! empty($category_base) ) $category_base = preg_replace('#/+#', '/', '/' . $_POST['category_base']); - if ( is_multisite() && !is_subdomain_install() && $category_base != '' && $current_site->domain.$current_site->path == $current_blog->domain.$current_blog->path ) { + if ( is_multisite() && !is_subdomain_install() && $category_base != '' && is_main_site() ) { $category_base = '/blog' . $category_base; } $wp_rewrite->set_category_base($category_base); @@ -102,7 +102,7 @@ if ( isset($_POST['permalink_structure']) || isset($_POST['category_base']) ) { $tag_base = $_POST['tag_base']; if (! empty($tag_base) ) $tag_base = preg_replace('#/+#', '/', '/' . $_POST['tag_base']); - if ( is_multisite() && !is_subdomain_install() && $tag_base != '' && $current_site->domain.$current_site->path == $current_blog->domain.$current_blog->path ) { + if ( is_multisite() && !is_subdomain_install() && $tag_base != '' && is_main_site() ) { $tag_base = '/blog' . $tag_base; } $wp_rewrite->set_tag_base($tag_base); @@ -203,7 +203,7 @@ $structures = array( - domain.$current_site->path == $current_blog->domain.$current_blog->path ) { echo "/blog"; $permalink_structure = str_replace( "/blog", "", $permalink_structure ); }?> + @@ -219,11 +219,11 @@ $structures = array( - + - +
domain.$current_site->path == $current_blog->domain.$current_blog->path ) { echo "/blog"; $category_base = str_replace( "/blog", "", $category_base ); }?>
domain.$current_site->path == $current_blog->domain.$current_blog->path ) { echo "/blog"; $tag_base = str_replace( "/blog", "", $tag_base ); }?>