urldecode page URI so that it will work for multibyte languages.

git-svn-id: http://svn.automattic.com/wordpress/trunk@1841 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
rboren 2004-11-02 01:56:29 +00:00
parent 3ec05be4d2
commit 626a4d0c83
1 changed files with 3 additions and 3 deletions

View File

@ -1346,11 +1346,11 @@ function get_page_uri($page) {
global $wpdb;
$page = $wpdb->get_row("SELECT post_name, post_parent FROM $wpdb->posts WHERE ID = '$page'");
$uri = $page->post_name;
$uri = urldecode($page->post_name);
while ($page->post_parent != 0) {
$page = $wpdb->get_row("SELECT post_name, post_parent FROM $wpdb->posts WHERE ID = '$page->post_parent'");
$uri = $page->post_name . "/" . $uri;
$uri = urldecode($page->post_name) . "/" . $uri;
}
return $uri;
@ -1363,7 +1363,7 @@ function page_rewrite_rules() {
if( is_array( $uris ) )
{
foreach ($uris as $uri => $pagename) {
$rewrite_rules += array($uri . '/?$' => "index.php?pagename=$pagename");
$rewrite_rules += array($uri . '/?$' => "index.php?pagename=" . urldecode($pagename));
}
}