Make WordPress Core


Ignore:
Timestamp:
05/10/2010 10:06:27 PM (14 years ago)
Author:
wpmuguru
Message:

revert non-rewrite permalink settings to be compatible with 2.9, see 13106

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/options-permalink.php

    r14139 r14553  
    7676$iis7_permalinks = iis7_supports_permalinks();
    7777
    78 $prefix = '';
     78$prefix = $blog_prefix = '';
    7979if ( ! got_mod_rewrite() && ! $iis7_permalinks )
    80     $prefix .= '/index.php';
     80    $prefix = '/index.php';
    8181if ( is_multisite() && !is_subdomain_install() && is_main_site() )
    82     $prefix .= '/blog';
     82    $blog_prefix = '/blog';
    8383
    8484if ( isset($_POST['permalink_structure']) || isset($_POST['category_base']) ) {
     
    175175$structures = array(
    176176    '',
    177     '/%year%/%monthnum%/%day%/%postname%/',
    178     '/%year%/%monthnum%/%postname%/',
    179     '/archives/%post_id%'
     177    $prefix . '/%year%/%monthnum%/%day%/%postname%/',
     178    $prefix . '/%year%/%monthnum%/%postname%/',
     179    $prefix . '/archives/%post_id%'
    180180    );
    181181?>
     
    188188    <tr>
    189189        <th><label><input name="selection" type="radio" value="<?php echo esc_attr($structures[1]); ?>" class="tog" <?php checked($structures[1], $permalink_structure); ?> /> <?php _e('Day and name'); ?></label></th>
    190         <td><code><?php echo get_option('home') . $prefix . '/' . date('Y') . '/' . date('m') . '/' . date('d') . '/sample-post/'; ?></code></td>
     190        <td><code><?php echo get_option('home') . $blog_prefix . $prefix . '/' . date('Y') . '/' . date('m') . '/' . date('d') . '/sample-post/'; ?></code></td>
    191191    </tr>
    192192    <tr>
    193193        <th><label><input name="selection" type="radio" value="<?php echo esc_attr($structures[2]); ?>" class="tog" <?php checked($structures[2], $permalink_structure); ?> /> <?php _e('Month and name'); ?></label></th>
    194         <td><code><?php echo get_option('home') . $prefix . '/' . date('Y') . '/' . date('m') . '/sample-post/'; ?></code></td>
     194        <td><code><?php echo get_option('home') . $blog_prefix . $prefix . '/' . date('Y') . '/' . date('m') . '/sample-post/'; ?></code></td>
    195195    </tr>
    196196    <tr>
    197197        <th><label><input name="selection" type="radio" value="<?php echo esc_attr($structures[3]); ?>" class="tog" <?php checked($structures[3], $permalink_structure); ?> /> <?php _e('Numeric'); ?></label></th>
    198         <td><code><?php echo get_option('home') . $prefix  ; ?>/archives/123</code></td>
     198        <td><code><?php echo get_option('home') . $blog_prefix . $prefix; ?>/archives/123</code></td>
    199199    </tr>
    200200    <tr>
     
    205205        </th>
    206206        <td>
    207             <?php echo $prefix; ?>
     207            <?php echo $blog_prefix; ?>
    208208            <input name="permalink_structure" id="permalink_structure" type="text" value="<?php echo esc_attr($permalink_structure); ?>" class="regular-text code" />
    209209        </td>
     
    221221    <tr>
    222222        <th><label for="category_base"><?php /* translators: prefix for category permalinks */ _e('Category base'); ?></label></th>
    223         <td><?php echo $prefix; ?> <input name="category_base" id="category_base" type="text" value="<?php echo esc_attr( $category_base ); ?>" class="regular-text code" /></td>
     223        <td><?php echo $blog_prefix; ?> <input name="category_base" id="category_base" type="text" value="<?php echo esc_attr( $category_base ); ?>" class="regular-text code" /></td>
    224224    </tr>
    225225    <tr>
    226226        <th><label for="tag_base"><?php _e('Tag base'); ?></label></th>
    227         <td><?php echo $prefix; ?> <input name="tag_base" id="tag_base" type="text" value="<?php echo esc_attr($tag_base); ?>" class="regular-text code" /></td>
     227        <td><?php echo $blog_prefix; ?> <input name="tag_base" id="tag_base" type="text" value="<?php echo esc_attr($tag_base); ?>" class="regular-text code" /></td>
    228228    </tr>
    229229    <?php do_settings_fields('permalink', 'optional'); ?>
Note: See TracChangeset for help on using the changeset viewer.