WordPress.org

Make WordPress Core


Ignore:
Timestamp:
09/18/2004 08:04:29 PM (17 years ago)
Author:
rboren
Message:

Rename using_mod_rewrite() to using_index_permalinks(). Start removing blogfilename references.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/template-functions-links.php

    r1635 r1695  
    154154        $do_perma = 1;
    155155        $feed_url = get_settings('home');
    156         $index = get_settings('blogfilename');
     156        $index = 'index.php';
    157157        $prefix = '';
    158         if (preg_match('#^/*' . $index . '#', $permalink)) {
     158        if (using_index_permalinks()) {
    159159            $feed_url .= '/' . $index;
    160160        }
     
    419419   $page_modregex = "page/?";
    420420   $permalink = 0;
     421     $index = 'index.php';
    421422
    422423     $home_root = parse_url(get_settings('home'));
     
    449450
    450451     // If it's not a path info permalink structure, trim the index.
    451      if (using_mod_rewrite()) {
    452        $qstr = preg_replace("#/*" . get_settings('blogfilename') . "/*#", '/', $qstr);
     452     if (! using_index_permalinks()) {
     453       $qstr = preg_replace("#/*" . $index . "/*#", '/', $qstr);
    453454     } else {
    454455       // If using path info style permalinks, make sure the index is in
    455456       // the URI.
    456        if (strpos($qstr, get_settings('blogfilename')) === false) {
    457          $qstr = '/' . get_settings('blogfilename') . $qstr;
     457       if (strpos($qstr, $index) === false) {
     458         $qstr = '/' . $index . $qstr;
    458459       }
    459460     }
     
    461462     $qstr =  trailingslashit($qstr) . $page_modstring . $pagenum;
    462463      } else {
    463          $qstr = get_settings('blogfilename') . $querystring_start.$page_querystring.$querystring_equal.$pagenum;
     464         $qstr = $index . $querystring_start.$page_querystring.$querystring_equal.$pagenum;
    464465      }
    465466   }
Note: See TracChangeset for help on using the changeset viewer.