Fix braces so user_trailingslashit gets the correct information passed in canonical redirect code. props xorax. fixes #7483 for trunk

git-svn-id: http://svn.automattic.com/wordpress/trunk@8593 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
markjaquith 2008-08-08 17:43:44 +00:00
parent ae8c9c8e53
commit eb6e891041
1 changed files with 2 additions and 1 deletions

View File

@ -165,11 +165,12 @@ function redirect_canonical($requested_url=null, $do_redirect=true) {
} else {
foreach ( array('single', 'category', 'page', 'day', 'month', 'year') as $type ) {
$func = 'is_' . $type;
if ( call_user_func($func) )
if ( call_user_func($func) ) {
$user_ts_type = $type;
break;
}
}
}
$redirect['path'] = user_trailingslashit($redirect['path'], $user_ts_type);
} elseif ( is_home() ) {
$redirect['path'] = trailingslashit($redirect['path']);