[wp-cvs] wordpress/wp-includes template-functions-links.php, 1.19, 1.20

Ryan Boren rboren at users.sourceforge.net
Tue Jun 8 12:48:24 CDT 2004


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

Modified Files:
	template-functions-links.php 
Log Message:
Add back the trailing slash to paged permalinks.

Index: template-functions-links.php
===================================================================
RCS file: /cvsroot/cafelog/wordpress/wp-includes/template-functions-links.php,v
retrieving revision 1.19
retrieving revision 1.20
diff -C2 -d -r1.19 -r1.20
*** template-functions-links.php	7 Jun 2004 04:41:06 -0000	1.19
--- template-functions-links.php	8 Jun 2004 17:48:21 -0000	1.20
***************
*** 309,312 ****
--- 309,313 ----
     $page_modstring = "page/";
     $page_modregex = "page/?";
+    $permalink = 0;
  
     // if we already have a QUERY style page string
***************
*** 316,319 ****
--- 317,321 ----
     // if we already have a mod_rewrite style page string
     } elseif ( preg_match( '|'.$page_modregex.'\d+|', $qstr ) ){
+       $permalink = 1;
        $qstr = preg_replace('|'.$page_modregex.'\d+|',"$page_modstring$pagenum",$qstr);
  
***************
*** 329,332 ****
--- 331,335 ----
           // otherwise, it could be rewritten, OR just the default index ...
        } elseif( '' != get_settings('permalink_structure')) {
+          $permalink = 1;
           $qstr = preg_replace('|(.*)/[^/]*|', '$1/', $qstr).$page_modstring.$pagenum;
        } else {
***************
*** 341,344 ****
--- 344,348 ----
     $qstr = preg_replace('|^'. $home_root . '|', '', $qstr);
     $qstr = preg_replace('|^/+|', '', $qstr);
+    if ($permalink) $qstr = trailingslashit($qstr);
     return preg_replace('/&([^#])(?![a-z]{1,8};)/', '&$1', trailingslashit( get_settings('home') ) . $qstr );
  }




More information about the cvs mailing list