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

git-svn-id: https://develop.svn.wordpress.org/trunk@1695 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren
2004-09-18 20:04:29 +00:00
parent 1583a85abc
commit cf529fe462
2 changed files with 15 additions and 15 deletions
+7 -8
View File
@@ -1066,7 +1066,7 @@ function remove_action($tag, $function_to_remove, $priority = 10) {
remove_filter($tag, $function_to_remove, $priority);
}
function using_mod_rewrite($permalink_structure = '') {
function using_index_permalinks($permalink_structure = '') {
if (empty($permalink_structure)) {
$permalink_structure = get_settings('permalink_structure');
@@ -1076,7 +1076,7 @@ function using_mod_rewrite($permalink_structure = '') {
}
// If the index is not in the permalink, we're using mod_rewrite.
if (! preg_match('#^/*' . get_settings('blogfilename') . '#', $permalink_structure)) {
if (preg_match('#^/*index.php#', $permalink_structure)) {
return true;
}
@@ -1103,10 +1103,9 @@ function page_permastruct() {
return '';
}
$front = substr($permalink_structure, 0, strpos($permalink_structure, '%'));
$index = get_settings('blogfilename');
$index = 'index.php';
$prefix = '';
if (preg_match('#^/*' . $index . '#', $front)) {
if (using_index_permalinks()) {
$prefix = $index . '/';
}
@@ -1171,7 +1170,7 @@ function generate_rewrite_rules($permalink_structure = '', $matches = '') {
$num_tokens = count($tokens[0]);
$index = get_settings('blogfilename');;
$index = 'index.php';
$feedindex = $index;
$trackbackindex = $index;
for ($i = 0; $i < $num_tokens; ++$i) {
@@ -1253,9 +1252,9 @@ function rewrite_rules($matches = '', $permalink_structure = '') {
$feedregex = '(feed|rdf|rss|rss2|atom)/?$';
$pageregex = 'page/?([0-9]{1,})/?$';
$front = substr($permalink_structure, 0, strpos($permalink_structure, '%'));
$index = get_settings('blogfilename');
$index = 'index.php';
$prefix = '';
if (! using_mod_rewrite($permalink_structure)) {
if (using_index_permalinks($permalink_structure)) {
$prefix = $index . '/';
}