WordPress.org

Make WordPress Core


Ignore:
Timestamp:
10/14/2004 08:09:00 AM (17 years ago)
Author:
saxmatt
Message:

Fix for bug 299.

File:
1 edited

Legend:

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

    r1752 r1798  
    2121}
    2222
    23 if (isset($_POST['submit'])) {
    24     $permalink_structure = preg_replace('#/+/#', '/', $_POST['permalink_structure']);
     23if ( isset($_POST) ) {
     24    if ( $_POST['permalink_structure'] )
     25        $permalink_structure = preg_replace('#/+#', '/', '/' . $_POST['permalink_structure']);
     26    else
     27        $permalink_structure = $_POST['permalink_structure'];
     28   
     29    if ( $_POST['category_base'] )
     30        $category_base = preg_replace('#/+#', '/', '/' . $_POST['category_base']);
     31    else
     32        $category_base = $_POST['category_base'];
     33   
    2534    update_option('permalink_structure', $permalink_structure);
     35    update_option('category_base', $category_base);
     36}
    2637
    27     update_option('category_base', $_POST['category_base']);
    28     $category_base = $_POST['category_base'];
    29 } else {
    30     $permalink_structure = get_settings('permalink_structure');
    31     $category_base = get_settings('category_base');
    32 }
     38$permalink_structure = get_settings('permalink_structure');
     39$category_base = get_settings('category_base');
     40
    3341
    3442generate_page_rewrite_rules();
Note: See TracChangeset for help on using the changeset viewer.