Андрей (andy) wrote in changelog,
Андрей
andy
changelog

[livejournal] r19328: LJSUP-8972 (Lj like: Add image or userhe...

Committer: ailyin
LJSUP-8972 (Lj like: Add image or userhead for liked posts.)
U   trunk/cgi-bin/LJ/Entry.pm
Modified: trunk/cgi-bin/LJ/Entry.pm
===================================================================
--- trunk/cgi-bin/LJ/Entry.pm	2011-06-20 10:21:59 UTC (rev 19327)
+++ trunk/cgi-bin/LJ/Entry.pm	2011-06-21 01:31:29 UTC (rev 19328)
@@ -1420,6 +1420,13 @@
 
         my $journal = $self->journal;
         my ($userhead_url) = $journal->userhead;
+
+        # for now, LJ::User::userhead may return a relative path,
+        # so let's fix this
+        unless ( $userhead_url =~ /^https?:\/\// ) {
+            $userhead_url = $LJ::IMGPREFIX . '/' . $userhead_url . "?v=3";
+        }
+
         return $userhead_url;
     };
     die "cannot get entry image: $@" unless defined $meta{'image'};

Tags: andy, 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