wisest owl (wisest_owl) wrote in changelog,
wisest owl
wisest_owl
changelog

[livejournal] r21913: LJSUP-12106: Error when look catalog unl...

Committer: wisest-owl
LJSUP-12106: Error when look catalog unlogged user

U   trunk/cgi-bin/weblib.pl
Modified: trunk/cgi-bin/weblib.pl
===================================================================
--- trunk/cgi-bin/weblib.pl	2012-05-10 13:59:50 UTC (rev 21912)
+++ trunk/cgi-bin/weblib.pl	2012-05-10 14:13:43 UTC (rev 21913)
@@ -2385,8 +2385,9 @@
         push @classes, "shop-page";
     } elsif ($uri =~ m!^/pics(/.*)?$!) {
         if (LJ::_is_pics_branding_active()) {
-            my $remote = LJ::get_remote ();
-            if (LJ::Pics::Album->list( 'userid' => $remote->userid )) {
+            my ($user) = $host =~ /([\w\-]{1,15})\.\Q$LJ::DOMAIN\E$/;
+            $user = LJ::get_remote () || LJ::load_user ($user);
+            if ($user && LJ::Pics::Album->list( 'userid' => $user->userid )) {
                 ## photos exists
                 push @classes, "framework-page-view";
             } else {

Tags: livejournal, pl, wisest-owl
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