holyandrew (holyandrew) wrote in changelog,
holyandrew
holyandrew
changelog

[livejournal] r21804: LJSUP-11857: Cyr sub domains

Committer: akanashin
LJSUP-11857: Cyr sub domains
U   trunk/cgi-bin/Apache/LiveJournal.pm
Modified: trunk/cgi-bin/Apache/LiveJournal.pm
===================================================================
--- trunk/cgi-bin/Apache/LiveJournal.pm	2012-04-26 10:24:27 UTC (rev 21803)
+++ trunk/cgi-bin/Apache/LiveJournal.pm	2012-04-26 10:45:29 UTC (rev 21804)
@@ -1209,8 +1209,13 @@
 
         $u = LJ::want_user($u);
 
-        my $view = $determine_view->($u->user, "other:$host$hostport", $uri);
-        return $view if defined $view;
+        if ($LJ::DOMAIN_JOURNALS_REVERSE{$u->user} || $LJ::DOMAIN_JOURNALS{$u->user}) {
+            my $view = $determine_view->($u->user, "other:$host$hostport", $uri);
+            return $view if defined $view;
+        } else {
+            return redir("http://".$u->user.$LJ::USER_DOMAIN);
+        }
+
         LJ::Request->pnotes ('error' => 'baduser');
         LJ::Request->pnotes ('remote' => LJ::get_remote());
         return LJ::Request::NOT_FOUND;

Tags: akanashin, holyandrew, livejournal, pm
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments