Committer: akanashin
LJINT-467: Comments for side projects (Lenta.ru olympics)U trunk/cgi-bin/Apache/LiveJournal.pm
Modified: trunk/cgi-bin/Apache/LiveJournal.pm =================================================================== --- trunk/cgi-bin/Apache/LiveJournal.pm 2012-07-26 12:00:25 UTC (rev 22504) +++ trunk/cgi-bin/Apache/LiveJournal.pm 2012-07-26 12:14:00 UTC (rev 22505) @@ -429,17 +429,6 @@ } } - if ($host=~m!^(?:http://)?([\w-]+)\.\Q$LJ::USER_DOMAIN\E(?:$|/)!xo) { - my $username = $1; - if ($username && (my $redir_url = $LJ::DOMAIN_JOURNALS{LJ::canonical_username($username)})) { - $redir_url = "http://".$redir_url unless $redir_url =~ m!https?://!; - return redir($redir_url.$uri); - } - my $partner_url; - LJ::run_hook('override_journal_url', LJ::load_user($username), \$partner_url); - return redir($partner_url) if $partner_url; - } - # process controller # if defined if ( my $controller = LJ::Request->notes('controller') ) { @@ -669,6 +658,19 @@ return redir($redirect_url); } + if ($host=~m!^(?:http://)?([\w-]+)\.\Q$LJ::USER_DOMAIN\E(?:$|/)!xo) { + my $username = $1; + if ($username && (my $redir_url = $LJ::DOMAIN_JOURNALS{LJ::canonical_username($username)})) { + $redir_url = "http://".$redir_url unless $redir_url =~ m!https?://!; + return redir($redir_url.$uri); + } + my $partner_url; + unless (LJ::remote_bounce_url()) { + LJ::run_hook('override_journal_url', LJ::load_user($username), \$partner_url); + return redir($partner_url) if $partner_url; + } + } + my $journal_view = sub { my $opts = shift; $opts ||= {};