holyandrew (holyandrew) wrote in changelog,
holyandrew
holyandrew
changelog

[livejournal] r21846: 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-28 08:23:24 UTC (rev 21845)
+++ trunk/cgi-bin/Apache/LiveJournal.pm	2012-04-28 08:31:00 UTC (rev 21846)
@@ -1203,9 +1203,16 @@
         my $u = LJ::User->new_from_external_domain($host);
 
         unless ($u) {
-            LJ::Request->pnotes ('error' => 'baduser');
-            LJ::Request->pnotes ('remote' => LJ::get_remote());
-            return LJ::Request::NOT_FOUND;
+            if ($host =~ /(?:xn--80adlbbiisqhy9a|xn--f1aa)\.xn--p1ai/) {
+                LJ::Request->pnotes ('error' => 'baddomainru');
+                LJ::Request->pnotes ('journal_username' => $host);
+                LJ::Request->pnotes ('uri' => 'http://www.livejournal.com/shop/domain_ru.bml');
+                return LJ::Request::NOT_FOUND;
+            } else {
+                LJ::Request->pnotes ('error' => 'baduser');
+                LJ::Request->pnotes ('remote' => LJ::get_remote());
+                return LJ::Request::NOT_FOUND;
+            }
         }
 
         $u = LJ::want_user($u);
@@ -1217,13 +1224,6 @@
             return redir($u->journal_base);
         }
 
-        if ($host =~ /(?:xn--80adlbbiisqhy9a|xn--f1aa)\.xn--p1ai/) {
-            LJ::Request->pnotes ('error' => 'baddomainru');
-            LJ::Request->pnotes ('journal_username' => $host);
-            LJ::Request->pnotes ('uri' => 'http://www.livejournal.com/shop/domain_ru.bml');
-            return LJ::Request::NOT_FOUND;
-        }
-
         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