Changeset 1104

Show
Ignore:
Timestamp:
10/18/07 16:06:34 (11 months ago)
Author:
donncha
Message:

Don't use /blog/ for main blog if using not using VHOSTs

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/index-install.php

    r1098 r1104  
    389389Login Here: BLOG_URLwp-login.php 
    390390 
    391 We hope you enjoy your new weblog. 
    392  Thanks! 
     391We hope you enjoy your new blog. 
     392Thanks! 
    393393 
    394394--The Team @ SITE_NAME')" ); 
     
    405405        update_blog_option( 1, 'template', 'home'); 
    406406        update_blog_option( 1, 'stylesheet', 'home'); 
    407         update_blog_option( 1, 'permalink_structure', '/blog/%year%/%monthnum%/%day%/%postname%/'); 
     407        if( constant( 'VHOST' ) == 'yes' ) { 
     408                update_blog_option( 1, 'permalink_structure', '/%year%/%monthnum%/%day%/%postname%/'); 
     409        } else { 
     410                update_blog_option( 1, 'permalink_structure', '/blog/%year%/%monthnum%/%day%/%postname%/'); 
     411        } 
    408412        update_blog_option( 1, 'rewrite_rules', ''); 
    409413        $msg = "Your new WordPress MU site has been created at\nhttp://{$domain}{$base}\n\nLogin details:\nUsername: admin\nPassword: $pass\nLogin: http://{$domain}{$base}wp-login.php\n"; 
  • trunk/wp-admin/options-permalink.php

    r1069 r1104  
    6565                if (! empty($permalink_structure) ) 
    6666                        $permalink_structure = preg_replace('#/+#', '/', '/' . $_POST['permalink_structure']); 
    67                 if( $permalink_structure != '' && $current_site->domain.$current_site->path == $current_blog->domain.$current_blog->path ) { 
     67                if( constant( 'VHOST' ) == 'no' && $permalink_structure != '' && $current_site->domain.$current_site->path == $current_blog->domain.$current_blog->path ) { 
    6868                        $permalink_structure = '/blog' . $permalink_structure; 
    6969                } 
     
    7575                if (! empty($category_base) ) 
    7676                        $category_base = preg_replace('#/+#', '/', '/' . $_POST['category_base']); 
    77                 if( $category_base != '' && $current_site->domain.$current_site->path == $current_blog->domain.$current_blog->path ) { 
     77                if( constant( 'VHOST' ) == 'no' && $category_base != '' && $current_site->domain.$current_site->path == $current_blog->domain.$current_blog->path ) { 
    7878                        $category_base = '/blog' . $category_base; 
    7979                } 
     
    8585                if (! empty($tag_base) ) 
    8686                        $tag_base = preg_replace('#/+#', '/', '/' . $_POST['tag_base']); 
    87                 if( $tag_base != '' && $current_site->domain.$current_site->path == $current_blog->domain.$current_blog->path ) { 
     87                if( constant( 'VHOST' ) == 'no' && $tag_base != '' && $current_site->domain.$current_site->path == $current_blog->domain.$current_blog->path ) { 
    8888                        $tag_base = '/blog' . $tag_base; 
    8989                } 
     
    161161<br /> 
    162162</p> 
    163 <p id="customstructure"><?php _e('Custom structure'); ?>: <?php if( $current_site->domain.$current_site->path == $current_blog->domain.$current_blog->path ) { echo "/blog"; $permalink_structure = str_replace( "/blog", "", $permalink_structure ); }?><input name="permalink_structure" id="permalink_structure" type="text" class="code" style="width: 60%;" value="<?php echo attribute_escape( $permalink_structure ); ?>" size="50" /></p> 
     163<p id="customstructure"><?php _e('Custom structure'); ?>: <?php if( constant( 'VHOST' ) == 'no' && $current_site->domain.$current_site->path == $current_blog->domain.$current_blog->path ) { echo "/blog"; $permalink_structure = str_replace( "/blog", "", $permalink_structure ); }?><input name="permalink_structure" id="permalink_structure" type="text" class="code" style="width: 60%;" value="<?php echo attribute_escape( $permalink_structure ); ?>" size="50" /></p> 
    164164 
    165165<h3><?php _e('Optional'); ?></h3> 
     
    170170<?php endif; ?> 
    171171        <p> 
    172   <?php _e('Category base'); ?>: <?php if( $current_site->domain.$current_site->path == $current_blog->domain.$current_blog->path ) { echo "/blog"; $category_base = str_replace( "/blog", "", $category_base ); }?><input name="category_base" type="text" class="code"  value="<?php echo attribute_escape( $category_base ); ?>" size="30" /> 
     172  <?php _e('Category base'); ?>: <?php if( constant( 'VHOST' ) == 'no' && $current_site->domain.$current_site->path == $current_blog->domain.$current_blog->path ) { echo "/blog"; $category_base = str_replace( "/blog", "", $category_base ); }?><input name="category_base" type="text" class="code"  value="<?php echo attribute_escape( $category_base ); ?>" size="30" /> 
    173173     </p> 
    174174          <p> 
    175           <?php _e('Tag base'); ?>: <?php if( $current_site->domain.$current_site->path == $current_blog->domain.$current_blog->path ) { echo "/blog"; $tag_base = str_replace( "/blog", "", $tag_base ); }?> <input name="tag_base" id="tag_base" type="text" class="code"  value="<?php echo attribute_escape($tag_base); ?>" size="30" /> 
     175          <?php _e('Tag base'); ?>: <?php if( constant( 'VHOST' ) == 'no' && $current_site->domain.$current_site->path == $current_blog->domain.$current_blog->path ) { echo "/blog"; $tag_base = str_replace( "/blog", "", $tag_base ); }?> <input name="tag_base" id="tag_base" type="text" class="code"  value="<?php echo attribute_escape($tag_base); ?>" size="30" /> 
    176176     </p> 
    177177    <p class="submit">