holyandrew (holyandrew) wrote in changelog,
holyandrew
holyandrew
changelog

[livejournal] r22454: LJSUP-12953: Can't promote travel-beelin...

Committer: akanashin
LJSUP-12953: Can't promote travel-beeline in commercial promo
U   trunk/cgi-bin/Apache/LiveJournal.pm
Modified: trunk/cgi-bin/Apache/LiveJournal.pm
===================================================================
--- trunk/cgi-bin/Apache/LiveJournal.pm	2012-07-16 13:57:24 UTC (rev 22453)
+++ trunk/cgi-bin/Apache/LiveJournal.pm	2012-07-17 07:31:49 UTC (rev 22454)
@@ -426,6 +426,12 @@
         }
     }
 
+    if ($host=~m!^(?:http://)?([\w-]+)\.\Q$LJ::USER_DOMAIN\E(?:$|/)!xo) {
+        if ($1 && (my $redir_url = $LJ::DOMAIN_JOURNALS{LJ::canonical_username($1)})) {
+            $redir_url = "http://".$redir_url unless $redir_url =~ m!https?://!;
+                return redir($redir_url.$uri);
+        }
+    }
 
     # process controller
     # if defined
@@ -1187,11 +1193,6 @@
             my $u = LJ::load_user($user);
             LJ::set_active_journal($u) if $u;
 
-            if ($u && (my $url = $LJ::DOMAIN_JOURNALS{$u->user})) {
-                $url = "http://".$url unless $url =~ m!https?://!;
-                return redir($url);
-            }
-
             my $view = $determine_view->($user, "users", $uri);
             return $view if defined $view;
 

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