Store some values in the class for debug purposes.

git-svn-id: http://svn.automattic.com/wordpress/trunk@3197 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2005-11-22 21:07:48 +00:00
parent d6ec4672a7
commit 9426478867
1 changed files with 7 additions and 0 deletions

View File

@ -1401,6 +1401,9 @@ class WP {
var $query_vars;
var $query_string;
var $request;
var $matched_rule;
var $matched_query;
var $did_permalink = false;
function parse_request($extra_query_vars = '') {
@ -1451,6 +1454,7 @@ class WP {
} else {
$request = $req_uri;
}
$this->request = $request;
// Look for matches.
$request_match = $request;
@ -1463,11 +1467,14 @@ class WP {
if (preg_match("!^$match!", $request_match, $matches)) {
// Got a match.
$this->matched_rule = $match;
// Trim the query of everything up to the '?'.
$query = preg_replace("!^.+\?!", '', $query);
// Substitute the substring matches into the query.
eval("\$query = \"$query\";");
$this->matched_query = $query;
// Parse the query.
parse_str($query, $query_vars);