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:
parent
2b8aad1549
commit
92bfcd3e37
|
@ -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";
|
||||
|
|
Loading…
Reference in New Issue