Strip index.php/ before adding it in get_pagenum_link(). Insert index.php/ for the first page when blog is on a page. fixes #4945

git-svn-id: https://develop.svn.wordpress.org/trunk@6068 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Mark Jaquith 2007-09-10 15:06:21 +00:00
parent cf23955caa
commit 4292b0af36
1 changed files with 2 additions and 1 deletions

View File

@ -491,10 +491,11 @@ function get_pagenum_link($pagenum = 1) {
} }
$request = preg_replace( '|page/(.+)/?$|', '', $request); $request = preg_replace( '|page/(.+)/?$|', '', $request);
$request = preg_replace( '|^index\.php/|', '', $request);
$base = trailingslashit( get_bloginfo( 'url' ) ); $base = trailingslashit( get_bloginfo( 'url' ) );
if ( $wp_rewrite->using_index_permalinks() && $pagenum > 1 ) { if ( $wp_rewrite->using_index_permalinks() && ( $pagenum > 1 || ( 'page' == get_option('show_on_front') && get_option('page_on_front') )) ) {
$base .= 'index.php/'; $base .= 'index.php/';
} }