[dw-free] fix "view extended profile" link for OpenID users
[commit: http://hg.dwscoalition.org/dw-free/rev/7b98eca5d3d3]
http://bugs.dwscoalition.org/show_bug.cgi?id=2434
Use $u->profile_url, which has handy logic already. Tweak in a couple of
related areas (and one that's not related to openid).
Patch by
fu.
Files modified:
http://bugs.dwscoalition.org/show_bug.cgi?id=2434
Use $u->profile_url, which has handy logic already. Tweak in a couple of
related areas (and one that's not related to openid).
Patch by
Files modified:
- htdocs/profile.bml
--------------------------------------------------------------------------------
diff -r 5a3fce12991a -r 7b98eca5d3d3 htdocs/profile.bml
--- a/htdocs/profile.bml Wed Nov 17 22:56:06 2010 +0800
+++ b/htdocs/profile.bml Wed Nov 17 23:20:47 2010 +0800
@@ -62,7 +62,7 @@ body<=
# redirect to standard identity url
if ( $u && $u->is_identity ) {
- return BML::redirect("$LJ::SITEROOT/profile?userid=$u->{'userid'}&t=I");
+ return BML::redirect( $u->profile_url( full => $is_full ) );
}
} elsif ( $remote ) {
$u = $remote;
@@ -90,8 +90,7 @@ body<=
# redirect non-identity profiles to their subdomain urls
my $domain = BML::get_client_header( "Host" );
if ( $LJ::ONLY_USER_VHOSTS && !$u->is_identity ) {
- my $url = $u->journal_base . "/profile";
- $url .= '?mode=full' if $is_full;
+ my $url = $u->profile_url( full => $is_full );
my $good_domain = $url;
$good_domain =~ s!^http://!!;
@@ -427,7 +426,7 @@ body<=
if ( $is_full ) {
$ret .= BML::ml( '.details.profile.default', { aopts => "href='" . $u->profile_url . "'" } );
} else {
- $ret .= BML::ml( '.details.profile.full', { aopts => "href='" . $u->profile_url . "?mode=full'" } );
+ $ret .= BML::ml( '.details.profile.full', { aopts => "href='" . $u->profile_url( full => 1 ) . "'" } );
}
$ret .= q{ </p></div></div></div></div> };
--------------------------------------------------------------------------------
