Changeset 1555 for trunk/wp-includes/functions.php
- Timestamp:
- 08/23/2004 11:28:14 PM (21 years ago)
- File:
-
- 1 edited
-
trunk/wp-includes/functions.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/functions.php
r1540 r1555 1164 1164 } 1165 1165 1166 function using_mod_rewrite($permalink_structure = '') { 1167 if (empty($permalink_structure)) { 1168 $permalink_structure = get_settings('permalink_structure'); 1169 1170 if (empty($permalink_structure)) { 1171 return false; 1172 } 1173 } 1174 1175 // If the index is not in the permalink, we're using mod_rewrite. 1176 if (! preg_match('#^/*' . get_settings('blogfilename') . '#', $permalink_structure)) { 1177 return true; 1178 } 1179 1180 return false; 1181 } 1182 1166 1183 function preg_index($number, $matches = '') { 1167 1184 $match_prefix = '$'; … … 1252 1269 $num_tokens = count($tokens[0]); 1253 1270 1254 $index = 'index.php';1255 $feedindex = 'index.php';1256 $trackbackindex = 'index.php';1271 $index = get_settings('blogfilename');; 1272 $feedindex = $index; 1273 $trackbackindex = $index; 1257 1274 for ($i = 0; $i < $num_tokens; ++$i) { 1258 1275 if (0 < $i) { … … 1335 1352 $index = get_settings('blogfilename'); 1336 1353 $prefix = ''; 1337 if ( preg_match('#^/*' . $index . '#', $front)) {1354 if (! using_mod_rewrite($permalink_structure)) { 1338 1355 $prefix = $index . '/'; 1339 1356 }
Note: See TracChangeset
for help on using the changeset viewer.