Make WordPress Core

Ticket #6603: 6603.diff

File 6603.diff, 947 bytes (added by Denis-de-Bernardy, 15 years ago)

more general fix

  • wp-includes/rewrite.php

     
    18191819                $this->use_trailing_slashes = ( substr($this->permalink_structure, -1, 1) == '/' ) ? true : false;
    18201820
    18211821                // Enable generic rules for pages if permalink structure doesn't begin with a wildcard.
    1822                 $structure = ltrim($this->permalink_structure, '/');
    1823                 if ( $this->using_index_permalinks() )
    1824                         $structure = ltrim($this->permalink_structure, $this->index . '/');
    1825                 if ( 0 === strpos($structure, '%postname%') ||
    1826                          0 === strpos($structure, '%category%') ||
    1827                          0 === strpos($structure, '%tag%') ||
    1828                          0 === strpos($structure, '%author%') )
     1822                if ( preg_match("/^[^%]*%(?:postname|category|tag|author)%/", $this->permalink_structure) )
    18291823                         $this->use_verbose_page_rules = true;
    18301824                else
    18311825                        $this->use_verbose_page_rules = false;