holyandrew (holyandrew) wrote in changelog,
holyandrew
holyandrew
changelog

[livejournal] r21848: 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:31:38 UTC (rev 21847)
+++ trunk/cgi-bin/Apache/LiveJournal.pm	2012-04-28 08:55:02 UTC (rev 21848)
@@ -1217,7 +1217,10 @@
 
         $u = LJ::want_user($u);
 
-        if ($LJ::DOMAIN_JOURNALS_REVERSE{$host} || $LJ::DOMAIN_JOURNALS{$u->user}) {
+        my $check_host = lc($host);
+        $check_host =~ s/^www\.//;
+
+        if ($LJ::DOMAIN_JOURNALS_REVERSE{$check_host} || $LJ::DOMAIN_JOURNALS{$u->user}) {
             my $view = $determine_view->($u->user, "other:$host$hostport", $uri);
             return $view if defined $view;
         } else {

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