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

git-svn-id: http://svn.automattic.com/wordpress/trunk@2499 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2005-03-30 06:51:55 +00:00
parent 2ca5ffceea
commit 14aeac1de1
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";