[wp-cvs] wordpress/wp-includes template-functions-links.php, 1.32,
1.33
Ryan Boren
rboren at users.sourceforge.net
Fri Sep 10 07:03:43 UTC 2004
Update of /cvsroot/cafelog/wordpress/wp-includes
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25161
Modified Files:
template-functions-links.php
Log Message:
get_pagenum_link() tweaks.
Index: template-functions-links.php
===================================================================
RCS file: /cvsroot/cafelog/wordpress/wp-includes/template-functions-links.php,v
retrieving revision 1.32
retrieving revision 1.33
diff -C2 -d -r1.32 -r1.33
*** template-functions-links.php 5 Sep 2004 02:41:01 -0000 1.32
--- template-functions-links.php 10 Sep 2004 07:03:40 -0000 1.33
***************
*** 420,423 ****
--- 420,429 ----
$permalink = 0;
+ $home_root = parse_url(get_settings('home'));
+ $home_root = $home_root['path'];
+ $home_root = trailingslashit($home_root);
+ $qstr = preg_replace('|^'. $home_root . '|', '', $qstr);
+ $qstr = preg_replace('|^/+|', '', $qstr);
+
// if we already have a QUERY style page string
if( stristr( $qstr, $page_querystring ) ) {
***************
*** 448,452 ****
// If using path info style permalinks, make sure the index is in
// the URI.
! if (! strstr($qstr, get_settings('blogfilename'))) {
$qstr = '/' . get_settings('blogfilename') . $qstr;
}
--- 454,458 ----
// If using path info style permalinks, make sure the index is in
// the URI.
! if (strpos($qstr, get_settings('blogfilename')) === false) {
$qstr = '/' . get_settings('blogfilename') . $qstr;
}
***************
*** 459,467 ****
}
- $home_root = str_replace('http://', '', trim(get_settings('home')));
- $home_root = preg_replace('|([^/]*)(.*)|i', '$2', $home_root);
- $home_root = preg_replace('|/+|i', '/', $home_root);
- $home_root = trailingslashit($home_root);
- $qstr = preg_replace('|^'. $home_root . '|', '', $qstr);
$qstr = preg_replace('|^/+|', '', $qstr);
if ($permalink) $qstr = trailingslashit($qstr);
--- 465,468 ----
More information about the cvs
mailing list