[wp-cvs] wordpress/wp-includes template-functions-links.php, 1.22, 1.23

Ryan Boren rboren at users.sourceforge.net
Sat Aug 7 18:12:57 UTC 2004


Update of /cvsroot/cafelog/wordpress/wp-includes
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32413/wp-includes

Modified Files:
	template-functions-links.php 
Log Message:
Fix get_pagenum_link() to work with path info permalinks and permalinks without trailing slashes. Bug 0002040.

Index: template-functions-links.php
===================================================================
RCS file: /cvsroot/cafelog/wordpress/wp-includes/template-functions-links.php,v
retrieving revision 1.22
retrieving revision 1.23
diff -C2 -d -r1.22 -r1.23
*** template-functions-links.php	29 Jul 2004 03:34:08 -0000	1.22
--- template-functions-links.php	7 Aug 2004 18:12:54 -0000	1.23
***************
*** 332,336 ****
        } elseif( '' != get_settings('permalink_structure')) {
           $permalink = 1;
!          $qstr = preg_replace('|(.*)/[^/]*|', '$1/', $qstr).$page_modstring.$pagenum;
        } else {
           $qstr = get_settings('blogfilename') . $querystring_start.$page_querystring.$querystring_equal.$pagenum;
--- 332,342 ----
        } elseif( '' != get_settings('permalink_structure')) {
           $permalink = 1;
! 
! 	 // If it's not a path info permalink structure, trim the index.
! 	 if ( ! preg_match('#^/*' . get_settings('blogfilename') . '#', get_settings('permalink_structure'))) {
! 	   $qstr = preg_replace("#/*" . get_settings('blogfilename') . "/*#", '/', $qstr);
! 	 }
! 
! 	 $qstr =  trailingslashit($qstr) . $page_modstring . $pagenum;
        } else {
           $qstr = get_settings('blogfilename') . $querystring_start.$page_querystring.$querystring_equal.$pagenum;




More information about the cvs mailing list