From ec2938185db0c45822a9079f7c90873d367ac5d9 Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Wed, 18 May 2005 00:04:30 +0000 Subject: [PATCH] More url_to_postid() fixes. http://mosquito.wordpress.org/view.php?id=1324 git-svn-id: https://develop.svn.wordpress.org/trunk@2610 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/functions.php | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/wp-includes/functions.php b/wp-includes/functions.php index c6dfe7dabf..82dc2585a2 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -189,12 +189,8 @@ function url_to_postid($url = '') { $req_uri = $url; $home_path = parse_url(get_settings('home')); $home_path = $home_path['path']; - - // Trim path info from the end and the leading home path from the - // front. For path info requests, this leaves us with the requesting - // filename, if any. For 404 requests, this leaves us with the - // requested permalink. - $req_uri = str_replace($pathinfo, '', $req_uri); + + $req_uri = str_replace(get_settings('home'), '', $req_uri); $req_uri = str_replace($home_path, '', $req_uri); $req_uri = trim($req_uri, '/'); $request = $req_uri;