Make WordPress Core

Changeset 14733


Ignore:
Timestamp:
05/19/2010 03:42:55 AM (15 years ago)
Author:
wpmuguru
Message:

don't use both /blog & /index.php on main site permalinks, see #13106

File:
1 edited

Legend:

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

    r14732 r14733  
    8787    if ( isset( $_POST['permalink_structure'] ) ) {
    8888        $permalink_structure = $_POST['permalink_structure'];
    89         if ( ! empty( $permalink_structure ) )
    90             $permalink_structure = $blog_prefix . preg_replace( '#/+#', '/', '/' . str_replace( '#', '', $permalink_structure ) );
     89        if ( ! empty( $permalink_structure ) ) {
     90            $permalink_structure = preg_replace( '#/+#', '/', '/' . str_replace( '#', '', $permalink_structure ) );
     91            if ( $prefix && $blog_prefix )
     92                $permalink_structure = $prefix . preg_replace( '#^/?index\.php#', '', $permalink_structure );
     93            else
     94                $permalink_structure = $blog_prefix . $permalink_structure;
     95        }
    9196        $wp_rewrite->set_permalink_structure( $permalink_structure );
    9297    }
Note: See TracChangeset for help on using the changeset viewer.