Fix Manage->Posts paging when running WP in a subdir. http://mosquito.wordpress.org/view.php?id=1177

git-svn-id: https://develop.svn.wordpress.org/trunk@2499 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2005-03-30 06:51:55 +00:00
parent 2b8aad1549
commit 92bfcd3e37
1 changed files with 4 additions and 2 deletions

View File

@ -377,8 +377,6 @@ function get_pagenum_link($pagenum = 1) {
$page_modstring = "page/";
$page_modregex = "page/?";
$permalink = 0;
//$index = 'index.php';
$index = $_SERVER['SCRIPT_NAME'];
$home_root = parse_url(get_settings('home'));
$home_root = $home_root['path'];
@ -386,6 +384,10 @@ function get_pagenum_link($pagenum = 1) {
$qstr = preg_replace('|^'. $home_root . '|', '', $qstr);
$qstr = preg_replace('|^/+|', '', $qstr);
$index = $_SERVER['SCRIPT_NAME'];
$index = preg_replace('|^'. $home_root . '|', '', $index);
$index = preg_replace('|^/+|', '', $index);
// if we already have a QUERY style page string
if( stristr( $qstr, $page_querystring ) ) {
$replacement = "$page_querystring=$pagenum";